[asterisk-users] Dialplan "or" matching

David Cook dbc_asterisk at advan.ca
Tue Aug 22 16:35:13 MST 2006


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()
>




More information about the asterisk-users mailing list