This is part 8 of a series of posts on setting up an Elastix extension with A2Billing. See here for details of the other parts – Using A2Billing to account for extension calls in Elastix
Now we are going to make some changes to the Elastix setup we did earlier. We are going to tell Elastix to route our calls via A2Billing, rather than going straight out using the trunk.
First we need to add a trunk so select Trunks and Add Custom Trunk –
All you need to enter is the ‘”Custom Dial String” which should be set to “[email protected]/n” –
Now we need to edit the default route that we created earlier and tell it to use the A2Billing trunk that we just setup –
Next we need to edit the extension we setup earlier and enter the a2billing card number in to the “accountcode” field. This will be passed to A2Billing when we make a call, telling it which A2Billing customer account to use.
Now, unfortunately this is where it get’s a little complicated! The version of A2Billing that comes with Elastix 1.6 is a little old (version 1.30) so there are a few settings we can’t make through the GUI. We need to edit the configuration file though SSH. So log in via SSH using the root account. First we’re going to take a copy of the configuration file –
Now we need to tell Asterisk to load the A2Billing configuration file. This seems to be missing by default in Elastix –
Next we need to edit the file /etc/asterisk/a2billing.conf and make the following changes under the [agi-conf1] section (you can tell we are using AGI-CONF1 by looking at the custom trunk in Elastix we set up earlier and the file extensions_a2billing.conf. I won’t go in to the details here.
Change the following settings under the [agi-conf1] section –
Now restart Asterisk by running the following command –
And that’s it!!
If you make some test calls (to UK landlines starting with 1 don’t forget) you should see them appearing in your A2Billing CDR reports –