FreePBX Version 2.8.1.4
Asterisk 1.8.3.2
DAHDI Version: 2.4.0 Echo Canceller: MG2
Having trouble with making multiple outgoing calls through Dahdi trunks. First outbound call succeeds. Second gets a busy signal without actually even picking up the trunk.
Have created OutBound Route:
[outrt-1] ; CallOut
include => outrt-1-custom
exten => _1NXXXXXXXXX,1,Macro(user-callerid,SKIPTTL,)
exten => _1NXXXXXXXXX,n,Noop(Calling Out Route: CallOut)
exten => _1NXXXXXXXXX,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})})
exten => _1NXXXXXXXXX,n,ExecIf($["${KEEPCID}"!=“TRUE” & ${LEN(${DB(AMPUSER/${AMPUSER}/outboundcid)})}=0 & ${LEN(${TRUNKCIDOVERRIDE})}=0]?Set(TRUNKCIDOVERRIDE=13126441650))
exten => _1NXXXXXXXXX,n,Set(_NODEST=)
exten => _1NXXXXXXXXX,n,Macro(record-enable,${AMPUSER},OUT,)
exten => _1NXXXXXXXXX,n,Macro(dialout-trunk,3,${EXTEN},)
exten => _1NXXXXXXXXX,n,Macro(dialout-trunk,2,${EXTEN},)
exten => _1NXXXXXXXXX,n,Macro(dialout-trunk,1,${EXTEN},)
exten => _1NXXXXXXXXX,n,Macro(dialout-trunk,5,${EXTEN},)
exten => _1NXXXXXXXXX,n,Macro(dialout-trunk,4,${EXTEN},)
exten => _1NXXXXXXXXX,n,Macro(outisbusy,)
; end of [outrt-1]
It indicates a list of trunks to try in order. When second call is made, only the first trunk is tried. It never falls through to any other trunk.
Log of second call:
[May 13 13:13:56] VERBOSE[5506] netsock2.c: == Using SIP RTP TOS bits 184
[May 13 13:13:56] VERBOSE[5506] netsock2.c: == Using SIP RTP CoS mark 5
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] Macro(“SIP/202-00000035”, “user-callerid,SKIPTTL,”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] Set(“SIP/202-00000035”, “AMPUSER=202”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:2] GotoIf(“SIP/202-00000035”, “0?report”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/202-00000035”, “1?Set(REALCALLERIDNUM=202)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:4] Set(“SIP/202-00000035”, “AMPUSER=202”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:5] Set(“SIP/202-00000035”, “AMPUSERCIDNAME=Steve”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:6] GotoIf(“SIP/202-00000035”, “0?report”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:7] Set(“SIP/202-00000035”, “AMPUSERCID=202”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:8] Set(“SIP/202-00000035”, “CALLERID(all)=“Steve” <202>”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:9] GotoIf(“SIP/202-00000035”, “1?continue”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-user-callerid,s,18)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:18] Set(“SIP/202-00000035”, “CALLERID(number)=202”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:19] Set(“SIP/202-00000035”, “CALLERID(name)=Steve”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:20] NoOp(“SIP/202-00000035”, “Using CallerID “Steve” <202>”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:2] NoOp(“SIP/202-00000035”, “Calling Out Route: CallOut”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:3] Set(“SIP/202-00000035”, “MOHCLASS=default”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:4] ExecIf(“SIP/202-00000035”, “1?Set(TRUNKCIDOVERRIDE=13126441650)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:5] Set(“SIP/202-00000035”, “_NODEST=”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:6] Macro(“SIP/202-00000035”, “record-enable,202,OUT,”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/202-00000035”, “1?check”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-record-enable,s,4)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:4] ExecIf(“SIP/202-00000035”, “0?MacroExit()”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:5] GotoIf(“SIP/202-00000035”, “0?Group:OUT”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-record-enable,s,15)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:15] GotoIf(“SIP/202-00000035”, “0?IN”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:16] ExecIf(“SIP/202-00000035”, “1?MacroExit()”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:7] Macro(“SIP/202-00000035”, “dialout-trunk,4,13122019260,”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] Set(“SIP/202-00000035”, “DIAL_TRUNK=4”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:2] GosubIf(“SIP/202-00000035”, “0?sub-pincheck,s,1”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/202-00000035”, “0?disabletrunk,1”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:4] Set(“SIP/202-00000035”, “DIAL_NUMBER=13122019260”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:5] Set(“SIP/202-00000035”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:6] Set(“SIP/202-00000035”, “OUTBOUND_GROUP=OUT_4”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:7] GotoIf(“SIP/202-00000035”, “1?nomax”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-dialout-trunk,s,9)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:9] GotoIf(“SIP/202-00000035”, “0?skipoutcid”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:10] Set(“SIP/202-00000035”, “DIAL_TRUNK_OPTIONS=”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:11] Macro(“SIP/202-00000035”, “outbound-callerid,4”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] ExecIf(“SIP/202-00000035”, “0?Set(CALLERPRES()=)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:2] ExecIf(“SIP/202-00000035”, “0?Set(REALCALLERIDNUM=202)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/202-00000035”, “1?normcid”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-outbound-callerid,s,6)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:6] Set(“SIP/202-00000035”, “USEROUTCID=”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:7] Set(“SIP/202-00000035”, “EMERGENCYCID=”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:8] Set(“SIP/202-00000035”, “TRUNKOUTCID=3126441651”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:9] GotoIf(“SIP/202-00000035”, “1?trunkcid”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-outbound-callerid,s,12)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:12] ExecIf(“SIP/202-00000035”, “1?Set(CALLERID(all)=3126441651)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:13] ExecIf(“SIP/202-00000035”, “0?Set(CALLERID(all)=)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:14] ExecIf(“SIP/202-00000035”, “1?Set(CALLERID(all)=13126441650)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/202-00000035”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:12] GosubIf(“SIP/202-00000035”, “0?sub-flp-4,s,1”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:13] Set(“SIP/202-00000035”, “OUTNUM=13122019260”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:14] Set(“SIP/202-00000035”, “custom=DAHDI/3”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/202-00000035”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:16] Macro(“SIP/202-00000035”, “dialout-trunk-predial-hook,”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] MacroExit(“SIP/202-00000035”, “”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:17] GotoIf(“SIP/202-00000035”, “0?bypass,1”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:18] GotoIf(“SIP/202-00000035”, “0?customtrunk”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:19] Dial(“SIP/202-00000035”, “DAHDI/3/13122019260,300,”) in new stack
[May 13 13:13:56] WARNING[22698] app_dial.c: Unable to create channel of type ‘DAHDI’ (cause 17 - User busy)
[May 13 13:13:56] VERBOSE[22698] app_dial.c: == Everyone is busy/congested at this time (1:1/0/0)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:20] NoOp(“SIP/202-00000035”, “Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 17”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:21] Goto(“SIP/202-00000035”, “s-BUSY,1”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-dialout-trunk,s-BUSY,1)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/202-00000035”, “Dial failed due to trunk reporting BUSY - giving up”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:2] PlayTones(“SIP/202-00000035”, “busy”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:3] Busy(“SIP/202-00000035”, “20”) in new stack
[May 13 13:13:56] VERBOSE[22698] app_macro.c: == Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on ‘SIP/202-00000035’ in macro ‘dialout-trunk’
[May 13 13:13:56] VERBOSE[22698] pbx.c: == Spawn extension (from-internal, 13122019260, 7) exited non-zero on ‘SIP/202-00000035’
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] Macro(“SIP/202-00000035”, “hangupcall”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/202-00000035”, “1?skiprg”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-hangupcall,s,4)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:4] GotoIf(“SIP/202-00000035”, “1?skipblkvm”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-hangupcall,s,7)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:7] GotoIf(“SIP/202-00000035”, “1?theend”) in new stack
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Goto (macro-hangupcall,s,9)
[May 13 13:13:56] VERBOSE[22698] pbx.c: – Executing [[email protected]:9] Hangup(“SIP/202-00000035”, “”) in new stack
[May 13 13:13:56] VERBOSE[22698] app_macro.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/202-00000035’ in macro ‘hangupcall’
[May 13 13:13:56] VERBOSE[22698] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/202-00000035’
macro-dialout-trunk does not seem to report the trunk status correctly. It seems that somehow fallthrough the the next trunk is not working. Not sure exactly how it is supposed to work, as I have no working logs to compare to.
Anyone have any ideas? This is important as this is now in production.
Steve