Worked like a charm! ThanksHello. I have never run into this problem. What I would do is inserted below:
in-----Original Message----- From: [EMAIL PROTECTED] [mailto:asterisk-users- [EMAIL PROTECTED] On Behalf Of Stephen R. Besch Sent: Wednesday, November 12, 2003 11:06 AM To: asterisk users list Subject: [Asterisk-Users] Dial Plan Sequencing
I have an interesting dilemma with sequencing in the dialplan. Up to
now, I have assumed that the extensions in the dial plan were tested
the order that they appear in extensions.conf. In other words, I havePSTN
the following fragment which was designed to dial toll free on the
and all other long distance on VoIP:;> include => local
[longdistance]
;Handle local, etc first. (orso
I thought!)long
exten => _91NXXNXXXXXX,1,Dial(${VPLSTRUNK}/${EXTEN:1}) ;Dial
distance through VoiP
exten => _91NXXNXXXXXX,2,Congestion
;OOPS! No lines available?
:
:
[reallongdistance] include => local include => longdistance
[local]distance
:
exten => _91800NXXXXXX,1,Dial(${PSTNTRUNK}/${EXTEN}) ; Long
providetoll free accessed through PSTN trunk interface exten => _91800NXXXXXX,2,Congestion exten => _91888NXXXXXX,1,Dial(${PSTNTRUNK}/${EXTEN}) exten => _91888NXXXXXX,2,Congestion exten => _91877NXXXXXX,1,Dial(${PSTNTRUNK}/${EXTEN}) exten => _91877NXXXXXX,2,Congestion exten => _91866NXXXXXX,1,Dial(${PSTNTRUNK}/${EXTEN}) exten => _91866NXXXXXX,2,Congestion
; The rest of the local definitions, etc :
I expected that the "_918" definitions would be tested first, followed
by the "_91N" definitions. Unfortunately, it appears as if the
definitions made using the "include=" operator are always tested last.
This means that the toll free numbers dialed by people in the
longdistance context are always routed over VoIP rather than PSTN
because they match the "_91N" pattern. While I can fix this with a
complicated set of conditionals or dial string patterns, I wonder if
anyone has found a more elegant solution, remembering that I want to
give some extensions access to only the local context, but still
toll free service for everyone (i.e, I don't want to move the "_918" definitions into the longdistance context).
Stephen R. Besch
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
Whadda ya think?
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Stephen R. Besch
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
