[asterisk-users] Press twice *

Steve Edwards asterisk.org at sedwards.com
Fri Jun 4 18:23:38 CDT 2010


Un-top-posting, comments inline.

>       On Behalf Of Anahi Ludueña
> 
> Hi people, I need to detect when the user presses twice *... In the 
> dialplan I added the following, but it doesn't work. Could you help me 
> with that?
> 
> exten => **,1,.....

> 2010/6/4 Danny Nicholas <danny at debsinc.com>
>
>       Probably going to have to use read to detect this..

If you specify maxdigits = 2 or if you can wait for the timeout to expire, 
read() will work. It may not "fit" the flow of the dialplan though.

On Fri, 4 Jun 2010, Alyed wrote:

> try it with "_" in front of the "*"
> 
> exten => _**,1,.....

The "underscore" introduces a pattern. "**" is not a pattern, it is 2 
literal asterisks.

Back to the OP, why doesn't it work for you? This works fine for me:

; * pressed once
         exten = *,1,                    verbose(once)
         exten = *,n,                    hangup()

; ** pressed twice
         exten = **,1,                   verbose(twice)
         exten = **,n,                   hangup()

Maybe you can enable SIP debugging to confirm that Asterisk is getting the 
invite and that your phone's dialplan is not tripping you up. Are you sure 
you are "in" the right context in your dialplan?

Maybe something in "features.conf" is tripping you up. I don't use 
"features" so this is just a guess.

Maybe you could bump up debugging and verbosity and reply with the console 
output.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list