Hi
i am trying to configure a calling card with a DID number with a2billing and trixbox.
the inbound call is transfer to a2billing then agi script start asking for the number to dial
but instead of dialing my trunk outbound i am getting an incoming call Loop Detected.
i do know how to change that.
could someone please tell how to fix it
thanks
i am using this context in trixbox
custom-a2billing,${EXTEN},1
here is my extensions_custom.conf
[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "Local/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit
[a2biling-did]
exten => _.,1,Goto(from-trunk,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
[a2billing]
exten => s,1,NoOp(A2Billing Start)
exten => s,n,Answer()
exten => s,n,Wait(2)
;exten => s,Goto(a2billing,${EXTEN},1)
exten => s,n,DeadAGI(a2billing.php,1,${EXTEN})
exten => s,n,Wait(2)
exten => s,n,Hangup
[custom-a2billing]
;for call through service
exten => s,1,NoOp(A2Billing Start)
exten => s,n,Answer()
exten => s,n,Wait(2)
;exten => s,Goto(a2billing,${EXTEN},1)
exten => s,n,DeadAGI(a2billing.php,1)
exten => s,n,Wait(2)
exten => s,n,Hangup
[custom-a2billing-did]
;To deliver DID and bill for them
exten => s,1,deadAGI(a2billing.php,1,did)
exten => s,2,Hangup
and here is my console log
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Executing [s@from-trunk:1] Set("SIP/callwithus-00000008", "__FROM_DID=s") in new stack
-- Executing [s@from-trunk:2] Gosub("SIP/callwithus-00000008", "app-blacklist-check,s,1") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/callwithus-00000008", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Return("SIP/callwithus-00000008", "") in new stack
-- Executing [s@from-trunk:3] ExecIf("SIP/callwithus-00000008", "0 ?Set(CALLERID(name)=33xxxx)") in new stack
-- Executing [s@from-trunk:4] Set("SIP/callwithus-00000008", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [s@from-trunk:5] Set("SIP/callwithus-00000008", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [s@from-trunk:6] Goto("SIP/callwithus-00000008", "custom-a2billing,s,1") in new stack
-- Goto (custom-a2billing,s,1)
-- Executing [s@custom-a2billing:1] NoOp("SIP/callwithus-00000008", "A2Billing Start") in new stack
-- Executing [s@custom-a2billing:2] Answer("SIP/callwithus-00000008", "") in new stack
-- Executing [s@custom-a2billing:3] Wait("SIP/callwithus-00000008", "2") in new stack
-- SIP/callwithus-00000007 answered SIP/10-00000006
-- Executing [s@custom-a2billing:4] DeadAGI("SIP/callwithus-00000008", "a2billing.php,1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
-- <SIP/callwithus-00000008> Playing 'prepaid-enter-pin-number.gsm' (language 'en')
-- Playing 'prepaid-auth-fail' (escape_digits=#) (sample_offset 0)
-- ast_get_srv: SRV lookup for '_sip._UDP.sip.callwithus.com' mapped to host sip.callwithus.com, port 5060
-- <SIP/callwithus-00000008> Playing 'prepaid-enter-pin-number.gsm' (language 'en')
-- <SIP/callwithus-00000008> Playing 'prepaid-enter-dest.gsm' (language 'fr')
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
-- <SIP/callwithus-00000008> Playing 'digits/60.slin' (language 'fr')
-- <SIP/callwithus-00000008> Playing 'digits/6.slin' (language 'fr')
-- Playing 'prepaid-minutes' (escape_digits=#) (sample_offset 0)
-- AGI Script Executing Application: (DIAL) Options: (SIP/
[email protected],,60,HRrL(3960000:61000:30000))
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Called
[email protected] -- Got SIP response 482 "Loop Detected" back from 1x.xx.xx.xx
-- Now forwarding SIP/callwithus-00000008 to 'Local/005xxxxxxx@from-sip-external' (thanks to SIP/1x.xx.xx.xx-00000009)
-- Executing [005xxxxxx@from-sip-external:1] NoOp("Local/005xxxxxx@from-sip-external-cd50;2", "Received incoming SIP connection from unknown peer to 005xxxxxx") in new stack
-- Executing [005xxxxxxx@from-sip-external:2] Set("Local/005xxxxx@from-sip-external-cd50;2", "DID=005xxxxxx") in new stack
-- Executing [005xxxxxxx@from-sip-external:3] Goto("Local/005xxxxxx@from-sip-external-cd50;2", "s,1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("Local/005xxxxxx@from-sip-external-cd50;2", "0?from-trunk,005xxxxxxxxx,1") in new stack
-- Executing [s@from-sip-external:2] Set("Local/005xxxxxxxx@from-sip-external-cd50;2", "TIMEOUT(absolute)=15") in new stack
Channel will hangup at 2013-03-20 12:38:53.000 AST.