I'm trying to find a way in extensions.conf to match ANYTHING dialled, including characters such as *. The following works for numbers... exten => _X.,1,AGI(script) but doesn't catch when someone dialls * first. I tried this: exten => _.,1,AGI(script) which catches when someone dials say, *123 for example, but after the AGI script terminates, Asterisk executes it again with the 'h' extension. So then I tried... exten => _.,1,AGI(script) exten => _.,2,Hangup() which doesn't work. So, what exten regex can I use that would catch anything dialled, or how can I stop Asterisk from executing the AGI script a second time when I use "_."? Thanks, Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060227/908b5350/attachment.htm
Douglas Garstang schrieb:> I'm trying to find a way in extensions.conf to match ANYTHING dialled,Hi, your subject is probably not correct. You want to catch anything except h, t, ...? Maybe you want to get matched the digits and *. Thus try: _[*0-9]. This will match any dialed string, which starts with * or a digit and has at least a length of 2. Roger.
> which doesn't work. So, what exten regex can I use that would catch anything > dialled, or how can I stop Asterisk from executing the AGI script a second > time when I use "_."?I think you can just add an extension "h" in that context, something like exten => h,1,Hangup hth
Use of '_.' is discouraged. In this case, '_[*X].' should work I think Douglas Garstang wrote:> I'm trying to find a way in extensions.conf to match ANYTHING dialled, > including characters such as *. > The following works for numbers... > > exten => _X.,1,AGI(script) > > but doesn't catch when someone dialls * first. I tried this: > > exten => _.,1,AGI(script) > > which catches when someone dials say, *123 for example, but after the > AGI script terminates, Asterisk executes it again with the 'h' > extension. So then I tried... > > exten => _.,1,AGI(script) > exten => _.,2,Hangup() > > which doesn't work. So, what exten regex can I use that would catch > anything dialled, or how can I stop Asterisk from executing the AGI > script a second time when I use "_."? > > Thanks, > Doug. > > >------------------------------------------------------------------------ > >_______________________________________________ >--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 > >