Outbound Trunk.

Posted: by Unknown in
0

Setting Up a Trunk in A2Billing: 

-You need to setup a trunk to be used for our outbound calls.Obviously you can setup more than one trunk and route calls to different destinations via different trunks.To send calls to the " SIP Service Provider " you need to authenticate your self  using Username/Password authentication. 
-Once you have an account, configuration is straight forward. In your portal area you will find your SIP Username and SIP Password needed to configure your trunk. In the example next, the SIP Username is 0137fg92 and the SIP Password is fs%7fRtu8.

Notice:You need to set the trunk up manually in Asterisk (sip.conf) and then configure A2Billing to use the trunk you have configured before.

Configure SIP Trunk In Asterisk:
-Rename the sip.conf file (/etc/asterisk/sip.conf) to sip.conf.old for example.
[root@a2billing mahmouda]#mv  /etc/asterisk/sip.conf /etc/asterisk/sip.conf.old
-Create a new sip.conf empty file and insert the following lines into the file.
[general]
context = default ; Default context for incoming calls
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
videosupport = yes ; Enable video
disallow = all ; First disallow all codecs
allow = ulaw ; Allow codecs in order of preference
allow = alaw
allow = gsm
allow = h263 ; H.263 is our video codec
allow = h263p ; H.263p is the enhanced video codec
dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF.
canreinvite=no
nat=yes
-Register with your termination provider using the register line " register => SIP_Provider_Username:SIP_Provider_Password@SIP_Provider_IP Address " under [general] section.
register => 0137fg92:fs%7fRtu8@trunk1.phonebooth.net
-Enter the trunk details below the register line and configure the "defaultuser" and "fromuser" settings as your SIP_Provider_Username.
[phonebooth_trunk]
type=peer
defaultuser=0137fg92
fromuser=0137fg92
secret=fs%7fRtu8
host=trunk1.phonebooth.net
-Apply your configuration settings.
[root@a2billing mahmouda]#asterisk -rx "core reload"

Configure A2Billing To Use The Asterisk Trunk:
-Click "Providers">Providers>Add Provider>Enter the "Provider name">Click "Confirm data".
-Click "Providers">Trunks>Add Trunk>Choose the "VOIP-Provider" previously defined> Enter a "Label">Enter "SIP" in the "Provider Tech" field>Enter the "Provider IP ".
Notice:The "Provider IP" will be the trunk name defined previously in asterisk which is "phonebooth_trunk".
-Verification.
[root@a2billing mahmouda]#asterisk -rx "sip show registry"
Host                 dnsmgr Username    Refresh State          Reg.Time
178.63.114.87:5060   N      1008100945  105     Registered     Sat, 04 Jun 2011 17:36:45
1 SIP registrations.