Hello,
I set up a server with FreePBX and A2billing on Ubuntu 10.10 and Asterisk 1.6. Everything seems to work fine except that I am not able to dial correctly from an A2billing user.
I have 3 different carriers but only 1 of them seems to work with A2billing, the remaining two keep giving circuit busy. They work fine if I dial from a FreePBX user but not from A2billing user.
I tried disabling the carriers in FreePBX and configured them manually in sip_custom.conf
If I use exten => _X.,1,Dial(SIP/provider/${EXTEN}) in my extensions_custom.conf then I am able to dial fine but if I use exten => _X.,1,DeadAGI(a2billing.php,1) then the call gets circuit busy. I am confused why this is happening. I have set the correct trunk details.
I enabled AGI debugging and here's what I get when I dial from A2billing context:
Quote:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [16312222222@a2billing:1] DeadAGI("SIP/5988654088-0000016b", "a2billing.php,1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
<SIP/5988654088-0000016b>AGI Tx >> agi_request: a2billing.php
<SIP/5988654088-0000016b>AGI Tx >> agi_channel: SIP/5988654088-0000016b
<SIP/5988654088-0000016b>AGI Tx >> agi_language: en
<SIP/5988654088-0000016b>AGI Tx >> agi_type: SIP
<SIP/5988654088-0000016b>AGI Tx >> agi_uniqueid: 1314821990.363
<SIP/5988654088-0000016b>AGI Tx >> agi_version: 1.6.2.6
<SIP/5988654088-0000016b>AGI Tx >> agi_callerid: 5988654088
<SIP/5988654088-0000016b>AGI Tx >> agi_calleridname: unknown
<SIP/5988654088-0000016b>AGI Tx >> agi_callingpres: 0
<SIP/5988654088-0000016b>AGI Tx >> agi_callingani2: 0
<SIP/5988654088-0000016b>AGI Tx >> agi_callington: 0
<SIP/5988654088-0000016b>AGI Tx >> agi_callingtns: 0
<SIP/5988654088-0000016b>AGI Tx >> agi_dnid: 16312222222
<SIP/5988654088-0000016b>AGI Tx >> agi_rdnis: unknown
<SIP/5988654088-0000016b>AGI Tx >> agi_context: a2billing
<SIP/5988654088-0000016b>AGI Tx >> agi_extension: 16312222222
<SIP/5988654088-0000016b>AGI Tx >> agi_priority: 1
<SIP/5988654088-0000016b>AGI Tx >> agi_enhanced: 0.0
<SIP/5988654088-0000016b>AGI Tx >> agi_accountcode: 5988654088
<SIP/5988654088-0000016b>AGI Tx >> agi_threadid: 140431866164992
<SIP/5988654088-0000016b>AGI Tx >> agi_arg_1: 1
<SIP/5988654088-0000016b>AGI Tx >>
<SIP/5988654088-0000016b>AGI Rx << GET VARIABLE IDCONF
<SIP/5988654088-0000016b>AGI Tx >> 200 result=0
<SIP/5988654088-0000016b>AGI Rx << SET VARIABLE CHANNEL(language) "en"
<SIP/5988654088-0000016b>AGI Tx >> 200 result=1
<SIP/5988654088-0000016b>AGI Rx << SET CALLERID 5988654088
<SIP/5988654088-0000016b>AGI Tx >> 200 result=1
<SIP/5988654088-0000016b>AGI Rx << CHANNEL STATUS SIP/5988654088-0000016b
<SIP/5988654088-0000016b>AGI Tx >> 200 result=4
<SIP/5988654088-0000016b>AGI Rx << EXEC DIAL SIP/provider/16312222222,60,RrL(3600000:61000:30000)
-- AGI Script Executing Application: (DIAL) Options: (SIP/provider/16312222222,60,RrL(3600000:61000:30000))
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Everyone is busy/congested at this time (1:0/0/1)
<SIP/5988654088-0000016b>AGI Tx >> 200 result=0
<SIP/5988654088-0000016b>AGI Rx << GET VARIABLE ANSWEREDTIME
<SIP/5988654088-0000016b>AGI Tx >> 200 result=1 ()
<SIP/5988654088-0000016b>AGI Rx << GET VARIABLE DIALSTATUS
<SIP/5988654088-0000016b>AGI Tx >> 200 result=1 (CHANUNAVAIL)
<SIP/5988654088-0000016b>AGI Rx << CHANNEL STATUS SIP/5988654088-0000016b
<SIP/5988654088-0000016b>AGI Tx >> 200 result=4
<SIP/5988654088-0000016b>AGI Rx << GET DATA prepaid-enter-dest 6000 20
<SIP/5988654088-0000016b>AGI Tx >> 200 result=-1
<SIP/5988654088-0000016b>AGI Rx << CHANNEL STATUS SIP/5988654088-0000016b
<SIP/5988654088-0000016b>AGI Tx >> 200 result=4
<SIP/5988654088-0000016b>AGI Rx << GET DATA prepaid-enter-dest 6000 20
<SIP/5988654088-0000016b>AGI Tx >> 200 result=-1
<SIP/5988654088-0000016b>AGI Rx << HANGUP
<SIP/5988654088-0000016b>AGI Tx >> 200 result=1
-- <SIP/5988654088-0000016b>AGI Script a2billing.php completed, returning -1
Please help me with this issue. Thanks.