A couple of questions I get asked a lot are about A2Billing ‘fake ring’ and the fact that A2Billing starts billing for calls too early (before the call is answered)
Here are some tips for resolving these problems –
As soon as a call (or call request) is passed to A2Billing it is possible for A2Billing to pass back a ringing tone to the caller, while the call is being processed. Most people don’t like this as you can get a situation when the caller hears ringing, and then maybe an engaged or unavailable tone afterwards when the call is actually placed. This can be confusing.
To turn this off means editing the A2Billing dial command. This can be found in the AGI-CONF that you are using. For recent versions of A2Billing you edit this in the GUI, for v1.3 that is included with Elastix you need to edit it in /etc/asterisk/a2billing.conf.
Remove the ‘Rr’ from the dialcommand_param from the AGI-CONF settings like this –
More details about options in the Asterisk ‘dial’ command can be found here – http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial
Incorrect CDR records
When using A2Billing to place SIP or wholesale calls it’s possible that A2Billing will start billing for a call before it is even answered (resulting in incorrect CDR/billing records). The reason that this happens is that Asterisk is answering the call, when it doesn’t need to. It only needs to answer the call if you want to play audio to the caller (balance, time remain etc) but you would not normally do this for SIP/wholesale calls.
If you have this problem there are a few different things to check –
1 – Asterisk dial plan not answering the call
Ensure that in your Asterisk dial plan (this will vary depending how you’ve got A2Billing set up) that the context that SIP calls are getting passed to does not have an ‘Answer’ line in it. The context I use is called ‘a2billing-sip’ and here is the entry in my /etc/asteirsk/extensions_custom.conf –
exten => _X.,1,DeadAGI(a2billing.php|2)
exten => _X.,n,Hangup
Note that this is putting the call through to A2Billing agi-conf2, which will be useful in the next step.
2 -A2Billing is not set to answer the call
In the AGI-CONF that you are using for the SIP calls ensure that ‘answer_call’ is set to no –
3 – Ensure there is no ‘H’ on the Asterisk dial command
As in the fake ring section above I’ve found that having a ‘H’ in the A2Billing dialcommand_param can cause Asterisk to answer the call and cause incorrect billing. If you still have the issue after trying number 1 and 2 above then try taking the ‘H’ out of the dialcommand_param in the AGI-CONF that you are using.