Hi, I have the problem that WaitExten is not responding to key presses. Here are the sections from my extensions.conf: [globals] incoming_call=0 menu=0 announce=0 [internal] exten => 777,1,Goto(hotline,${EXTEN},1) [hotline] exten => _X.,1,Set(CALLERID(name)=Hotline) exten => _X.,n,Set(original_extension=${EXTEN}) exten => _X.,n,GotoIf($[${announce}=1]?4:10) exten => _X.,n,Answer exten => _X.,n,NoOp(Ansage: Das Problem XYZ ist bereits bekannt und wird bearbeitet) exten => _X.,n,NoOp(Ansage: Druecken Sie die Taste 1 falls Sie wegen einem anderen Problem anrufen) exten => _X.,n,NoOp(Ansage: Ansonsten druecken Sie eine andere Taste oder legen Sie bitte auf) exten => _X.,n,WaitExten(5) exten => _X.,n,Goto(18) exten => _X.,n,Set(menu=1) exten => _X.,n,NoOp(Ansage: Das Gespraech wird aus Qualitaetsgruenden aufgezeichnet) exten => _X.,n,NoOp(Ansage: Falls Sie damit nicht einverstanden sind druecken Sie bitte die Taste 1) exten => _X.,n,WaitExten(5) exten => _X.,n,MixMonitor(test.wav) exten => _X.,n,SayDigits(123) exten => _X.,n,Queue(hotline|t|||120) exten => _X.,n,StopMonitor() exten => _X.,n,Hangup exten => _[0-9],1,Goto(menu,${EXTEN},1) exten => i,1,Goto(invalid,${EXTEN},1) exten => t,1,Goto(timeout,${EXTEN},1) [menu] exten => 1,1,GotoIf($[${menu}=0]?2:4) exten => 1,n,Set(menu=1) exten => 1,n,Goto(hotline,${original_extension},11) exten => 1,n,Goto(hotline,${original_extension},16) exten => _[02-9*#],1,Hangup The CLI output is: -- Executing [777@internal:1] Goto("SIP/202-b6d08708", "hotline|777|1") in new stack -- Goto (hotline,777,1) -- Executing [777@hotline:1] Set("SIP/202-b6d08708", "CALLERID(name)=Hotline") in new stack -- Executing [777@hotline:2] Set("SIP/202-b6d08708", "original_extension=777") in new stack -- Executing [777@hotline:3] GotoIf("SIP/202-b6d08708", "0?4:10") in new stack -- Goto (hotline,777,10) -- Executing [777@hotline:10] Set("SIP/202-b6d08708", "menu=1") in new stack -- Executing [777@hotline:11] NoOp("SIP/202-b6d08708", "Ansage: Das Gespraech wird aus Qualitaetsgruenden aufgezeichnet") in new stack -- Executing [777@hotline:12] NoOp("SIP/202-b6d08708", "Ansage: Falls Sie damit nicht einverstanden sind druecken Sie bitte die Taste 1") in new stack -- Executing [777@hotline:13] WaitExten("SIP/202-b6d08708", "5") in new stack => here is the point where I press a digit but nothing happens: -- Timeout on SIP/202-b6d08708, continuing... -- Executing [777@hotline:14] MixMonitor("SIP/202-b6d08708", "test.wav") in new stack -- Executing [777@hotline:15] SayDigits("SIP/202-b6d08708", "123") in new stack -- <SIP/202-b6d08708> Playing 'digits/1' (language 'de') == Begin MixMonitor Recording SIP/202-b6d08708 -- <SIP/202-b6d08708> Playing 'digits/2' (language 'de') -- <SIP/202-b6d08708> Playing 'digits/3' (language 'de') -- Executing [777@hotline:16] Queue("SIP/202-b6d08708", "hotline|t|||120") in new stack [May 16 11:37:00] WARNING[8400]: translate.c:163 framein: no samples for alawtolin -- Started music on hold, class 'default', on SIP/202-b6d08708 -- Stopped music on hold on SIP/202-b6d08708 -- User disconnected from queue hotline while waiting their turn == Spawn extension (hotline, 777, 16) exited non-zero on 'SIP/202-b6d08708' == End MixMonitor Recording SIP/202-b6d08708 The real strange thing is that when I change the value of the global variable announce to 1 WaitExten is working as expected: [globals] incoming_call=0 menu=0 announce=1 CLI output: -- Executing [777@internal:1] Goto("SIP/202-081bb9f8", "hotline|777|1") in new stack -- Goto (hotline,777,1) -- Executing [777@hotline:1] Set("SIP/202-081bb9f8", "CALLERID(name)=Hotline") in new stack -- Executing [777@hotline:2] Set("SIP/202-081bb9f8", "original_extension=777") in new stack -- Executing [777@hotline:3] GotoIf("SIP/202-081bb9f8", "1?4:10") in new stack -- Goto (hotline,777,4) -- Executing [777@hotline:4] Answer("SIP/202-081bb9f8", "") in new stack -- Executing [777@hotline:5] NoOp("SIP/202-081bb9f8", "Ansage: Das Problem XYZ ist bereits bekannt und wird bearbeitet") in new stack -- Executing [777@hotline:6] NoOp("SIP/202-081bb9f8", "Ansage: Druecken Sie die Taste 1 falls Sie wegen einem anderen Problem anrufen") in new stack -- Executing [777@hotline:7] NoOp("SIP/202-081bb9f8", "Ansage: Ansonsten druecken Sie eine andere Taste oder legen Sie bitte auf") in new stack -- Executing [777@hotline:8] WaitExten("SIP/202-081bb9f8", "5") in new stack == CDR updated on SIP/202-081bb9f8 -- Executing [1@hotline:1] Goto("SIP/202-081bb9f8", "menu|1|1") in new stack -- Goto (menu,1,1) -- Executing [1@menu:1] GotoIf("SIP/202-081bb9f8", "1?2:4") in new stack -- Goto (menu,1,2) -- Executing [1@menu:2] Set("SIP/202-081bb9f8", "menu=1") in new stack -- Executing [1@menu:3] Goto("SIP/202-081bb9f8", "hotline|777|11") in new stack -- Goto (hotline,777,11) -- Executing [777@hotline:11] NoOp("SIP/202-081bb9f8", "Ansage: Das Gespraech wird aus Qualitaetsgruenden aufgezeichnet") in new stack -- Executing [777@hotline:12] NoOp("SIP/202-081bb9f8", "Ansage: Falls Sie damit nicht einverstanden sind druecken Sie bitte die Taste 1") in new stack -- Executing [777@hotline:13] WaitExten("SIP/202-081bb9f8", "5") in new stack == CDR updated on SIP/202-081bb9f8 -- Executing [1@hotline:1] Goto("SIP/202-081bb9f8", "menu|1|1") in new stack -- Goto (menu,1,1) -- Executing [1@menu:1] GotoIf("SIP/202-081bb9f8", "0?2:4") in new stack -- Goto (menu,1,4) -- Executing [1@menu:4] Goto("SIP/202-081bb9f8", "hotline|777|16") in new stack -- Goto (hotline,777,16) -- Executing [777@hotline:16] Queue("SIP/202-081bb9f8", "hotline|t|||120") in new stack -- Started music on hold, class 'default', on SIP/202-081bb9f8 -- Stopped music on hold on SIP/202-081bb9f8 -- User disconnected from queue hotline while waiting their turn == Spawn extension (hotline, 777, 16) exited non-zero on 'SIP/202-081bb9f8' The only difference with announce=1 is that WaitExten is executed twice and both times it is working. Perhaps anybody of you sees what is going wrong here. Thanks for your help.
Vitell Listmaster
2007-Jun-15 15:59 UTC
[asterisk-users] WaitExten not responding on key presses
Jack wrote:> Hi, > > I have the problem that WaitExten is not responding to key presses.You haven't answered the call when announce=0 - you need to answer the call before you can get input information! Change your code to: [hotline] exten => _X.,1,Set(CALLERID(name)=Hotline) exten => _X.,n,Set(original_extension=${EXTEN}) ****exten => _X.,n,GotoIf($[${announce}=1]?announce:noannounce) ****exten => _X.,n(announce),Answer exten => _X.,n,NoOp(Ansage: Das Problem XYZ ist bereits bekannt und wird bearbeitet) exten => _X.,n,NoOp(Ansage: Druecken Sie die Taste 1 falls Sie wegen einem anderen Problem anrufen) exten => _X.,n,NoOp(Ansage: Ansonsten druecken Sie eine andere Taste oder legen Sie bitte auf) exten => _X.,n,WaitExten(5) exten => _X.,n,Goto(18) ****exten => _X.,n(noannounce),Set(menu=1) ++++exten => _X.,n,Answer exten => _X.,n,NoOp(Ansage: Das Gespraech wird aus Qualitaetsgruenden aufgezeichnet) exten => _X.,n,NoOp(Ansage: Falls Sie damit nicht einverstanden sind druecken Sie bitte die Taste 1) . . . Changed lines marked with ****, additional line marked with ++++ (note the change to labels rather than numbers as well - makes it much more readable!) Nick.
Possibly Parallel Threads
- hiera-eyaml-gpg gives strange error
- Got SUBSCRIBE for extensions without hint
- Multiple key presses are hindered when repeat turned off
- Any way to stop Playtones(dial) when the user presses a key, emulating a CO's behavior?
- CDR destination when user presses '#'