Hi
I have a requirement to match DTMF key pressed by the user and then execute the rest of the dial plan accordingly. Below is the snippet of my dial plan:
exten => auto,n,Read(keytone,indra-autoattend,1)
exten => auto,n,GotoIf($[${keytone}=1]?here:1,1)
exten => auto,n(next),Background(if-u-know-ext-dial)
In the above, variable “keytone” needs to be matched with “1”. If it is “1” then control should go to priority:“here” and if not then go to context,priority (1,1).
The main problem here is that the condition in GotoIf is always true and going to priority “here”, whether i press 1 or 2.
The below is the Asterisk CLI output : Case for user press 1.
Executing [auto@sip_proxy:2] Read(“SIP/5002-0198a000”, “keytone,indra-autoattend,1”) in new stack
– Accepting a maximum of 1 digits.
– <SIP/5002-0198a000> Playing ‘indra-autoattend.gsm’ (language ‘en’)
– User entered ‘1’
– Executing [auto@sip_proxy:8] GotoIf(“SIP/5002-0198a000”, “5.447509531062001e-315?here:1,1”) in new stack
– Goto (sip_proxy,auto,9)
And when the User enters ‘2’:
Executing [auto@sip_proxy:2] Read(“SIP/5002-0198a000”, “keytone,indra-autoattend,1”) in new stack
– Accepting a maximum of 1 digits.
– <SIP/5002-0198a000> Playing ‘indra-autoattend.gsm’ (language ‘en’)
– User entered ‘2’
– Executing [auto@sip_proxy:8] GotoIf(“SIP/5002-0198a000”, “5.447509531062001e-315?here:1,1”) in new stack
– Goto (sip_proxy,auto,9)
Please do help me on this. I tried a lot but still not getting how to implement the GotoIf().