Sometimes it’s difficult to determine why a call is failing in A2Billing. It’s possible to turn on some very detailed logging from the A2Billing script that can often be used to track down the issue.
The option to turn on debug logging (in A2Billing v1.4+) can be found under System Settings / Global List / agi-confX. You need to turn it on for the agi-conf that your call will be using. Turn logging up to 4 like this –
The location of the log output can vary, mine get written to /var/log/a2billing/a2billing_agi.log.
The amount of logs written can be a little overwhelming, normally over 200 lines! However, looking towards the end of the log can often reveal the problem.
Here are a few examples.
1 – This is a SIP client making a call that failed. You can see the message saying that ‘RateEngine didnt succeed to match the dialed number’, so there’s something wrong with the rate cards –
2 – In this example the customer has a zero credit balance. It’s more difficult to find being a little further up the logs and not generating a specific error –
3 – In this final example we can see that A2Billing tries to place the call. The first line shows it setting the trunk to ‘inuse+1’. The 2nd line shows it trying to make the call. The 3rd line shows the ‘inuse-1’ meaning it gave up. In this case the trunk name was invalid and didn’t exist in Asterisk. Maybe not straight forward but the debug log gives a good clue as to where the problem lies –
When finished debugging always remember to set ‘logging_level’ back to ‘0’. Leaving it at ‘4’ will really slow the system down with calls flowing through it.