[Asterisk-Users] Catching _ALL_ characters

Douglas Garstang dgarstang at oneeighty.com
Tue Feb 21 14:11:45 MST 2006


I have the following in extensions.conf

[incoming]
exten => _X.,1,AGI(python2/iptrouter.py|OnNetOutgoing)
exten => _X.,2,Hangup()

Works well. I wanted to also catch numbers prefixed with a star code, say *, with the lines above. However, when I dial a star code prefixed number, Asterisk first sends the number I dialled to the agi script and then sends a second call to the agi script where agi_extension=h. Why? It actually calls the AGI script twice. How can it do this when I dialled a number once?

So, I tried this:
exten => _X.,1,AGI(python2/iptrouter.py|OnNetOutgoing)
exten => _X.,2,Hangup()
exten => h,1,Hangup()

and Asterisk still sends a call with agi_extension=h to the agi script after the first call. How can I write ONE regex that catches _ALL_ numbers, including those prefixed with a * to a single AGI script? Alternatively, how could I achieve it with two exten=> commands pointing to the same agi script?

Thanks,
Doug.



More information about the asterisk-users mailing list