[Asterisk-Users] Using regular expression in dialplan

Selim selimbh at gmail.com
Wed Sep 1 07:48:59 MST 2004


Sorry for the re-posting, I received a delivery failure mail for each
one of my emails ...
Thank you Kevin for your "Clues".

Does any one else have used regex (or extended regex) with GotoIf ?

Selim

On Wed, 1 Sep 2004 14:34:49 +0100, Kevin Walsh <kevin at cursor.biz> wrote:
> Selim [selimbh at gmail.com] wrote:
> > Did anyone manage to make the GotoIf command work with regular expression
> >
> Does re-posting the same question lots of times usually work for you?
> I suppose it generated a response in this case.  I usually just delete
> duplicates, along with the original.
> 
> >
> > I've tried the follwoing syntax but it is alway going to 2 whatever
> > the value of DTMFSeq:
> >
> > exten => s,1,GotoIf($[${DTMFSeq} : 123]?s|4:s|2)
> > 
> Clue: 123 is 123.  It's not a regular expression that would match 1, 2
> or 3.  123 will match 123, and nothing else.  [Perhaps something is
> missing from your expression.]
> 
> >
> > The only way I managed to make it work is the following :
> >
> > exten => s,1,GotoIf($[${DTMFSeq} : 1|2|3]?s|4:s|2)
> >
> Clue: 1|2|3 is a regular expression that would match 1, 2 or 3.  That's
> why it works.
> 
> --
>    _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
>   _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
>  _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
> _/   _/  _/_/_/_/      _/    _/_/_/  _/    _/
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list