Digg this!  Add to del.icio.us

4.0 Setup trunk and VoIP routes

The fun part now ! Let's setup the calls termination with a VoIP provider - one of the easiest one to setup is VoIPJet (I have no interest with VoIPJet, they accept Paypal payment, you can have your account running in minutes and no minimum upfront or commitment.

a) signup at www.voipjet.com
b) top up your account with at least $20
c) download their rates list
d) prepare your table rates using the csv template file in /var/www/starshop-oss/docs - enter voipjet in the trunk column

Note1: mind to multiply the buying and selling rates by 10000 to fit with starshop format - without any decimal.

Note2: once your rates are ready, delete the starshop pre-defined rates, and upload your file with PHPMyAdmin.

Once your voipjet account is created, get your personalized IAX configuration on the following page: https://www.voipjet.com/setup.php

Edit your IAX configuration to add the VoIPJet trunk.

cd /etc/asterisk/iax-phones.d/
pico voipjet.conf

Add the following:
[voipjet]
type=peer
;host= 66.246.72.34 ; $20 minimum
host= 8.11.164.234 ; test server
username= your_UserID
secret= your_password_string
auth=md5
context=default
Save, exit and change file owner:

chown asterisk.asterisk voipjet.conf

Edit your extensions definition, and add a new context :

cd /etc/asterisk/extensions.d
pico from-starshoposs.conf

[from-starshoposs]
exten => _001NXXNXXXXXX,1,DeadAGI(starshoposs.agi,${CALLERIDNUM},${EXTEN:2},4) ; VoipJet.com NANPA 
exten => _001NXXNXXXXXX,2,Hangup
exten => _00.,1,DeadAGI(starshoposs.agi,${CALLERIDNUM},011${EXTEN:2},4)
exten => _00.,2,Hangup
exten => _0[1-9].,1,DeadAGI(starshoposs.agi,${CALLERIDNUM},01144${EXTEN:1},4)
exten => _0[1-9].,2,Hangup

Note 1: feel free to change : 01144${EXTEN:1},4) to your local dialing prefix, so user can dial 0207xxxxxx for UK-London without dialing 0044 as it would be defined in your routing configuration. For example dialing local numbers in France would be 01133${EXTEN:1},4)

Note2: your users will have to dial 00 for an international number - feel free to change the numbering plan to fit your needs. Reload Asterisk: asterisk -rx reload

In Xorcom menu, choose Asterisk > enable SIP and IAX.

Open phpmyadmin in your browser (http://ip_address_of_your_server/phpmyadmin - starshopuser / starshop1!), and choose starshop database in the left dropdown menu

a) edit the config table to enter your currency and timezone
b) edit the trunk table and enter: voipjet for the name, IAX2 for the tech field and your_UserID@voipjet/ in the path field.

Last but not least, add Flash Operator Panel into your init.d, so it's reloaded at boot time

cd /etc/init.d
pico pico fop-starshop

Enter the following:
cd /var/www/starshop-oss; /var/www/starshop-oss/safe_opserver
Save, exit, change permissions and startup settings:

chmod 755 fop-starshop
update-rc.d fop-starshop defaults

Et voilą ! you are ready to provide VoIP calls and charge your end users adequately ! any questions, please join the starshop mailing list on sourceforge ;-) A quick introduction to *starShop is available here.

How to setup VoIP calls in your Cybercafé with Xorcom Rapid, Asterisk PBX and *starShop-OSS - Page 1
How to setup VoIP calls in your Cybercafé with Xorcom Rapid, Asterisk PBX and *starShop-OSS - Page 2
How to setup VoIP calls in your Cybercafé with Xorcom Rapid, Asterisk PBX and *starShop-OSS - Page 3

Digg this story. | Bookmark this post on del.icio.us. | Submit this post on reddit.com. | Search Technorati for links to this post. | Submit this post on ma.gnolia.com. | Submit this post on blogmarks.net. | Submit this post on FURL.net. | Submit this post on Spurl.net. | Submit this post on Simpy.com. | Submit this post on Tailrank.com.