Integrating FreePBX with A2Billing
Please note that if using Asterisk 1.6 or later the pipe (|) symbols below need changing to commas (,)
There are several reasons you may want to integrate FreePBX and A2Billing. Whether you’re just using FreePBX to setup trunks for your a2billing calling card system or you use FreePBX and want to route the outbound calls via a2billing to do least cost routing.
There are 2 things you need to do to integrate the two. The first is to add the following to extensions_custom.conf
/etc/asterisk/extensions_custom.conf
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup
[a2billing-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|callback)
exten => _X.,n,Hangup
[a2billing-cid-callback]
exten => _X.,1,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1|cid-callback)
exten => _X.,n,Hangup
[a2billing-all-callback]
exten => _X.,1,DeadAGI(a2billing.php|1|all-callback|1) ;last parameter is the callback area code
exten => _X.,n,Hangup
[a2billing-predictivedialer]
exten => _X.,1,DeadAGI(a2billing.php|1|predictivedialer)
exten => _X.,n,Hangup
[a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php|1|did)
exten => _X.,2,Hangup
[a2billing-voucher]
exten => _X.,1,DeadAGI(a2billing.php|1|voucher)
;exten => _X.,1,AGI(a2billing.php|1|voucher|1) ; will add 44 in front of the callerID for the CID authentication
exten => _X.,n,Hangup
[a2billing-sip]
exten => _X.,1,DeadAGI(a2billing.php|2)
exten => _X.,n,Hangup
The number after the a2billing.php| is the agi-conf in the a2billing.conf file that the call is passed to. This allows you to have different settings for certain types of calls such as whether the caller can chose the a2billing language or whether their balance is read to them. You will need to restart Asterisk or ‘reload sip’ to get the changes above to take effect.
You might not need all of the contexts above but it won’t hurt to put them in there.
The second thing to do is create the following Custom Destinations in FreePBX -
Custom Destination: a2billing,${EXTEN},1 Description: a2billing
Custom Destination: a2billing-callback,${EXTEN},1 Description: a2billing-callback
Custom Destination: a2billing-cid-callback,${EXTEN},1 Description: a2billing-cid-callback
Custom Destination: a2billing-did,${EXTEN},1 Description: a2billing-did
Custom Destination: a2billing-sip,${EXTEN},1 Description: a2billing-sip
Again, you might not need all of those or you might need extra ones but you get the idea.
So you should end up with something like this -

These destinations can then be used in Inbound Routes, IVRs, etc in FreePBX to pass the call to A2Billing
Last updated by .
Related posts:
- Using a2billing for caller ID callback
- Using callwithus with Asterisk, FreePBX and A2Billing
- Getting started with FreePBX – Part 6 Cheap phone calls using DISA and Callback
Avaialble systems include FreePBX, PBX-in-a-Flash, Elastix, A2Billing and FusionPBX.
More details and prices can be found at sysadminman.net

Ron:
I implemented these two integration features but my AGI does not seem to work.
It says it is executing
— Executing [6465556666@custom-a2billing-did:1] DeadAGI(“SIP/174.36.235.155-00000001″, “a2billing.php|1|did”) in new stack
but the call just keeps ringing and is never answered.
Here’s the whole session:
== Using SIP RTP CoS mark 5
13 March 2010, 7:34 pm== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
— Executing [6465556666@from-sip-external:1] NoOp(“SIP/174.36.235.155-00000001″, “Received incoming SIP connection from unknown peer to 6465556666″) in new stack
— Executing [6465556666@from-sip-external:2] Set(“SIP/174.36.235.155-00000001″, “DID=6465556666″) in new stack
— Executing [6465556666@from-sip-external:3] Goto(“SIP/174.36.235.155-00000001″, “s,1″) in new stack
— Goto (from-sip-external,s,1)
— Executing [s@from-sip-external:1] GotoIf(“SIP/174.36.235.155-00000001″, “1?checklang:noanonymous”) in new stack
— Goto (from-sip-external,s,2)
— Executing [s@from-sip-external:2] GotoIf(“SIP/174.36.235.155-00000001″, “0?setlanguage:from-trunk,6465556666,1″) in new stack
— Goto (from-trunk,6465556666,1)
— Executing [6465556666@from-trunk:1] Set(“SIP/174.36.235.155-00000001″, “__FROM_DID=6465556666″) in new stack
— Executing [6465556666@from-trunk:2] Gosub(“SIP/174.36.235.155-00000001″, “cidlookup,cidlookup_1,1″) in new stack
— Executing [cidlookup_1@cidlookup:1] Set(“SIP/174.36.235.155-00000001″, “CALLERID(name)=”) in new stack
— Executing [cidlookup_1@cidlookup:2] Return(“SIP/174.36.235.155-00000001″, “”) in new stack
— Executing [6465556666@from-trunk:3] ExecIf(“SIP/174.36.235.155-00000001″, “1 ?Set(CALLERID(name)=2015556666)”) in new stack
— Executing [6465556666@from-trunk:4] Set(“SIP/174.36.235.155-00000001″, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
— Executing [6465556666@from-trunk:5] Set(“SIP/174.36.235.155-00000001″, “CALLERPRES()=allowed_not_screened”) in new stack
— Executing [6465556666@from-trunk:6] Goto(“SIP/174.36.235.155-00000001″, “custom-a2billing-did,6465556666,1″) in new stack
— Goto (custom-a2billing-did,6465556666,1)
— Executing [6465556666@custom-a2billing-did:1] DeadAGI(“SIP/174.36.235.155-00000001″, “a2billing.php|1|did”) in new stack
— Executing [6465556666@custom-a2billing-did:2] Hangup(“SIP/174.36.235.155-00000001″, “”) in new stack
== Spawn extension (custom-a2billing-did, 6465556666, 2) exited non-zero on ‘SIP/174.36.235.155-00000001′
matt:
Hi, in a2billing, for the agi-conf1, have you got answer call set to yes?
13 March 2010, 9:53 pmkkhan:
I want to make calls from freepbx extension and route them to a2billing (on the same machine) for billing purposes. No matter what I do I couldn’t achieve it. Can someone point me to the right direction?
10 April 2010, 10:28 pmmatt:
Hi kkhan, did you try doing the steps above? How far are you getting? What version of Asterisk and A2Billing are you running?
11 April 2010, 8:59 pmMilton:
Hi Mat, many thanks for this tutorial, it saved me from driving me mad, I followed this tutorial an got a2billing integrated with free pbx, the problem shows up when i dialed the custom destination through an IVR, as soon as i press the opt enable for that purpose the call hung up with the following errors msg, it works fine if I re-direct the DID to that custom destination by passing the IVR. any suggestion would be greatly appreciate.
== CDR updated on SIP/Main-ISN-000000d8
— Executing [9@ivr-3:1] DBdel(“SIP/Main-ISN-000000d8″, “”) in new stack
— Executing [9@ivr-3:2] Set(“SIP/Main-ISN-000000d8″, “__NODEST=”) in new stack
— Executing [9@ivr-3:3] Goto(“SIP/Main-ISN-000000d8″, “a2billing-sip|9|1″) in new stack
— Goto (a2billing-sip,9,1)
Regards.
14 May 2010, 3:29 pmmatt:
Hi Milton,
What does your entry for a2billing-sip look like in the Asterisk config files. Normally found in extensions_custom.conf if you’re running FreePBX.
Also, that looks like it’s being passed to agi-conf9 in a2billing, is that correct? Is that agi-conf set to answer the call?
Matt
15 May 2010, 10:58 amCristhian:
Hi, good material….seems to me like this should work for incoming calls.
what about outgoing calls on the same machine???
is there any additional configuration necessary to send the calls from FreePBX to A2Billing???
Cristhian.
23 June 2010, 10:48 pmmatt:
Hi Cristhian, I’ve written a walkthrough about routing FreePBX calls via A2Billing. It’s based on Elastix but the principals are you same. You can find it here – http://sysadminman.net/blog/2010/using-a2billing-to-account-for-extension-calls-in-elastix-1307
27 June 2010, 10:18 pmYunier:
hello matt
i am using freepbx 2.7 and a2billing 1.7, i have the custom destinations and the extensions_custom.conf configured to use a2billing-sip but in this version of a2billing the agi-conf are not in a2billing.conf and i really don’t know how to configure it. my problem is that the calls are beeing charged to the clients before they star talking, i mean when a client finish dialing the call star counting as connected before even ring. do you know how can i fix this, please help me.
bye
YUNIER
MY [a2billing-sip] is like yours and so is my custom destination.
30 June 2010, 3:49 ammatt:
Hi Yunier, yes since version 1.4 all the settings (well, most) that were in a2billing.conf have been moved to the GUI so you can now edit the AGI-CONF settings there.
How are your clients connecting to a2billing. Are the sip customers using their own soft/hard phones to connect to a2billing, or are they extensions in FreePBX?
Matt
30 June 2010, 11:06 pmyunier:
hi matt
thank you very much for your answer. it looks like the problem was in the carrier’s end they told me they made some changes and now everything is working fine so far. yes the most of my clients are sip customers using PAP2 to connect to a2billing.
thanks again
3 July 2010, 5:56 pmThom:
Hi Math,
Thanks for this tut. it helped a lot. but I have the same problem as described above. my a2billing does not work. Please look below
— Executing [7046064441@a2billing:1] Answer(“SIP/2000-00000032″, “”) in new stack
— Executing [7046064441@a2billing:2] Wait(“SIP/2000-00000032″, “1″) in new stack
— Executing [7046064441@a2billing:3] DeadAGI(“SIP/2000-00000032″, “a2billing.php|1″) in new stack
— Executing [7046064441@a2billing:4] Hangup(“SIP/2000-00000032″, “”) in new stack
== Spawn extension (a2billing, 7046064441, 4) exited non-zero on ‘SIP/2000-00000032′
I checked ag conf and it is allowed to answered, I tried to go around it but without success. Would you have an idea. Is there a way to test that AGI is functionning properly?
Thanks a million
13 August 2010, 9:50 ammatt:
Hi Thom, it looks like the a2billing.php is not even running. I would double check you have copied the php files to the correct place plus the lib folder.
13 August 2010, 9:53 amKaizerSoze:
To Thom and maybe others this line: exten => _X.,n,DeadAGI(a2billing.php|1) in a new 1.7 version of a2bill should be: exten => _X.,n,DeadAGI(a2billing.php,1) I think
18 October 2010, 1:00 pmI spent a lot of time on errors like yours try it and say helps or not
Integración FreePBX y A2Billing | Manual A2Billing | Tutorial A2Billing:
[...] artículo esta basado de la configuración encontrada acá. Esta entrada fue publicada en Configuración, Instalación y etiquetada a2billing pbx, [...]
30 October 2010, 9:50 pmRodo:
Hi Matt,
My Asterisk : 1.6.2, FreePBX : 2.7 and A2Billing : 1.3.0.
I have configured the follow me extension 2000 with Custom Destinations “a2billing”. When i try to call extension 2000 from extension 2005 the call hangup. Shouldn´t I be asked by a2billing to “Please enter your card number”?.
16 January 2011, 6:35 pmmatt:
If you’re tryinng to create an access number much better to do it with an inbound route, rather than a follow me on an extension – http://sysadminman.net/blog/2009/getting-started-with-a2billing-part-3-creating-an-access-did-473
16 January 2011, 7:55 pmRodo:
I don´t have an access number. I just want that 2005 extension make an external call and transfer it to a2billing and it ask “Please enter your card number”. Is this posible?
16 January 2011, 9:00 pmmatt:
I would do it by creating a custom trunk and outbound route like this – http://sysadminman.net/blog/2010/create-a-custom-trunk-in-elastix-for-use-with-a2billing-1282
17 January 2011, 12:55 amChristina:
Hi. I’m trying to access feature codes in FreePBX from a A2Billing. So I have a inbound route setup to a2billing custom destination. Great. I have this exact configuration. What would I need to do to accomplish this? Thanks! How would I be able to call the features codes from A2Billing? Thanks!
20 January 2011, 9:05 pmmatt:
What feature code/s was it you wanted to use?
One option would be to add the feature code you wanted to the context of your a2billing clients. For example if your SIP clients where in a context called a2billing-sip that normally looked like this -
[a2billing-sip]
exten => _X.,1,DeadAGI(a2billing.php,2)
exten => _X.,n,Hangup
you could add the echo test feature code to it like this -
[a2billing-sip]
exten => *43,1,Answer
exten => *43,n,Wait(1)
exten => *43,n,Playback(demo-echotest)
exten => *43,n,Echo()
exten => *43,n,Playback(demo-echodone)
exten => *43,n,Hangup
exten => _X.,1,DeadAGI(a2billing.php,2)
exten => _X.,n,Hangup
Your customers in the a2billing-sip context would then be able to dial the echo test. You can find the feature code contexts in here – /etc/asterisk/extensions_additional.conf
20 January 2011, 9:43 pmChristina:
Thanks for the response… Is there supposed to be a space between the two entries. I want to have them be able to access the My Voicemail (*97) voicemail feature code Here’s what I’m going to put in:
[wholesale-eldan]
exten => *43,1,Answer
exten => *43,n,Wait(1)
exten => *43,n,Playback(demo-echotest)
exten => *43,n,Echo()
exten => *43,n,Playback(demo-echodone)
exten => *43,n,Hangup
exten => _X.,1,DeadAGI(a2billing.php|3)
exten => _X.,n,Hangup
Is this correction
This is the error I’m getting
[Jan 20 16:52:57] NOTICE[1537]: chan_sip.c:14847 handle_request_invite: Call from ’694200275387894′ to extension ‘*43′ rejected because extension not found.
Please help! Thanks!
20 January 2011, 10:53 pmmatt:
It should work with or without the space.
From the Asterisk prompt you should be able to see the new entries for that context -
*CLI> dialplan show wholesale-eldan
If that still doesn’t work your calls can’t be originating from that context.
Not sure implementing voicemail is going to be as easy as making access available though.
20 January 2011, 11:05 pmChristina:
How would I be able to do the voicemail then please? I really need this..
20 January 2011, 11:07 pmmatt:
The above should give your customers access to the voicemail system, but then you are going to have to setup mailboxes, etc.
Also, you’ll need to get incoming DIDs to forward to voicemail on no answer so they can be left a voicemail.
20 January 2011, 11:13 pmChristina:
Now I’m having issues: when I do that, I can get voicemail, but I can’t dialout…
[wholesale-eldan]
21 January 2011, 12:32 amexten => *97,1,Answer
exten => *97,2,VoiceMailMain()
exten => _X.,1,DeadAGI(a2billing.php|3)
exten => _X.,n,Hangup
Christina:
Hi Matt.
This is the context that I used to get it working:
[wholesale-eldan]
exten => *97,1,Answer
exten => *97,n,VoiceMailMain()
exten => _X.,1,DeadAGI(a2billing.php|3)
exten => _X.,n,Hangup
Now, I need to edit it to get it to not ask for the mailbox! Do you have any ideas on how that would work?
Thanks so much for everything!
21 January 2011, 12:55 ammatt:
Searching round there are a few different ways to do this -
http://forum.asterisk2billing.org/viewtopic.php?f=21&t=6712
http://www.allvoipsolutions.org/mydrupal/node/211
None are going to be too straight forward though!
21 January 2011, 1:10 amChristina:
the voicemail feature has been added since a2billing 1.4, so i didn’t really need to make any core adjustments. what i did though was create an extension in freepbx with the same accountcode as the sip friend, and enabled voicemail. this way, when i use the $CDR(accountcode) variable, it picks that up, transfers it to ask for a password and done! i also setup the second destination of the inbound did to the voicemailboz created in freepbx @from-internal, so after 20-30 seconds, it goes to voicemail. the client can now dial *98 and retrive voicemail. thanks so much for your help!
21 January 2011, 2:09 ammatt:
Thanks for taking the time to update. It should help others.
Matt
21 January 2011, 2:30 ameftekhar:
Hi
I install asterisk 1.8 and a2billing 1.7.
extensions_custom.conf here:
[a2billing]
exten => _X.,1,Answer(1)
exten => _X.,n,Agi(a2billing.php,1)
exten => h,1,Hangup
i also add a trunk in a2billing which peer information is put in sip.conf
[Novotel]
host=96.31.85.14
username=11100
secret=11100
type=peer
when i dial a number shows the following:
== Using SIP RTP CoS mark 5
— Executing [8801925180640@a2billing:1] Answer(“SIP/08588-0000000c”, “1″) in new stack
— Executing [8801925180640@a2billing:2] AGI(“SIP/08588-0000000c”, “a2billing.php,1″) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
AGI Tx >> agi_request: a2billing.php
AGI Tx >> agi_channel: SIP/08588-0000000c
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1296159906.12
AGI Tx >> agi_version: 1.8.2.2
AGI Tx >> agi_callerid: 08588
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 8801925180640
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: a2billing
AGI Tx >> agi_extension: 8801925180640
AGI Tx >> agi_priority: 2
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode: 08588
AGI Tx >> agi_threadid: -1275430000
AGI Tx >> agi_arg_1: 1
AGI Tx >>
AGI Rx << GET VARIABLE IDCONF
AGI Tx >> 200 result=0
AGI Rx << ANSWER
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE 0 "#" 0
AGI Tx >> 200 result=0 endpos=0
AGI Rx << SET VARIABLE CHANNEL(language) "en"
AGI Tx >> 200 result=1
AGI Rx << STREAM FILE prepaid-you-have "#" 0
— Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=9440
AGI Rx << SAY NUMBER 5 ""
— Playing ‘digits/5.gsm’ (language ‘en’)
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE dollars "#" 0
— Playing 'dollars' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=7200
AGI Rx << STREAM FILE vm-and "#" 0
— Playing 'vm-and' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=4800
AGI Rx << SAY NUMBER 75 ""
— Playing ‘digits/70.gsm’ (language ‘en’)
— Playing ‘digits/5.gsm’ (language ‘en’)
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE prepaid-cents "#" 0
— Playing 'prepaid-cents' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=5600
AGI Rx << SET CALLERID 08588
AGI Tx >> 200 result=1
AGI Rx << CHANNEL STATUS SIP/08588-0000000c
AGI Tx >> 200 result=6
AGI Rx << GET DATA prepaid-press4-info 5000 1 #
— Playing ‘prepaid-press4-info.slin’ (language ‘en’)
AGI Tx >> 200 result= (timeout)
AGI Rx << GET DATA prepaid-press9-new-speeddial 5000 1
— Playing ‘prepaid-press9-new-speeddial.gsm’ (language ‘en’)
AGI Tx >> 200 result= (timeout)
AGI Rx << STREAM FILE prepaid-you-have "#" 0
— Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=9440
AGI Rx << SAY NUMBER 185 ""
— Playing ‘digits/1.gsm’ (language ‘en’)
— Playing ‘digits/hundred.gsm’ (language ‘en’)
— Playing ‘digits/80.gsm’ (language ‘en’)
— Playing ‘digits/5.gsm’ (language ‘en’)
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE prepaid-minutes "#" 0
— Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=6240
AGI Rx << STREAM FILE vm-and "#" 0
— Playing 'vm-and' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=4800
AGI Rx << SAY NUMBER 20 ""
— Playing ‘digits/20.gsm’ (language ‘en’)
AGI Tx >> 200 result=0
AGI Rx << STREAM FILE prepaid-seconds "#" 0
— Playing 'prepaid-seconds' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=6400
AGI Rx << SET CALLERID 11001
AGI Tx >> 200 result=1
AGI Rx << EXEC DIAL sip/008801925180640@Novotel|60|HCL(11120000:61000:30000)
— AGI Script Executing Application: (DIAL) Options: (sip/008801925180640@Novotel|60|HCL(11120000:61000:30000))
== Using SIP RTP CoS mark 5
— Called 008801925180640@Novotel|60|HCL(11120000:61000:30000)
— SIP/Novotel|60|HCL(11120000:61000:30000)-0000000d is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE ANSWEREDTIME
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CONGESTION)
AGI Rx << STREAM FILE prepaid-dest-unreachable "#" 0
— Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
AGI Tx >> 200 result=0 endpos=25760
— AGI Script a2billing.php completed, returning 0
— Executing [h@a2billing:1] Hangup(“SIP/08588-0000000c”, “”) in new stack
== Spawn extension (a2billing, h, 1) exited non-zero on ‘SIP/08588-0000000c’
I also try with IP address insteade of trunk name Novotel.
Plz suggest me.
27 January 2011, 8:45 pmChristina:
hi eftekhar, i’m not really famililar with asterisk 1.8, but is your configuration for the trunk correction
DIAL sip/008801925180640@Novotel|60|HCL(11120000:61000:30000)
— AGI Script Executing Application: (DIAL) Options: (sip/008801925180640@Novotel|60|HCL(11120000:61000:30000))
== Using SIP RTP CoS mark 5
— Called 008801925180640@Novotel|60|HCL(11120000:61000:30000)
— SIP/Novotel|60|HCL(11120000:61000:30000)-0000000d is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
this means that either you have something wrong, or your provider does. and number two, your password is EXTREMELY soft. did you add any trunk information in a2billing? you need to do that, as well as rates and callplan etc.
27 January 2011, 9:03 pmDaniel:
hi matt a long time ago i am trying to configure asterisk 1.6.2 and a2billing dial plan with agi config i am changing to 1_6 and it does not work but when i change it to 1_4 it works can someone please tell me how i can get it to work this is my dial plan
[a2billing]
exten => _.,1,Answer(750)
exten => _.,n,DeadAgi(a2billing.php,1)
exten => _.,n,Hangup
[a2billing-callback]
exten => _.,1,DeadAgi(a2billing.php,1,callback)
exten => _.,n,Hangup
[a2billing-cid-callback]
exten => h,1,Hangup
exten => _.,1,DeadAgi(a2billing.php,1,cid-callback,) ;last parameter is the callback area code
exten => _.,n,Hangup
[a2billing-all-callback]
exten => _.,1,DeadAgi(a2billing.php,1,all-callback,) ;last parameter is the callback area code
exten => _.,n,Hangup
[a2billing-predictivedialer]
exten => _.,1,DeadAgi(a2billing.php,1,predictivedialer)
exten => _.,n,Hangup
[a2billing-did]
exten => _.,1,DeadAgi(a2billing.php,1,did)
exten => _.,2,Hangup
[a2billing-voucher]
exten => _.,1,Answer(1)
exten => _.,n,DeadAgi(a2billing.php,1,voucher)
;exten => _.,n,AGI(a2billing.php,1,voucher,) ; will add 44 in front of the callerID for the CID authentication
exten => _.,n,Hangup
; for sip clients – agi-conf2 (make sure a2billing-sip set as context for a2billing customer)
[a2billing-sip]
exten => _X.,1,DeadAGI(a2billing.php,2)
exten => _X.,n,Hangup
when i try to make a call i get a message in asterisk
Everyone is busy/congested at this time (1:0/1/0)
i will appreciate it if someone tells wheat i am doing wrong
Thank you
6 April 2011, 7:11 pmmatt:
Hi Daniel,
How are you making a call? Is this via a calling card access number or a SIP client/phone?
6 April 2011, 10:32 pmDaniel:
Hi matt thank your for replying to my question.
i am trying every way i can a call. When i change in agi-conf1 to 1_4 everything works fine but when i change it to 1_6 i cant make a call i am changing 1_6 because i am using asterisk 1.6.2.17.2 . I think that somewhere in asterisk there need to be some changes but i am not sure
thank your
7 April 2011, 6:31 pmmatt:
One thing that changing the setting to 1_6 does is automatically replace any ‘|’ in the dial string with ‘,’ (this was a change with Asterisk 1.6).
If you are working OK with that setting set to 1_4 I would not worry. It looks like you already have all the custom conexts using commas.
Are you seeing any other negative effects of using the setting at 1_4?
7 April 2011, 7:43 pmSamuel:
Hello Matt,
Thanks for all over your help here…
I have asterisk 1.4&a2b 1.9.
I add the following context into a2billing dialplan:
[a2billing_echotest]
exten => 123,1,Playback(demo-echotest)
exten => 123,n,Echo
exten => 123,n,Playback(demo-echodone)
But when I try to test it placing a call to 123, in cli I see:
— Accepting AUTHENTICATED call from 95.++.++.++:
> requested format = gsm,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw|alaw|gsm|g729),
> priority = mine
— Executing [123@a2billing:1] NoOp(“IAX2/0****-3832″, “A2Billing Start”) in new stack
— Executing [123@a2billing:2] DeadAGI(“IAX2/0***-3832″, “a2billing.php|2″) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
— AGI Script a2billing.php completed, returning 0
— Hungup ‘IAX2/0***-3832′
And as you see, the call is doped…
Why I’m having that?
18 May 2011, 3:13 pmmatt:
I think you need to turn on a2billing debugging (which you can find in the AGI-CONF settings you are using). If you set debug to 4 this will give you detailed feedback about the a2billing.php script. Don’t leave it that way in production though as it will slow things down.
18 May 2011, 4:08 pmSamuel:
Thanks Matt for so fast prompt…
Kindly bellow the cli:
Connected to Asterisk 1.4.40 currently running on sipcel (pid = 1004)
Verbosity was 3 and is now 4
— Accepting AUTHENTICATED call from 95.*******:
> requested format = gsm,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw|alaw|gsm|g729),
> priority = mine
— Executing [123@a2billing:1] NoOp(“IAX2/0***-3881″, “A2Billing Start”) in new stack
— Executing [123@a2billing:2] DeadAGI(“IAX2/0****-3881″, “a2billing.php|2″) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
— AGI Script a2billing.php completed, returning 0
— Hungup ‘IAX2/0****-3881′
Regards,
18 May 2011, 4:12 pmmatt:
That’s just Asterisk logs. A2Billing has it’s own detailed logging and inbetween these 2 lines -
Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
— AGI Script a2billing.php completed, returning 0
You should see 50 lines or so of debug from a2billing if it’s switched on (in the a2billing GUI)
18 May 2011, 4:31 pmSamuel:
It seem to be returning the error for prefix issue… kindly see below:
18 May 2011, 4:39 pm[18/05/2011 15:35:51]:[file:a2billing.php - line:396 - uniqueid:1305732951.32]:[CallerID:***]:[CN:06604]:[TARIFF ID -> 1]
[18/05/2011 15:35:51]:[file:Class.A2Billing.php - line:881 - uniqueid:1305732951.32]:[CallerID:***]:[CN:06604]:[[CALL 2 DID]]
[18/05/2011 15:35:51]:[file:Class.A2Billing.php - line:896 - uniqueid:1305732951.32]:[CallerID:***]:[CN:06604]:[DESTINATION ::> 123]
[18/05/2011 15:35:51]:[file:Class.A2Billing.php - line:1017 - uniqueid:1305732951.32]:[CallerID:***]:[CN:06604]:[ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)]
[18/05/2011 15:35:51]:[CallerID:***]:[CN:****]:[[exit]]
matt:
Yes, it’s just not matching a rate to the number you dialled. Have a go with Rates/Simulator in the GUI, that will tell you if your Rate Card is working the way you expect.
18 May 2011, 4:41 pmSamuel:
Yes, but I’m dealing this as an echo test, as I said, I add the echo test context in a2billing dialplan as:
[a2billing_echotest]
exten => 123,1,Playback(demo-echotest)
exten => 123,n,Echo
exten => 123,n,Playback(demo-echodone)
So, how should I add the rate for that, and to which trunk mapp it, if yes?
18 May 2011, 4:47 pmFreePBX 1.8.1.4 (CentOS 5.5) & A2Billing 1.9.4 (Stable) inside VirtualBox 4.0.8 Installation Notes « BinaryGuru:
[...] I followed instructions for integrating A2Billing into FreePBX from this web site: http://sysadminman.net/blog/2009/integrating-freepbx-with-a2billing-621 [...]
4 June 2011, 3:15 amAli:
Hi Matt,
11 June 2011, 9:39 pmappreciate your efforts for the very helpful tutorial. i followed it using freepbx latest,asterisk 1.6 and a2billing 1.9.4.. all worked fine but my problem is a common i think.. outbound call is answered and starts billing while it still ringing the called party. I am using Freepbx extensions to be billed through a2billing.
do you have any idea how to avoid this problem ??
matt:
Hi Ali,
I’m going to write a blog post about this as it’s a common problem. I know 3 places to check -
1 – In the dial plan (extensions_custom.conf?) ensure you don’t have an Answer line for the context you are using
11 June 2011, 11:21 pm2 – In the AGI-CONF that you are using ensure answer_call is set to no
3 – In the AGI-CONF that you uare using ensure there is no ‘H’ ‘r’ or ‘R’ as part of the dial_command
Samuel:
Hello Matt, and other friends,
I have new server running asterisk 1.8.3&a2billing 1.9.4, everything it’s working properly…
But, I have been created agi2 to handle voip reselling, where in I have dialcommand_param_sipiax_friend=,60,HiL(3600000:61000:30000) , and answer_call=no
And int he dialplan I have:
[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,AGI(a2billing.php,2)
exten => _X.,n,Hangup
I’m facing FAS problems, that asterisk is answering the calls, meanwhile it still in progress, so it start billing the traunk user…
I removed the answer line from the dialcommand, but when i do that i get
[Quote]chan_sip.c:21619 handle_request_invite: Call from ‘s’ to extension ‘XXXXXXXXX’ rejected because extension not found in context ‘a2billing’.[/Quote]
Any other idea to figure out the FAS problem, please?
Thanks in advance!
23 June 2011, 1:10 pmmatt:
Hi,
Did you check out the incorrect billing port here to see if it helps? – http://sysadminman.net/blog/2011/a2billing-fake-ring-and-incorrect-billing-for-wholesale-2318
23 June 2011, 5:01 pmSamuel:
Thanks Matt, I just checked it, it’s not working according to that, but in this case I’d put my answer there, to unify the thread to that issue, so my question again it’s here: http://sysadminman.net/blog/2011/a2billing-fake-ring-and-incorrect-billing-for-wholesale-2318
23 June 2011, 6:08 pmSamuel:
Hello Matt,
What about if I don’t want to use Freepbx, so I have running asterisk 1.8.4 with a2billing 1.9.4, and everything it’s outgoing fine. Just i wanted to created the inbound context.
The custom extensions which you refer her, for freepbx, how can i create them in extensions.conf file?
Cause i try to make:
exten => 7777,1,Dial(a2billing,${EXTEN},1)
But asterisk is not finding that extensions, and it’s not working, how can i create that extensions in asterisk files directly without freepbx?
Thanks in advance.
3 July 2011, 11:34 ammatt:
If not using FreePBX then you should just need to make sure that the line is in a context that is being loaded by Asterisk.
3 July 2011, 7:45 pmSamuel:
Thanks Matt for your prompt.
I’m not sure if I understand you, or I’m misunderstanding something… in this example, i wanted to appoint the inbound test ext. 777 for the a2billing calling card application, as you made in freepbx: Custom Destination: a2billing,${EXTEN},1 Description: a2billing .
So, as you said, I add that ext. into the a2billing context as below:
[a2billing]
exten => _0.,1,Verbose(1,${CONTEXT} – ${EXTEN} – ${CALLERID(all)} – ${STRFTIME($
exten => _0.,n,Wait(1)
exten => _0.,n,AGI(a2billing.php,2)
exten => _0.,n,Wait(1)
exten => _0.,n,Hangup
;;Echo Test Ext.
exten => 123,1,Playback(demo-echotest)
exten => 123,n,Echo
exten => 123,n,Playback(demo-echodone
;;Inbound Context
exten => 7777,1,Dial(a2billing,${EXTEN},1)
But when i call from an asterisk ext. to the ext. 123, i get correctly the echo test, but when i call to 7777, asterisk is showing this:
[Jul 4 07:33:25] WARNING[12928]: app_dial.c:1950 dial_exec_full: Dial argument takes format (technology/[device:]number1)
== Spawn extension (a2billing, 7777, 1) exited non-zero on ‘SIP/5769-0000001a’
What I’m mistaking?
Thanks again,
4 July 2011, 8:39 amSamuel:
Sorry, this forum don’t allow me to edit my own messages, so I’d answer my previous question, by my ownself…
it’s really simple, creating inbound ext. and appoint them to the refereed context and put into a2billing agi conf. I mean, just create ext. for all dids, for example, and appoint it to a2billing-did for the inbound did…
So, asterisk&a2billing without freepbx.
Regards,
5 July 2011, 11:08 pmmatt:
Many thanks for the update. Glad you sorted it out. Matt.
6 July 2011, 8:09 amAhmed:
Hello Matt,
i should say first that i lernt a lot from your tutorial, so keep on your good job. i have done the things you made in this tutorail 1 to 1, i am using an elastix machine. so i have 2 trunks which is working fine with elastix extinsions, and my a2billing is also working fine and i can make calls through trunk1 with a2billing. but when i am using the trunk2 i cant get calls, the call debug see as:
Aug 16 15:10:34 VERBOSE [25550] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
Aug 16 15:10:34 WARNING [2921] chan_sip.c:Retransmission timeout reached on transmission 3590654a7c370c8675e6ae8259e1a78f@myip:5060 for seqno 102 (Critical Request) — See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32123ms with no response
Aug 16 15:10:34 VERBOSE [25550] res_agi.c:– AGI Script Executing Application: (DIAL) Options: (SIP/voip_info/00966534455119|60|HRrL(8428000:61000:30000))
Aug 16 15:10:34 WARNING [25550] pbx.c: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (Dial(SIP/voip_info/00966534455119|60|HRrL(8428000:61000:30000)))
Aug 16 15:10:34 VERBOSE [25550] netsock2.c: == Using SIP RTP TOS bits 184
Aug 16 15:10:34 VERBOSE [25550] netsock2.c: == Using SIP RTP CoS mark 5
Aug 16 15:10:34 VERBOSE [25550] app_dial.c: — Called SIP/voip_info/00966534455119|60|HRrL(8428000:61000:30000)
i hope you can help this time also as you did last time .. -:)
16 August 2011, 2:13 pmmatt:
Hi Ahmed,
I think you should set the Asterisk version to 1_6 in the A2Billing config (it’s probably set to 1_4 now).
Cheers, Matt
16 August 2011, 2:17 pmTim:
Hi, Matt!
After installing Asterisk 1.8.7.1 and FreePBX 1.9, I followed your guides and everything works perfectly now!
However, sometimes when I call my DID, it asks for the PIN and works smoothly and times it plays the “the number you’ve dialed is not in service” What could it be from?
Cheers,
27 October 2011, 6:14 amTim
matt:
Hi Tim,
I’d guess that either the call is coming from a different IP sometimes,or the CLID number is being presented differently for some calls.
You could do ‘sip set debug on’ at the console and try to see what’s happening to the call (don’t forget to ‘sip set debug off’ when you’re done!)
27 October 2011, 11:45 amJermaine Gray:
Hi matt am trying to route incoming call through a2billing but am getting a message saying the part you are trying to reach is unavailable. i configure my custom destination in the tutorial i do know what else t do. please help
19 November 2011, 10:45 pmElliot:
Hi
20 November 2011, 7:10 pmI am having problems making calls from my a2billing.
I cam make calls from elastix freepbx.
but when i make call with my account in a2billing after prompting to enter destination number or a direct dial over sip phone, its finds the correct route and carrier but hangs and disconnect.
any help will be appriciated.
The issue started after i upgraged to the latest satble Elastix.
A2billing was setup manually before. with Admin, Agent, and cutomer interface.
Elliot:
ok i forgot. this the line it stops
20 November 2011, 7:14 pmCalled SIP/xx.xx.xx.xx./004xxxxxxxxxxxxxx|60|HRrL(1260000:61000:30000)
matt:
What version of Asterisk are you running? If it’s version 1.6+ then they should be ‘,’ now not ‘|’. Changing Asterisk version to ’1_6′ in A2Billing global settings should fix that.
20 November 2011, 7:17 pmmatt:
Jermaine – You really need to use the Asterisk console to look at the debugging. You can do something like ‘core set verbosity 20′ and ‘core set debug 20′ and check the output when you call. If the call gets to A2Billing you can turn on the debug there – http://sysadminman.net/blog/2011/a2billing-troubleshooting-verbose-logging-2417
20 November 2011, 7:19 pmElliot:
Hi Matt thanks for the reply i am using version Asterisk 1.8.7.0
20 November 2011, 7:54 pmmatt:
Yes, you want to set it to 1_6 then. 1_8 is not a valid version number in A2Billing yet.
20 November 2011, 7:59 pmElliot:
do i also replace this with a (,)? thanks |60|HiL(%timeout%:61000:30000)
20 November 2011, 8:02 pmmatt:
You can replace them all if you want. Changing that setting should do it for you though in the background.
20 November 2011, 8:04 pmJermaine:
Hi Matte
am now able to route incoming call to a2billing but i can call sip friendly account. when i try to call a sip account from my DID the it go to my did voice mail. am not sure how to run the log your ask me to run can you provided more detail.
my setting are:
[custom-a2billing]
;for call through service
exten => _X.,1,deadAGI(a2billing.php,1)
exten => _X.,n,Hangup
[custom-a2billing-did]
20 November 2011, 8:08 pm;To deliver DID and bill for them
exten => _X.,1,Answer
exten => _X.,n,Wait(3)
exten => _X.,1,deadAGI(a2billing.php,1,did)
exten => _X.,2,Hangup
Jermaine:
also i got this log from a2billing
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:1090]:[CallerID:8765648121]:[CN:07748]:[[USEDRATECARD=0]]
20 November 2011, 8:11 pm[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:777]:[CallerID:8765648121]:[CN:07748]:[ft2c_package_offer : 1 ; 0 ; 0]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:607]:[CallerID:8765648121]:[CN:07748]:[[CC_RATE_ENGINE_CALCULCOST: K=0 - CALLDURATION:6 - freetimetocall_used=0]]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:642]:[CallerID:8765648121]:[CN:07748]:[[TEMP - CC_RATE_ENGINE_CALCULCOST: 1. COST: 0]:[ (6/60) * 0 ]]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:719]:[CallerID:8765648121]:[CN:07748]:[[CC_RATE_ENGINE_CALCULCOST: K=0 - BUYCOST: 0 - SELLING COST: 0]]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:824]:[CallerID:8765648121]:[CN:07748]:[[CC_RATE_ENGINE_UPDATESYSTEM: usedratecard K=0 - (sessiontime=6 :: dialstatus=ANSWER :: buycost=0 :: cost=0 : signe_cc_call=-: signe=+)]]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:848]:[CallerID:8765648121]:[CN:07748]:[[CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1321819286.8', 'SIP/BroadVoice-00000008', '07748', '', CURRENT_TIMESTAMP - INTERVAL 6 SECOND , '6', '9543371446', 'ANSWER', now(), '0', '-0', '', '', 'local', '4', '4', '349', '4', '8765648121', '0', '0', '0', '0')]]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:851]:[CallerID:8765648121]:[CN:07748]:[[CC_asterisk_stop 1.1: SQL: DONE : result=1]]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:869]:[CallerID:8765648121]:[CN:07748]:[[CC_asterisk_stop 1.2: SQL: UPDATE cc_card SET credit= credit+0 , redial='9543371446' , lastuse=now(), nbused=nbused+1 WHERE username='07748']]
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:874]:[CallerID:8765648121]:[CN:07748]:[UPDATE cc_trunk SET secondusedreal = secondusedreal + 6 WHERE id_trunk='4']
[20/11/2011 15:02:17]:[file:Class.RateEngine.php - line:878]:[CallerID:8765648121]:[CN:07748]:[UPDATE cc_tariffplan SET secondusedreal = secondusedreal + 6 WHERE id='4']
[20/11/2011 15:02:17]:[file:a2billing.php - line:309]:[CallerID:8765648121]:[CN:07748]:[[a2billing account stop]]
[20/11/2011 15:02:17]:[file:a2billing.php - line:169]:[CallerID:8765648121]:[CN:07748]:[[CHANNEL STATUS : = Channel is down and available]]
[20/11/2011 15:02:17]:[file:a2billing.php - line:170]:[CallerID:8765648121]:[CN:07748]:[[CREDIT : 0][CREDIT MIN_CREDIT_2CALL : 0]]
[20/11/2011 15:02:17]:[file:Class.A2Billing.php - line:634]:[CallerID:8765648121]:[CN:07748]:[[CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='07748']]
[20/11/2011 15:02:17]:[CallerID:8765648121]:[CN:07748]:[[STOP - EXIT]]
Elliot:
IT works THANKS A LOT, THANKS A LOT. you have been very helpful.
20 November 2011, 8:19 pmElliot:
Hi Matt Thanks again. Is there anyway i could contact you personally.
20 November 2011, 8:42 pmmatt:
Just drop me a line from the contact page on the main website.
20 November 2011, 8:43 pmmatt:
Hi Jermaine – you’ve got 1,n,1,2 in your context. That should be 1,n,n,n
20 November 2011, 8:46 pmElliot:
Hello everybody,
i have beene able to setup my a2billing. The calling card is working without problem but when i call with my sip softphone i get the error below
extension ’00xxxxxxxxxx’ rejected because extension not found in context ‘a2billing’
Any help will be appreciated
25 November 2011, 9:55 pmThanks
matt:
Hi Elliot,
Tough to answer without knowing your setup. This should help though – http://sysadminman.net/blog/2011/using-a2billing-for-wholesale-or-residential-services-1920
If you read from “Finally we’re going to create a customer account….”
Sounds like you’re not using a valid SIP account to try and connect with.
25 November 2011, 10:22 pmElliot:
Thanks matt,
25 November 2011, 10:55 pmI have just noticed that my sip accounts are using the wrong contex.
I have (a2billing) for my calling cards and a2billing-sip for my sip/Iax accounts. but cant make any call if my sip accounts are set to a2billing-sip contex. I treid changing the contex to something else but once i reload asterisk everything comes back to the old contex again. (a2billing-sip)
Thanks in advance
matt:
If you’ve got things set up like here in your Asterisk config files then a2billing-sip is correct – http://sysadminman.net/blog/2009/integrating-freepbx-with-a2billing-621
That will use AGI-CONF2 to process calls made via SIP. AGI-CONF2 would normally be set to not answer the call, not read any voice prompts, use the DNID passed to it etc…
26 November 2011, 8:53 amJermaine:
Hi matt i install the new elastix 2.2 and a2billing 1.4 but am not able to used the say setting for my inbound calling to a2billing please advise or point me to the nearest instruction.
6 December 2011, 4:02 pmJermaine:
Hi matt
13 December 2011, 2:27 pmThank you very much for your help my server is up and running. But i have only have one question. can i add more context to a2billing-sip to allowing the IVR to prompt me for entering the a2billing sip friend account to call.
jain:
Hi there, I was wondering if you please tell me how can I install A2Billing on my fresh installed FreePBX. I am not able to download it
using given instruction..please help.
Regards,
24 January 2012, 12:53 amjain
matt:
Did you check out the install notes that come with A2Billing. If so they should get you most of the way there.
24 January 2012, 12:10 pmTia:
hi,
I am running asterisk 1.8.4, freepbx 2.8 and a2billing 1.6. I have followed your tutorial with no success. right now I can make call using extension created by freepbx and customer created in a2billing but i cannot link the two together. This means my call (extension created in freepbx) is never routed to a2billing.
Thanks,
17 February 2012, 6:46 pmTia
Ricky:
Hello Matt,
I have installes trixbox 2.8 and a2billing 1.9.4
i configured a2billing folowing your video from youtube. now my problem is that when i change my inbound route set destination from IVR to CUSTOM DESTINATIONS (a2billing) and i make a call simulation using 7777 the system just hangs up the call. Any idea? ANY HELP WILL BE VERY APPRECIATED. Thanks
here is how my extensions_custom.conf looks like:
; This file contains example extensions_custom.conf entries.
; extensions_custom.conf should be used to include customizations
; to AMP’s Asterisk dialplan.
; All custom context should contain the string ‘custom’ in it’s name
; Extensions in AMP have access to the ‘from-internal’ context.
; The context ‘from-internal-custom’ is included in ‘from-internal’ by default
#include extensions_hud.conf
[from-internal-custom]
;1234,1,Playback(demo-congrats) ; extensions can dial 1234
;1234,2,Hangup()
;h,1,Hangup()
;include => custom-recordme ; extensions can also dial 5678
; custom-count2four,s,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-count2four]
;s,1,SayDigits(1234)
;s,2,Hangup
; custom-recordme,5678,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-recordme]
;exten => 5678,1,Wait(2)
;exten => 5678,2,Record(/tmp/asterisk-recording:gsm)
;exten => 5678,3,Wait(2)
;exten => 5678,4,Playback(/tmp/asterisk-recording)
;exten => 5678,5,Wait(2)
;exten => 5678,6,Hangup
[custom-meetme3]
exten => s,1,Answer
exten => s,n,Wait(3)
exten => s,n,CBMysql()
exten => s,n,Hangup
[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php,1)
exten => _X.,n,Hangup
[a2billing-callback]
exten => _X.,1,DeadAGI(a2billing.php,1,callback)
exten => _X.,n,Hangup
[a2billing-cid-callback]
exten => _X.,1,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php,1,cid-callback)
exten => _X.,n,Hangup
[a2billing-all-callback]
exten => _X.,1,DeadAGI(a2billing.php,1,all-callback,1) ;last parameter
is the callback area code
exten => _X.,n,Hangup
[a2billing-predictivedialer]
exten => _X.,1,DeadAGI(a2billing.php,1,predictivedialer)
exten => _X.,n,Hangup
[a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php|1|did)
exten => _X.,2,Hangup
[a2billing-voucher]
exten => _X.,1,DeadAGI(a2billing.php|1|voucher)
;exten => _X.,1,AGI(a2billing.php|1|voucher|1) ; will add 44 in front of the callerID for the CID
authentication
exten => _X.,n,Hangup
[a2billing-sip]
28 February 2012, 4:17 amexten => _X.,1,DeadAGI(a2billing.php,2)
exten => _X.,n,Hangup
matt:
I’d try not using an IVR, but just putting an Inbound Route straight through to A2Billing to test. Otherwise it would be a case of turning up Asterisk debugging and watching what is happening to the call.
28 February 2012, 9:47 amRicky:
How can i turn up Asterisk Debugging?
28 February 2012, 11:10 pmmatt:
From the asterisk console you should look at the ‘core set debug’ and ‘core set verbosity’ commands.
29 February 2012, 9:43 amlyly:
Hi,
7 May 2012, 6:18 amI want to configure Callback on a2billing. Please tell me how to config and test it if you know. Thanks so much
ulrich:
bonjour Matt
17 May 2012, 11:27 amj’ai utiliser freepbx distro 1.8 a2billing 1.9.4
j’ai suivi le tuto du debut jusqu’a la fin ce je ne comprend est que apres avoir creer mes customers sous a2billing et que je clique sur les bouton sip ou iax pour generer les compte sur asterisk ça ne fait rien du tout
svp j’ai besoin d’aide.merci pour le tuto