Диалпланы Asterisk — различия между версиями
Root (обсуждение | вклад) |
Root (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Исходящие звонки в ёмкости 74951690XXX в коротком формате | Исходящие звонки в ёмкости 74951690XXX в коротком формате | ||
− | |||
exten => _1690XXX,1,NoOp(Outgoing call inside network in short format) | exten => _1690XXX,1,NoOp(Outgoing call inside network in short format) | ||
exten => _1690XXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | exten => _1690XXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | ||
− | exten => _1690XXX,n,Dial(SIP/7495${EXTEN}) | + | exten => _1690XXX,n,Dial(SIP/peer/7495${EXTEN}) |
exten => _1690XXX,n,Hangup() | exten => _1690XXX,n,Hangup() | ||
Строка 17: | Строка 10: | ||
exten => _XXXXXXX,n,NoOp(---first_three digits are ${first_three}) | exten => _XXXXXXX,n,NoOp(---first_three digits are ${first_three}) | ||
exten => _XXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | exten => _XXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | ||
− | exten => _XXXXXXX,n,Dial(SIP/ | + | exten => _XXXXXXX,n,Dial(SIP/peer/7${first_three}${EXTEN}) |
exten => _XXXXXXX,n,Hangup() | exten => _XXXXXXX,n,Hangup() | ||
Строка 23: | Строка 16: | ||
exten => _84951690XXX,1,NoOp(Outgoing call inside network in long format) | exten => _84951690XXX,1,NoOp(Outgoing call inside network in long format) | ||
exten => _84951690XXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | exten => _84951690XXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | ||
− | exten => _84951690XXX,n,Dial(SIP/7${EXTEN:1}) | + | exten => _84951690XXX,n,Dial(SIP/peer/7${EXTEN:1}) |
exten => _84951690XXX,n,Hangup() | exten => _84951690XXX,n,Hangup() | ||
+ | |||
+ | Исходящие на межгород | ||
+ | exten => _8XXXXXXXXXX,1,NoOp(Outgoing call) | ||
+ | exten => _8XXXXXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | ||
+ | exten => _8XXXXXXXXXX,n,Dial(SIP/peer/7${EXTEN:1}) | ||
+ | exten => _8XXXXXXXXXX,n,Hangup() | ||
+ | |||
+ | exten => _7XXXXXXXXXX,1,NoOp(Outgoing call) | ||
+ | exten => _7XXXXXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | ||
+ | exten => _7XXXXXXXXXX,n,Dial(SIP/peer/${EXTEN}) | ||
+ | exten => _7XXXXXXXXXX,n,Hangup() | ||
+ | |||
+ | exten => _+7XXXXXXXXXX,1,NoOp(Outgoing call) | ||
+ | exten => _+7XXXXXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) | ||
+ | exten => _+7XXXXXXXXXX,n,Dial(SIP/peer/${EXTEN:1}) | ||
+ | exten => _+7XXXXXXXXXX,n,Hangup() | ||
Входящий звонок и ivr | Входящий звонок и ivr |
Версия 11:16, 4 сентября 2019
Исходящие звонки в ёмкости 74951690XXX в коротком формате
exten => _1690XXX,1,NoOp(Outgoing call inside network in short format) exten => _1690XXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) exten => _1690XXX,n,Dial(SIP/peer/7495${EXTEN}) exten => _1690XXX,n,Hangup()
Исходящие звонки в ёмкости 7495XXXXXXX/7499XXXXXXX в коротком формате внутри префикса.
exten => _XXXXXXX,1,NoOp(Outgoing call of short number by ${CALLERID(num)}) exten => _XXXXXXX,n,Set(first_three=${CALLERID(num):1:3}) exten => _XXXXXXX,n,NoOp(---first_three digits are ${first_three}) exten => _XXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) exten => _XXXXXXX,n,Dial(SIP/peer/7${first_three}${EXTEN}) exten => _XXXXXXX,n,Hangup()
Исходящие звонки в ёмкости 74951690XXX в длинном формате со сменой 8 на 7
exten => _84951690XXX,1,NoOp(Outgoing call inside network in long format) exten => _84951690XXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) exten => _84951690XXX,n,Dial(SIP/peer/7${EXTEN:1}) exten => _84951690XXX,n,Hangup()
Исходящие на межгород
exten => _8XXXXXXXXXX,1,NoOp(Outgoing call) exten => _8XXXXXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) exten => _8XXXXXXXXXX,n,Dial(SIP/peer/7${EXTEN:1}) exten => _8XXXXXXXXXX,n,Hangup()
exten => _7XXXXXXXXXX,1,NoOp(Outgoing call) exten => _7XXXXXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) exten => _7XXXXXXXXXX,n,Dial(SIP/peer/${EXTEN}) exten => _7XXXXXXXXXX,n,Hangup()
exten => _+7XXXXXXXXXX,1,NoOp(Outgoing call) exten => _+7XXXXXXXXXX,n,Set(CALLERID(ALL)=${CALLERID(num)}) exten => _+7XXXXXXXXXX,n,Dial(SIP/peer/${EXTEN:1}) exten => _+7XXXXXXXXXX,n,Hangup()
Входящий звонок и ivr
[incoming] exten => _X.,1,NoOp(Incoming call) exten => _X.,n,Goto(ivr,s,1) [ivr] exten => s,1,Answer() exten => s,n,Background(ivr) exten => s,n,WaitExten(3) exten => s,n,Dial(SIP/1200,10) exten => s,n,Hangup() exten => 1,1,Dial(SIP/1201) exten => 1,n,Hangup() exten => 2,1,Playback(filename) exten => 2,n,Hangup() exten => i,1,Playback(pbx-invalid) exten => i,n,Goto(ivr,s,1)