exten => _X.,1,Noop(======================================================)
exten => _X.,n,Noop(=== Destination: ${EXTEN} , Caller ID: ${CALLERID(number)} ===)
exten => _X.,n,Noop(======================================================)
core set verbose 3
[startup_commands]
core set verbose 3 = yes
[options]
verbose=3
в лог попадают входящие звонки
[from-internal]
include => from-internal-xfer
include => bad-number
[from-internal-xfer]
include => from-internal-custom
include => from-internal-additional
...
exten => h,1,Macro(hangupcall)
[from-internal-additional]
include => from-internal-additional-custom
include => ...
...
include => outbound-allroutes
exten => h,1,Hangup
[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-...
...
include => outrt-...
exten => foo,1,Noop(bar)
когда использую exten => _.,1, то все есть
[from-internal-custom]
exten => _.,n,Goto(${outrt-13},${EXTEN},1)
[ Included context 'outbound-restricted-routes' created by 'pbx_config' ]
'_[+0-9]!' => 1. Macro(user-callerid,LIMIT) [pbx_config]
2. Set(ROUTEUSER=${IF($["${EXTTOCALL}"!=""]?${EXTTOCALL}:${AMPUSER})}) [pbx_config]
3. Set(ROUTEUSER=${IF($["${DB_EXISTS(AMPUSER/${ROUTEUSER}/cidnum)}"="1"]?${ROUTEUSER}:${NODEST})}) [pbx_config]
4. GotoIf($["${BLINDTRANSFER}" == ""]?notblind) [pbx_config]
5. Set(ENDPOINT=${CUT(BLINDTRANSFER,-,1)}) [pbx_config]
6. Set(ROUTEUSER=${CUT(ENDPOINT,/,2)}) [pbx_config]
[notblind] 7. GotoIf($[${LEN(${ROUTEUSER})}>0 & ${DB_EXISTS(AMPUSER/${ROUTEUSER}/outroute_hash)}]?${DB(AMPUSER/${ROUTEUSER}/outroute_hash)},${EXTEN},2:outbound-allroutes,${EXTEN},2) [pbx_config]
[ Included context 'outrt-5' created by 'pbx_config' ]
'_.' => 1. Macro(user-callerid,LIMIT,EXTERNAL,) [pbx_config]
2. Gosub(sub-record-check,s,1(out,${EXTEN},yes)) [pbx_config]
3. ExecIf($[ "${CALLEE_ACCOUNCODE}" != "" ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE})) [pbx_config]
4. Set(_ROUTEID=5) [pbx_config]
5. Set(_ROUTENAME=GERMAN ALL) [pbx_config]
6. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}) [pbx_config]
7. Set(_CALLERIDNAMEINTERNAL=${CALLERID(name)}) [pbx_config]
8. Set(_CALLERIDNUMINTERNAL=${CALLERID(num)}) [pbx_config]
9. Set(_EMAILNOTIFICATION=FALSE) [pbx_config]
10. Set(_NODEST=) [pbx_config]
11. Macro(dialout-trunk,10,${EXTEN},,off) [pbx_config]
12. Macro(dialout-trunk,9,${EXTEN},,off) [pbx_config]
13. Macro(dialout-trunk,2,${EXTEN},,off) [pbx_config]
14. Macro(outisbusy,) [pbx_config]
[ Included context 'outrt-10' created by 'pbx_config' ]
'_+790663[1-9]XXXX' => 1. Macro(user-callerid,LIMIT,EXTERNAL,) [pbx_config]
2. Gosub(sub-record-check,s,1(out,${EXTEN},yes)) [pbx_config]
3. ExecIf($[ "${CALLEE_ACCOUNCODE}" != "" ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE})) [pbx_config]
4. Set(_ROUTEID=10) [pbx_config]
5. Set(_ROUTENAME=BEELINE) [pbx_config]
6. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}) [pbx_config]
7. Set(_CALLERIDNAMEINTERNAL=${CALLERID(name)}) [pbx_config]
8. Set(_CALLERIDNUMINTERNAL=${CALLERID(num)}) [pbx_config]
9. Set(_EMAILNOTIFICATION=FALSE) [pbx_config]
10. Set(_NODEST=) [pbx_config]
11. Macro(dialout-trunk,10,${EXTEN},,off) [pbx_config]
12. Macro(dialout-trunk,9,${EXTEN},,off) [pbx_config]
13. Macro(dialout-trunk,2,${EXTEN},,off) [pbx_config]
14. Macro(dialout-trunk,8,${EXTEN},,off) [pbx_config]
15. Macro(outisbusy,) [pbx_config]
[ Included context 'outrt-13' created by 'pbx_config' ]
'_.' => 1. Macro(user-callerid,LIMIT,EXTERNAL,) [pbx_config]
2. Gosub(sub-record-check,s,1(out,${EXTEN},yes)) [pbx_config]
3. ExecIf($[ "${CALLEE_ACCOUNCODE}" != "" ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE})) [pbx_config]
4. Set(_ROUTEID=13) [pbx_config]
5. Set(_ROUTENAME=ALL) [pbx_config]
6. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}) [pbx_config]
7. Set(_CALLERIDNAMEINTERNAL=${CALLERID(name)}) [pbx_config]
8. Set(_CALLERIDNUMINTERNAL=${CALLERID(num)}) [pbx_config]
9. Set(_EMAILNOTIFICATION=FALSE) [pbx_config]
10. Set(_NODEST=) [pbx_config]
11. Macro(dialout-trunk,10,${EXTEN},,off) [pbx_config]
12. Macro(dialout-trunk,9,${EXTEN},,off) [pbx_config]
13. Macro(dialout-trunk,2,${EXTEN},,off) [pbx_config]
14. Macro(dialout-trunk,8,${EXTEN},,off) [pbx_config]
15. Macro(outisbusy,) [pbx_config]
[ Included context 'outrt-17' created by 'pbx_config' ]
'_.' => 1. Macro(user-callerid,LIMIT,EXTERNAL,) [pbx_config]
2. Gosub(sub-record-check,s,1(out,${EXTEN},yes)) [pbx_config]
3. ExecIf($[ "${CALLEE_ACCOUNCODE}" != "" ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE})) [pbx_config]
4. Set(_ROUTEID=17) [pbx_config]
5. Set(_ROUTENAME=DEV) [pbx_config]
6. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}) [pbx_config]
7. Set(_CALLERIDNAMEINTERNAL=${CALLERID(name)}) [pbx_config]
8. Set(_CALLERIDNUMINTERNAL=${CALLERID(num)}) [pbx_config]
9. Set(_EMAILNOTIFICATION=FALSE) [pbx_config]
10. Set(_NODEST=) [pbx_config]
11. Macro(dialout-trunk,120,${EXTEN},,off) [pbx_config]
12. Macro(dialout-trunk,121,${EXTEN},,off) [pbx_config]
13. Macro(outisbusy,) [pbx_config]
-= 5 extensions (64 priorities) in 5 contexts. =-
[outbound-restricted-routes-custom]
exten => _+X.,1,Noop(======================================================)
exten => _+X.,n,Noop(========= Context OUTBOUND-RESTRICTED-routes =========)
exten => _+X.,n,Noop(== Destination: ${EXTEN} , CID: ${CALLERID(number)} ==)
exten => _+X.,n,Noop(======================================================)
[outbound-allroutes-custom]
exten => _+X.,1,Noop(======================================================)
exten => _+X.,n,Noop(========== Context OUTBOUND-ALLROUTES-custom =========)
exten => _+X.,n,Noop(== Destination: ${EXTEN} , CID: ${CALLERID(number)} ==)
exten => _+X.,n,Noop(======================================================)
-- Executing [+79066357070@from-internal:7] GotoIf("PJSIP/703-0000129a", "1?restrictedroute-f1d221837338700dba31ee7cc452eec6,+79066357070,2:outbound-allroutes,+79066357070,2") in new stack
-- Goto (restrictedroute-f1d221837338700dba31ee7cc452eec6,+79066357070,2)
-- Executing [+79066358080@from-internal:1] NoOp("PJSIP/703-00000000", "======================================================") in new stack
-- Executing [+79066358080@from-internal:2] NoOp("PJSIP/703-00000000", "========== Context OUTBOUND-ALLROUTES-custom =========") in new stack
-- Executing [+79066358080@from-internal:3] NoOp("PJSIP/703-00000000", "== Destination: +79066358080 , CID: 703 ==") in new stack
-- Executing [+79066358080@from-internal:4] NoOp("PJSIP/703-00000000", "======================================================") in new stack
[outbound-restricted-routes]
include => outbound-restricted-routes-custom
exten => _[+0-9]!,1,Noop(======================================================)
exten => _[+0-9]!,n,Noop(========= Context OUTBOUND-RESTRICTED-routes =========)
exten => _[+0-9]!,n,Noop(== Destination: ${EXTEN} , CID: ${CALLERID(number)} ==)
exten => _[+0-9]!,n,Noop(======================================================)
...
exten => _[+0-9]!,n,Noop()
exten => _[+0-9]!,n,Macro(user-callerid,LIMIT)
exten => _[+0-9]!,n,Set(ROUTEUSER=${IF($["${EXTTOCALL}"!=""]?${EXTTOCALL}:${AMPUSER})})
exten => _[+0-9]!,n,Set(ROUTEUSER=${IF($["${DB_EXISTS(AMPUSER/${ROUTEUSER}/cidnum)}"="1"]?${ROUTEUSER}:${NODEST})})
exten => _[+0-9]!,n,GotoIf($["${BLINDTRANSFER}" == ""]?notblind)
exten => _[+0-9]!,n,Set(ENDPOINT=${CUT(BLINDTRANSFER,-,1)})
exten => _[+0-9]!,n,Set(ROUTEUSER=${CUT(ENDPOINT,/,2)})
exten => _[+0-9]!,n(notblind),GotoIf($[${LEN(${ROUTEUSER})}>0 & ${DB_EXISTS(AMPUSER/${ROUTEUSER}/outroute_hash)}]?${DB(AMPUSER/${ROUTEUSER}/outroute_hash)},${EXTEN},2:outbound-allroutes,${EXTEN},2)
exten => h,1,Hangup()
;--== INCLUDE ==--;
exten => _[+0-9]!,1,Noop(======================================================)
exten => _[+0-9]!,n,Noop(========= Context OUTBOUND-RESTRICTED-routes =========)
exten => _[+0-9]!,n,Noop(== Destination: ${EXTEN} , CID: ${CALLERID(number)} ==)
exten => _[+0-9]!,n,Noop(======================================================)
exten => _[+0-9]!,n,Goto(outrt-13,${EXTEN},1)
;--== INCLUDE ==--;
exten => _[+0-9]!,n,Macro(user-callerid,LIMIT)
exten => _[+0-9]!,n,Set(ROUTEUSER=${IF($["${EXTTOCALL}"!=""]?${EXTTOCALL}:${AMPUSER})})
exten => _[+0-9]!,n,Set(ROUTEUSER=${IF($["${DB_EXISTS(AMPUSER/${ROUTEUSER}/cidnum)}"="1"]?${ROUTEUSER}:${NODEST})})
exten => _[+0-9]!,n,GotoIf($["${BLINDTRANSFER}" == ""]?notblind)
exten => _[+0-9]!,n,Set(ENDPOINT=${CUT(BLINDTRANSFER,-,1)})
exten => _[+0-9]!,n,Set(ROUTEUSER=${CUT(ENDPOINT,/,2)})
exten => _[+0-9]!,n(notblind),GotoIf($[${LEN(${ROUTEUSER})}>0 & ${DB_EXISTS(AMPUSER/${ROUTEUSER}/outroute_hash)}]?${DB(AMPUSER/${ROUTEUSER}/outroute_hash)},${EXTEN},2:outbound-allroutes,${EXTEN},2)
exten => h,1,Hangup
;--== end of [outbound-restricted-routes] ==--;
-- Executing [+79066357070@outrt-13:11] Macro("PJSIP/703-00002009", "dialout-trunk,10,+79066357070,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("PJSIP/703-00002009", "DIAL_TRUNK=10") in new stack
но потом он все же перескачил на 10 я так понял
OUT_2 = SIP/Addpac1_P1_0
OUTCID_2 =
OUTMAXCHANS_2 =
OUTFAIL_2 =
OUTPREFIX_2 =
OUTDISABLE_2 = off
OUTKEEPCID_2 = off
FORCEDOUTCID_2 =
PREFIX_TRUNK_2 =
Executing [+79066357070@outrt-13:11] Macro("PJSIP/703-00002009", "dialout-trunk,10,+79066357070,,off") in new stack
+79066357070@outrt-13:11
Macro("PJSIP/703-00002009", "dialout-trunk,10,+79066357070,,off")
Executing [s@macro-dialout-trunk:1] Set("PJSIP/703-00002009", "DIAL_TRUNK=10")
[outbound-restricted-routes]
include => outbound-restricted-routes-custom
;--== INCLUDE ==--;
exten => _[+0-9]!,1,Noop(======================================================)
exten => _[+0-9]!,n,Noop(========= Context OUTBOUND-RESTRICTED-routes =========)
exten => _[+0-9]!,n,Noop(== Destination: ${EXTEN} , CID: ${CALLERID(number)} ==)
exten => _[+0-9]!,n,Noop(======================================================)
exten => _[+0-9]!,n,AGI(trunk_hook.php,${EXTEN},${CALLERID(number)})
exten => _[+0-9]!,n,Set(var_trunk_outrt=${trunk_outrt})
exten => _[+0-9]!,n,GotoIf($["${var_trunk_outrt}" = "pusto"]?pusto:gonext)
exten => _[+0-9]!,n(gonext),Goto(${var_trunk_outrt},${EXTEN},1)
exten => _[+0-9]!,n(pusto),Noop(== PUSTO QUIT CUSTOMIZATION ==)
;--== INCLUDE ==--;
exten => _[+0-9]!,n,Macro(user-callerid,LIMIT)
exten => _[+0-9]!,n,Set(ROUTEUSER=${IF($["${EXTTOCALL}"!=""]?${EXTTOCALL}:${AMPUSER})})
exten => _[+0-9]!,n,Set(ROUTEUSER=${IF($["${DB_EXISTS(AMPUSER/${ROUTEUSER}/cidnum)}"="1"]?${ROUTEUSER}:${NODEST})})
exten => _[+0-9]!,n,GotoIf($["${BLINDTRANSFER}" == ""]?notblind)
exten => _[+0-9]!,n,Set(ENDPOINT=${CUT(BLINDTRANSFER,-,1)})
exten => _[+0-9]!,n,Set(ROUTEUSER=${CUT(ENDPOINT,/,2)})
exten => _[+0-9]!,n(notblind),GotoIf($[${LEN(${ROUTEUSER})}>0 & ${DB_EXISTS(AMPUSER/${ROUTEUSER}/outroute_hash)}]?${DB(AMPUSER/${ROUTEUSER}/outroute_hash)},${EXTEN},2:outbound-allroutes,${EXTEN},2)
exten => h,1,Hangup
;--== end of [outbound-restricted-routes] ==--;
exten => _[+0-9]!,n,GotoIf($["${var_trunk_outrt}" = "pusto"]?pusto)
exten => _[+0-9]!,n,Goto(${var_trunk_outrt},${EXTEN},1)
exten => _[+0-9]!,n(pusto),Noop(== PUSTO QUIT CUSTOMIZATION ==)
exten => _.,n,Goto(${var_trunk_outrt},${EXTEN},1)
exten => _[+0-9]!,n,GotoIf($["${var_trunk_outrt}" = "pusto"]?pusto)
exten => _[+0-9]!,n,Goto(${var_trunk_outrt},${EXTEN},1)
exten => _[+0-9]!,n,GotoIf($["${var_trunk_outrt}" = "pusto"]?pusto)
exten => _.,n,Goto(${var_trunk_outrt},${EXTEN},1)
Вот на этот номер например не звонит! Я не понимаю почему такая избирательность ,на какие то звонит на какие то нет..
-- Executing [s@macro-dialout-trunk:28] NoOp("PJSIP/703-000042c4", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack
-- Executing [s@macro-dialout-trunk:29] GotoIf("PJSIP/703-000042c4", "0?continue,1:s-CHANUNAVAIL,1") in new stack
-- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)