Hi,
I am trying to get a2billing to be able to route DIDs that are not for calling cards
In freepbx I added a custom destination: a2billing-did,s,1
Then in extensions_a2billing.conf I have this:
Code:
[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,2,MacroExit
[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php,${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup()
[a2billing]
exten => s,1,answer
exten => s,n,deadAGI(a2billing.php,2)
exten => s,n,Hangup
[a2billing-sip]
exten => _.,1,deadAGI(a2billing.php,3)
exten => _.,n,Hangup
[a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php|2|did)
exten => _X.,n,Hangup
This is what happens with inbound calls:
Code:
OM_DID=6465555555") in new stack
-- Executing [6465555555@from-trunk:2] ExecIf("IAX2/vitel-inbound-12672", "0 ?Set(CALLERID(name)=7185555555)") in new stack
-- Executing [6465555555@from-trunk:3] Set("IAX2/vitel-inbound-12672", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [6465555555@from-trunk:4] Set("IAX2/vitel-inbound-12672", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [6465555555@from-trunk:5] Goto("IAX2/vitel-inbound-12672", "a2billing-did,s,1") in new stack
-- Goto (a2billing-did,s,1)
-- Hungup 'IAX2/vitel-inbound-12672'
If anyone can get me going I'd appreciate it