On Friday 14 September 2007 15:35:47 Anthony Messina wrote:
> On Friday 14 September 2007 12:37:11 pm Tilghman Lesher wrote:
> > On Friday 14 September 2007 11:39:40 Anthony Messina wrote:
> > > I am working on getting freenum.org ISN/ITAD numbers integrated into my
> > > exiting dialplan however I am having trouble getting the extension
> > > matches to work "as expected."
> > >
> > > I would like to be able to do something like:
> > > exten => _X.*.,1,Macro(isn-outbound...)
> >
> > The problem you're seeing is that the period is a short-circuit operator.
> > It says "if you match everything so far and at least one more character,
> > then you have a match, no need to go any further."  You CANNOT match past
> > a '.'.
>
> Thank you all.  I knew I wasn't nuts, but this is the infomation being
> posted at http://freenum.org/cookbook/
>
> I'll just have to add a prefix.  I was hoping to avoid that.

exten => _X.,1,Set(firstpart=${CUT(EXTEN,*,1)})
exten => _X.,n,Set(secondpart=${CUT(EXTEN,*,2)})
exten => _X.,n,GotoIf($[${LEN(${secondpart})}=0]?i,1)
exten => _X.,n,Macro(foo,${firstpart},${secondpart})

-- 
Tilghman

_______________________________________________

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to