How to test Freepbx and A2billing working together properly

I have installed Freepbx and A2Billing, i am able to make calls with Freepbx extentions and SIP Tunk. However i am not able to register any accounts created on A2Billing. I have properly configured both with the document available on the net. Anyone please let me know how to test both FreePbx and A2billing are configured properly.

A2Billing and FreePBX don’t really work together in any way.

What do you need A2billing for (or conversely why do you need FreePBX)?

What is your application?

I have a situation where a call comes in through a trunk to an inbound route and then to an extension / a2billing. When setting the destination of the inbound route to the extension it works as expected. But when I set it to a2billing I get ‘the number you have dialed is not in service please check the number and try again.’

*** Here is the log when inbound routes destination is set to an extension ***
– Executing [s@from-pstn:1] ExecIf(“SIP/66.193.176.35-00000ba6”, “1?Set(__FROM_DID=s)”) in new stack
– Executing [s@from-pstn:2] ExecIf(“SIP/66.193.176.35-00000ba6”, “1 ?Set(CALLERID(name)=12063700000)”) in new stack
– Executing [s@from-pstn:3] Set(“SIP/66.193.176.35-00000ba6”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [s@from-pstn:4] Set(“SIP/66.193.176.35-00000ba6”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [s@from-pstn:5] Goto(“SIP/66.193.176.35-00000ba6”, “from-did-direct,1000,1”) in new stack
– Goto (from-did-direct,1000,1)
– Executing [1000@from-did-direct:1] ExecIf(“SIP/66.193.176.35-00000ba6”, “0?Set(__RINGTIMER=0)”) in new stack
– Executing [1000@from-did-direct:2] Macro(“SIP/66.193.176.35-00000ba6”, “exten-vm,novm,1000,0,0,0”) in new stack

Notice how it continues after the Goto (from-did-direct,1000,1)

*** Here is the log when inbound routes destination is set to a2billing ***
– Executing [s@from-pstn:1] ExecIf(“SIP/66.193.176.35-00000b9f”, “1?Set(__FROM_DID=s)”) in new stack
– Executing [s@from-pstn:2] ExecIf(“SIP/66.193.176.35-00000b9f”, “1 ?Set(CALLERID(name)=12063700000)”) in new stack
– Executing [s@from-pstn:3] Set(“SIP/66.193.176.35-00000b9f”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [s@from-pstn:4] Set(“SIP/66.193.176.35-00000b9f”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [s@from-pstn:5] Goto(“SIP/66.193.176.35-00000b9f”, “a2billing,s,1”) in new stack
– Goto (a2billing,s,1)

Notice how it stops after the goto. I would expect it to execute the a2billing context in the extensions_custom.conf file

*** extensions_custom.conf ***
[a2billing]
; CallingCard application
exten => _X.,1,Answer
exten => _X.,2,Wait(2)
exten => _X.,3,DeadAGI(a2billing.php)
exten => _X.,4,Wait(2)
exten => _X.,5,Hangup

I would appreciate any help that I can get.

Thanks!

There’s a setting when creating accounts in A2Billing to add SIP or IAX peers. It puts the account details in a separate file, and you need to make sure you’re including that file into your Asterisk config (from /etc/asterisk/sip_registrations_custom.conf I would guess.) I’ve always used FreePBX to manage accounts and only use A2Billing for outbound billing, sorry I can’t be more specific. A2Billing forums will probably be able to offer more support than what you will find here.

Check the A2Billing AGI logs. Crank up logging and verbosity levels if needed. Check your PHP logs as well. Also, unless you’re running like Asterisk 1.4 you shouldn’t be using DeadAGI.