Naija Man wrote:
As a habit, I do not force users to dial 9 or any other prefix of any kind
to access external lines. You can just check the dialled number and prefix
with appropriate digits appropriately. See below. NOTE: THIS IS US-CENTRIC!!
but can be easily made to work for any country.


[context for out-bound numbers]
;
;Check for incoming calls…
;
; Domestic e.164 US numbers go out unchanged.
;
exten => _1XXXXXXXXXX,1,Goto(outgoing,${EXTEN},1)
;
;
; Check for 10 digit NANP
exten => _XXXXXXXXXX,1,SetVar(PREFIX=1)
exten => _XXXXXXXXXX,2,Goto(outgoing,${PREFIX}${EXTEN},1)

; Check for 7 digit NANP
;  Then add "1" and the location area code
;
exten => _XXXXXXX,1,SetVar(PREFIX=1925)
exten => _XXXXXXX,2,Goto(outgoing,${PREFIX}${EXTEN},1)

; Check for emergency numbers
;
exten => 911,1,Goto(emergency,911,1)
;
; Check for other special numbers and direct to repective contexts.
;
;
[outgoing]
exten => _X.,1,ChanIsAvail(${PSTNCHANNEL})
exten => _X.,2,NoOp(AvailChannel=${AVAILCHAN})
exten => _X.,3,Set(DialChannel=${CUT(AVAILCHAN,,1)})
exten => _X.,4,Dial(${DialChannel}/${EXTEN},100)
exten => _X.,5,Congestion
exten => _X.,105,Congestion

My problem with this type of dialplan is that users must wait for DigitTimeout before the call is processed.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to