Я это конечно понимаю.
Код: Выделить всё
;City
exten => _9XXXXXX,1,Answer
;exten => _XXXXXX,n,Dial(DAHDI/g1/${EXTEN},60)
exten => _9XXXXXX,n,AGI(coreadmin.php,"dialcity",${EXTEN:1})
exten => _9XXXXXX,n,Playtones(busy)
exten => _9XXXXXX,n,Wait(3)
exten => _9XXXXXX,n,Hangup
; International
exten => _9XXXXXX.,1,Wait(1)
exten => _9XXXXXX.,n,Set(CHANNEL(language)=ru)
;exten => _XXXXXX.,n,Dial(DAHDI/g1/${EXTEN},60)
exten => _9XXXXXX.,n,AGI(coreadmin.php,"dialout",${EXTEN:1})
exten => _9XXXXXX.,n,Playtones(busy)
exten => _9XXXXXX.,n,Wait(3)
exten => _9XXXXXX.,n,Hangup
Может не правильно или не совсем так как надо? Если вас не затруднит подскажите, пожалуйста, какое верное решение?
создать диалплан для внутреннего вызова, город, межгород и международные вызовы.
Спасибо.
Код: Выделить всё
[night-internal]
exten => 777,1,Answer
exten => 777,n,Dial(SIP/000,60,Tt)
exten => 777,n,Playtones(busy)
exten => 777,n,Wait(3)
exten => 777,n,Hangup
exten => 888,1,Answer
exten => 888,n,Dial(SIP/000,60,Tt)
exten => 888,n,Playtones(busy)
exten => 888,n,Wait(3)
exten => 888,n,Hangup
[from-internal]
;Emergency calls to 01,02,03...
exten => _0X,1,Answer
exten => _0X,2,Dial(DAHDI/g2/1${EXTEN},60)
exten => _0X,3,Hangup
exten => _91XX,1,Answer
exten => _91XX,2,Dial(DAHDI/g2/${EXTEN:1},60)
exten => _91XX,3,Hangup
include => night-internal,mon-fri,*,*
; Ordinal SIP calls
;
exten => _XXX,1,Answer
exten => _XXX,n,Dial(SIP/${EXTEN},60,Tt)
exten => _XXX,n,Playtones(busy)
exten => _XXX,n,Wait(3)
exten => _XXX,n,Hangup
; Ordinal SIP calls
;
exten => _XXXX,1,Answer
exten => _XXXX,n,Dial(SIP/${EXTEN},60,Tt)
exten => _XXXX,n,Playtones(busy)
exten => _XXXX,n,Wait(3)
exten => _XXXX,n,Hangup
; Ordinal SIP calls
;
exten => _XXXXX,1,Answer
exten => _XXXXX,n,Dial(SIP/${EXTEN},60,Tt)
exten => _XXXXX,n,Playtones(busy)
exten => _XXXXX,n,Wait(3)
exten => _XXXXX,n,Hangup
;City
;
exten => _9XXXXXX,1,Answer
;exten => _XXXXXX,n,Dial(DAHDI/g1/${EXTEN},60)
exten => _9XXXXXX,n,AGI(coreadmin.php,"dialcity",${EXTEN:1})
exten => _9XXXXXX,n,Playtones(busy)
exten => _9XXXXXX,n,Wait(3)
exten => _9XXXXXX,n,Hangup
; International
;
exten => _9XXXXXX.,1,Wait(1)
exten => _9XXXXXX.,n,Set(CHANNEL(language)=ru)
;exten => _XXXXXX.,n,Dial(DAHDI/g1/${EXTEN},60)
exten => _9XXXXXX.,n,AGI(coreadmin.php,"dialout",${EXTEN:1})
exten => _9XXXXXX.,n,Playtones(busy)
exten => _9XXXXXX.,n,Wait(3)
exten => _9XXXXXX.,n,Hangup
[night-zaptel]
exten => 801801,1,Wait(1)
exten => 801801,n,AGI(coreadmin.php,"did",801705)
exten => 801801,n,Playtones(busy)
exten => 801801,n,Wait(3)
exten => 801801,n,Hangup
exten => 801200,1,Wait(1)
exten => 801200,n,AGI(coreadmin.php,"did",801705)
exten => 801200,n,Playtones(busy)
exten => 801200,n,Wait(3)
exten => 801200,n,Hangup
[from-zaptel]
include => night-zaptel,00:00-08:00,*,*
exten => _X.,1,Wait(1)
exten => _X.,n,AGI(coreadmin.php,"did",${EXTEN})
exten => _X.,n,Playtones(busy)
exten => _X.,n,Wait(3)
exten => _X.,n,Hangup
;[redirect-internal]
;exten => #21,1,Set(DB(REDIRECT/${CALLERID(num)})=${EXTEN})
;exten => #21#,1,Set(NOREDIRNUM=${DB_DELETE(REDIRECT/${CALLERID(num)})})
;exten => s,1,Set(REDIRECTNUM=${DB(REDIRECT/${EXTEN})})
;exten => s,n,GotoIf($[ISNULL(${REDIRECTNUM})]?from-internal:redirect)
;exten => s,n(from-internal) ,Dial(SIP/${EXTEN})
;exten => s,n(redirect) ,Dial(SIP/TRUNK/${REDIRECTNUM})