In this post – http://sysadminman.net/blog/2012/a2billing-outbound-caller-id-from-a-sip-client-4077 – I showed how to set the caller ID in A2Billing for a SIP customer. Using a clever trick though it is possible to allow the user to set the ‘Caller ID Name’ in their softphone and use this as the caller ID Number.
This idea was taken from here – http://forum.asterisk2billing.org/viewtopic.php?f=35&t=8709 – and needs us to add a small piece of code to an Asterisk config file. If you would like this doing on your SysAdminMan VPS please open a support ticket.
Currently in this file – /etc/asterisk/extensions_custom.conf – we have this code –
exten => _X.,1,DeadAGI(a2billing.php,2)
exten => _X.,n,Hangup
If you register SIP devices to A2Billing then at some point you will no doubt want to set what outbound caller ID is presented when a call is made. There are a lot of different settings around the caller ID and lots of different setups depending on what you want to do. Below are a few examples.
This guide was written using a SysAdminMan VPS, details of this can be found here – http://sysadminman.net/sysadminman-freepbx-a2billing-hosting.html
Also the following is assumed –
- A2Billing is already set up and working to make outbound calls
- Your call provider allows you to pass any caller ID – this is not always the case
What’s the default for a SIP client?
This is what happens if we make no changes to the settings on the SysAdminMan template. Here are the default settings and the customer account details –
In agi-conf2 (the default for SIP clients) there are 3 settings relating to caller ID.
auto_setcallerid = Yes | force_callerid = [BLANK] | cid_sanitize = No
There’s an interesting post here – http://www.pbxinaflash.com/community/index.php?threads/google-contacts-to-asterisk-phonebook.10943/ – about downloading your Google contacts to your FreePBX/Asterisk server.
It’s just a neat little script that grabs all of your Google contacts and automatically inserts them in to the Asterisk CallerID database.
Once the database is updated you can tell FreePBX to lookup the caller ID in the Asterisk database and present that with any incoming calls –
Setting up callback in A2Billing can be a tricky thing!
Here I’ll do a walk through that will hopefully get you at least some of the way.
This guide was written using a SysAdminMan VPS running A2Billing version 1.9.4. I will be using voip.ms for outbound calls and a didx.net inbound number for the callback access number.
So we’ve created a trunk to make calls through here, we’ve created a ratecard and call plan here and we’ve created an access phone number here so we’re finally ready to create a customer!
Creating a calling card customer
Click on CUSTOMERS on the left hand menu
Click Create Customers
We get a big list of options but the only things we need to set are –
BALANCE – set the inital balance for the customer
CALL PLAN – ensure the call plan is set to the one we created here
LASTNAME & FIRSTNAME – not required but definitely useful!
Then click on CONFIRM DATA