Thanks Kevin! That's what is great about these forums. I never thought of using gotoif() inside ... one of those "Doh!" moments.

I included your concept in my standard [dial-ld] context with ${EXTEN}:1:3="800", etc. rather than by 2's, (so it doesn't overlap with 8XX area codes) and select my local loop as the "first pick".

dbc.
Kevin Smith wrote:
Hey David,

Yes, it can, you just have to play around with the logic and what you are comparing and when you can do the comparison.

Try something like this:
exten => _18XXNXXXXXX,1, NoOP()
exten => _18XXNXXXXXX,n,gotoif("${EXTEN}:2:2" = "00" | "${EXTEN}:2:2" = "66" | "${EXTEN}:2:2" = "77" | "${EXTEN}:2:2" = "88")?TRUE:FALSE

exten => _18XXNXXXXXX,n(TRUE),Dial()
exten => _18XXNXXXXXX,n(FALSE), HangUp()


_______________________________________________
--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