;--== 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
-- 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
[ 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. =-
${trunk_outrt} = тут из AGI он возвращает либо номер маршрута outrt-Х , либо pusto , следовательно если если outrt-Х известен то посылаем в
exten => _[+0-9]!,n(gonext),Goto(${var_trunk_outrt},${EXTEN},1)
Или если pusto то выходим из кастомизации и идем стандартным путем...