[Asterisk-Users] Interesting Dial-Plan Question

Matt mhoppes at gmail.com
Thu Apr 27 06:36:20 MST 2006


That will work?   So if I have:

CALLERIDNUM = 5705551212
exten => _NXXXXXX,1,Goto(${CALLERIDNUM::0:3}${EXTEN},1)
exten => _570NXXXXXX,1,Dial(Zap/g1/${EXTEN},1)

And if CALLERIDNUM = 7175551212
exten => _717NXXXXXX,1,Dial(Zap/g2/${EXTEN},1)

(Notice 717 calls go out g2.. and 570 go out g1).

That seems as though it should work, however it still would seem I
have to dork up my current dial-plan.   That's why I'm wondering if I
should do that EXTEN and CALLERIDNUM stuff in another context, and
then transfer to my outdial context?

The problem I see doing it this way is that not ALL area code 717 or
570 calls go out g1 or g2.   Some calls in the same are code are long
distance and need to route out the LD provider... even though they are
still 717-555-1212 format.

Right now.. if someone dials 1-570-555-1212, 570-555-1212, or 555-1212
it routes correctly (wether it is long distance or not).   My goal is
to artificially make the person dial '570' or '717' even if they dial
555-1212 by looking at the originating number.  Unless someone thinks
of a good reason not too.. it seems a context flip woudl be the way to
go.



More information about the asterisk-users mailing list