David Cook
2007-Mar-13 12:41 UTC
[asterisk-users] Re: asterisk-users Digest, Vol 32, Issue 48
> From: Ricardo Carvalho <rjcarvalho@reit.up.pt> > Subject: [asterisk-users] How to match wild card inside a GoToIf? > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users@lists.digium.com> > > How can I match wildcards inside a GoToIf? > > I have something like this, but it doesn't work: > > [default] > exten => _2XXXXXXXX,1,Macro(outcall,${EXTEN}) > [macro-outcall] > exten => s,1,GotoIf($["${ARG1}" = "220408XXX"]?2:3) > exten => s,2,Hangup >You are going to need a substring of the original. I'm thinking something like the following although I haven't tested it. exten => s,1,GotoIf($["${ARG1:3}" = "220408"]?2:3) dbc.