После каких-то моих манипуляций с настройками, перестали работать исходящие звонки.
В какой бы исходящий маршрут и транк не попадал звонок, в Dial() не передается имя канала, только номер.
Код: Выделить всё
Dial("PJSIP/714-0000000a", "/0670000008,,b(func-apply-sipheaders^s^1)")
Код: Выделить всё
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/714-0000000a", "DIAL_TRUNK=1") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/714-0000000a", "0?Set(DIAL_OPTIONS=)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf("PJSIP/714-0000000a", "0?sub-pincheck,s,1()") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERID(num)=714)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:5] GotoIf("PJSIP/714-0000000a", "0?disabletrunk,1") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:6] Set("PJSIP/714-0000000a", "DIAL_NUMBER=0670000008") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:7] Set("PJSIP/714-0000000a", "DIAL_TRUNK_OPTIONS=") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:8] Set("PJSIP/714-0000000a", "OUTBOUND_GROUP=OUT_1") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:9] Set("PJSIP/714-0000000a", "DIAL_TRUNK_OPTIONS=") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf("PJSIP/714-0000000a", "1?nomax") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx_builtins.c: Goto (macro-dialout-trunk,s,12)
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:12] GotoIf("PJSIP/714-0000000a", "0?skipoutcid") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:13] Macro("PJSIP/714-0000000a", "outbound-callerid,1") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/714-0000000a", "714") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/714-0000000a", "") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/714-0000000a", "") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:6] ExecIf("PJSIP/714-0000000a", "0?Set(REALCALLERIDNUM=714)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:7] ExecIf("PJSIP/714-0000000a", "0?Set(AMPUSER=714)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:8] GotoIf("PJSIP/714-0000000a", "1?normcid") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx_builtins.c: Goto (macro-outbound-callerid,s,12)
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:12] Set("PJSIP/714-0000000a", "USEROUTCID=") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:13] Set("PJSIP/714-0000000a", "EMERGENCYCID=") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:14] Set("PJSIP/714-0000000a", "TRUNKOUTCID=") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:15] GotoIf("PJSIP/714-0000000a", "1?trunkcid") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:20] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERID(all)=)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERID(all)=)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERID(all)=)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/714-0000000a", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:25] Set("PJSIP/714-0000000a", "CDR(outbound_cnum)=714") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-outbound-callerid:26] Set("PJSIP/714-0000000a", "CDR(outbound_cnam)=Иванов") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/714-0000000a", "0?sub-flp-1,s,1()") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:15] Set("PJSIP/714-0000000a", "OUTNUM=0670000008") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/714-0000000a", "custom=") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/714-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/714-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=M(confirm))") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:19] Macro("PJSIP/714-0000000a", "dialout-trunk-predial-hook,") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/714-0000000a", "") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/714-0000000a", "0?bypass,1") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/714-0000000a", "1?Set(CONNECTEDLINE(num,i)=0670000008)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:22] ExecIf("PJSIP/714-0000000a", "1?Set(CONNECTEDLINE(name,i)=CID:714)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:23] ExecIf("PJSIP/714-0000000a", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)714)") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:24] GotoIf("PJSIP/714-0000000a", "0?customtrunk") in new stack
[2018-10-04 08:55:56] VERBOSE[28512][C-0000000a] pbx.c: Executing [s@macro-dialout-trunk:25] Dial("PJSIP/714-0000000a", "/0670000008,,b(func-apply-sipheaders^s^1)") in new stack
Код: Выделить всё
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS}b(func-apply-sipheaders^s^1))
Код: Выделить всё
exten => s,1,Set(DIAL_TRUNK=${ARG1})
exten => s,n,ExecIf($["${DIRECTION}" = "INBOUND"]?Set(DIAL_OPTIONS=${STRREPLACE(DIAL_OPTIONS,T)}))
exten => s,n,GosubIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]?sub-pincheck,s,1())
exten => s,n,ExecIf($["${INTRACOMPANYROUTE}" = "YES" & ${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)} & "${AMPUSER}" != "${DB(AMPUSER/${AMPUSER}/cidnum)}"]?Set(CALLERID(num)=${DB(AMPUSER/${AMPUSER}/cidnum)}))
exten => s,n,GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk,1)
exten => s,n,Set(DIAL_NUMBER=${ARG2})
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS})
exten => s,n,Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK})
exten => s,n,Set(DIAL_TRUNK_OPTIONS=${IF($["${DB_EXISTS(TRUNK/${DIAL_TRUNK}/dialopts)}" = "1"]?${DB_RESULT}:${TRUNK_OPTIONS})})
exten => s,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}" = ""]?nomax)
exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
exten => s,n(nomax),GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid)
exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})
exten => s,n(skipoutcid),GosubIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]?sub-flp-${DIAL_TRUNK},s,1())
exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)})
exten => s,n,ExecIf($["${MOHCLASS}"!="default" & "${MOHCLASS}"!="" & "${FORCE_CONFIRM}"="" ]?Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}))
exten => s,n,ExecIf($["${FORCE_CONFIRM}"!="" ]?Set(DIAL_TRUNK_OPTIONS=${DIAL_TRUNK_OPTIONS}M(confirm)))
exten => s,n(gocall),Macro(dialout-trunk-predial-hook,)
exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)
exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(CONNECTEDLINE(num,i)=${DIAL_NUMBER}))
exten => s,n,ExecIf($[$["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""] & $["${CALLERID(name)}"!="hidden"]]?Set(CONNECTEDLINE(name,i)=CID:${CALLERID(number)}))
exten => s,n,ExecIf($[$["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""] & $["${CALLERID(name)}"="hidden"]]?Set(CONNECTEDLINE(name,i)=CID:(Hidden)${CALLERID(number)}))
exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS}b(func-apply-sipheaders^s^1))
exten => s,n,Noop(Dial failed for some reason with DIALSTATUS = ${DIALSTATUS} and HANGUPCAUSE = ${HANGUPCAUSE})
exten => s,n,GotoIf($["${ARG4}" = "on"]?continue,1:s-${DIALSTATUS},1)
exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)})
exten => s,n,Set(the_num=${CUT(OUT_${DIAL_TRUNK},$,2)})
exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)})
exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum)
exten => s,n(outnum),Set(the_num=${OUTNUM})
exten => s,n(skipoutnum),Dial(${pre_num:4}${the_num}${post_num},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
exten => s,n,Noop(Dial failed for some reason with DIALSTATUS = ${DIALSTATUS} and HANGUPCAUSE = ${HANGUPCAUSE})
exten => s,n,GotoIf($["${ARG4}" = "on"]?continue,1:s-${DIALSTATUS},1)
exten => s,n(chanfull),Noop(max channels used up)