A2B: Setting up a trunk in A2Billing

Last modified: May 18, 2020


If we are using username/password authentication with our provider then we need to set our trunk up manually in Asterisk. We will give that trunk a name and then use that name, instead of the IP address, in the A2Billing trunk setup screen above.

Here’s an example of setting up a trunk with Switch2VoIP. Many providers will be similar and provide the connection details you need to enter. These settings go in the file /etc/asterisk/sip.conf.

If you need to ‘register’ with your termination provider enter the register line under the existing [general] section –

And then enter the connection details below that. Here we are calling the trunk ‘switch2voip’. This will be used as the ‘IP Address’ in the A2Billing trunk set up page –

[switch2voip] canreinvite=no context=default host= secret=mypassword type=peer username=myusername disallow=all allow=ulaw fromuser=myusername trustrpid=yes sendrpid=yes insecure=invite nat=no

Next, apply those settings by running a ‘sip reload’ in Asterisk –

[root@a2b100 ]# asterisk -rv a2b100*CLI> sip reload a2b100*CLI> exit

Now we can set up the trunk in A2Billing, using the name we specified above, instead of the IP address –

A2b setup a2billing trunk