Первый маршрут используется для переадресации при неответе (как misc dest указан номер телефона):
Код: Выделить всё
-- Called SIP/TRUNK1-2123456/89181234567
-- Got SIP response 503 "Service Unavailable" back from 1.2.3.4:5060
-- SIP/TRUNK1-2123456-00000755 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-dialout-trunk:23] NoOp("SIP/1992-00000754", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34") in new stack
-- Executing [s@macro-dialout-trunk:24] GotoIf("SIP/1992-00000754", "0?continue,1:s-CONGESTION,1") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
-- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/1992-00000754", "RC=34") in new stack
-- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/1992-00000754", "34,1") in new stack
-- Goto (macro-dialout-trunk,34,1)
-- Executing [34@macro-dialout-trunk:1] Goto("SIP/1992-00000754", "continue,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [continue@macro-dialout-trunk:1] NoOp("SIP/1992-00000754", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks") in new stack
-- Executing [continue@macro-dialout-trunk:2] Set("SIP/1992-00000754", "CALLERID(number)=1992") in new stack
-- Executing [89181234567@from-internal:7] Set("SIP/1992-00000754", "CALLERID(all)=") in new stack
-- Executing [89181234567@from-internal:8] Set("SIP/1992-00000754", "_KEEPCID=TRUE") in new stack
-- Executing [89181234567@from-internal:9] Goto("SIP/1992-00000754", "app-blackhole,zapateller,1") in new stack
-- Goto (app-blackhole,zapateller,1)
-- Executing [zapateller@app-blackhole:1] NoOp("SIP/1992-00000754", "Blackhole Dest: Play SIT Tone") in new stack
-- Executing [zapateller@app-blackhole:2] Answer("SIP/1992-00000754", "") in new stack
-- Executing [zapateller@app-blackhole:3] Zapateller("SIP/1992-00000754", "") in new stack
-- Auto fallthrough, channel 'SIP/1992-00000754' status is 'CONGESTION'
sip*CLI>
-- Attempting call on Local/s@tc-maint for application NoCDR() (Retry 1)
-- Called s@tc-maint
А это другой маршрут, используемый при прямом наборе, тут все работает как надо, получив отлуп от 1 транка, звонок успешно уходит через 2ой:
Код: Выделить всё
-- Called SIP/TRUNK1-2123456/89181234567
-- Got SIP response 503 "Service Unavailable" back from 1.2.3.4:5060
-- SIP/TRUNK1-2123456-00000757 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-dialout-trunk:23] NoOp("SIP/1992-00000756", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34") in new stack
-- Executing [s@macro-dialout-trunk:24] GotoIf("SIP/1992-00000756", "0?continue,1:s-CONGESTION,1") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
-- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/1992-00000756", "RC=34") in new stack
-- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/1992-00000756", "34,1") in new stack
-- Goto (macro-dialout-trunk,34,1)
-- Executing [34@macro-dialout-trunk:1] Goto("SIP/1992-00000756", "continue,1") in new stack
-- Goto (macro-dialout-trunk,continue,1)
-- Executing [continue@macro-dialout-trunk:1] NoOp("SIP/1992-00000756", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks") in new stack
-- Executing [continue@macro-dialout-trunk:2] Set("SIP/1992-00000756", "CALLERID(number)=1992") in new stack
-- Executing [89181234567@2123456-ALL:7] Macro("SIP/1992-00000756", "dialout-trunk,3,89181234567,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/1992-00000756", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1992-00000756", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1992-00000756", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/1992-00000756", "DIAL_NUMBER=89181234567") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/1992-00000756", "DIAL_TRUNK_OPTIONS=trL(720000:60000:29501)") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/1992-00000756", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1992-00000756", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1992-00000756", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/1992-00000756", "DIAL_TRUNK_OPTIONS=TL(720000:60000:29500)") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/1992-00000756", "outbound-callerid,3") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/1992-00000756", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/1992-00000756", "0?Set(REALCALLERIDNUM=1992)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/1992-00000756", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/1992-00000756", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/1992-00000756", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/1992-00000756", "TRUNKOUTCID=2123456") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/1992-00000756", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,14)
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/1992-00000756", "1?Set(CALLERID(all)=2123456)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/1992-00000756", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:16] ExecIf("SIP/1992-00000756", "1?Set(CALLERID(all)=2123456)") in new stack
-- Executing [s@macro-outbound-callerid:17] ExecIf("SIP/1992-00000756", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:18] Set("SIP/1992-00000756", "CDR(outbound_cnum)=2123456") in new stack
-- Executing [s@macro-outbound-callerid:19] Set("SIP/1992-00000756", "CDR(outbound_cnam)=") in new stack
[2015-01-22 00:21:39] WARNING[28305]: func_cdr.c:349 cdr_write_callback: CDR requires a value (CDR(variable)=value)
-- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/1992-00000756", "0?sub-flp-3,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/1992-00000756", "OUTNUM=89181234567") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/1992-00000756", "custom=SIP/TRUNK2-2123456") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1992-00000756", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)TL(720000:60000:29500))") in new stack
-- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/1992-00000756", "0?Set(DIAL_TRUNK_OPTIONS=TL(720000:60000:29500)M(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:17] Macro("SIP/1992-00000756", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1992-00000756", "") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1992-00000756", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:19] ExecIf("SIP/1992-00000756", "1?Set(CONNECTEDLINE(num,i)=89181234567)") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("SIP/1992-00000756", "1?Set(CONNECTEDLINE(name,i)=CID:2123456)") in new stack
-- Executing [s@macro-dialout-trunk:21] GotoIf("SIP/1992-00000756", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:22] Dial("SIP/1992-00000756", "SIP/TRUNK2-2123456/89181234567,300,TL(720000:60000:29500)") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/TRUNK2-2123456/89181234567
-- SIP/TRUNK2-2123456-00000758 is making progress passing it to SIP/1992-00000756
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'SIP/1992-00000756' in macro 'dialout-trunk'
== Spawn extension (2123456-ALL, 89181234567, 7) exited non-zero on 'SIP/1992-00000756'
-- Executing [h@2123456-ALL:1] Macro("SIP/1992-00000756", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/1992-00000756", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/1992-00000756", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] Hangup("SIP/1992-00000756", "") in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/1992-00000756' in macro 'hangupcall'
== Spawn extension (2123456-ALL, h, 1) exited non-zero on 'SIP/1992-00000756'