[Asterisk-bugs] [Asterisk 0010084]: Read application buffers input DTMF tones

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Jun 29 15:45:15 CDT 2007


email_notification_title_for_action_bugnote_submitted 
====================================================================== 
http://bugs.digium.com/view.php?id=10084 
====================================================================== 
Reported By:                rushowr
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10084
Category:                   Applications/app_read
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.5 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             06-28-2007 15:10 CDT
Last Modified:              06-29-2007 15:45 CDT
====================================================================== 
Summary:                    Read application buffers input DTMF tones
Description: 
The Read application is used to take the user's input and place it into a
variable but sometimes if it does not properly receive the DTMF tone(s), it
buffers the input and places it into the NEXT Read call's input buffer and
prepends it to the variable there.

One major thing we've noticed is that it's always the last digit of the
input.
For example, we get the uer's language selection and for some reason the
server does not get the entered digit "1" as show below:

-------------
--Executing[s at select_lang:3] BackGround("SIP/[provider name
removed]-08218e30", "prepaid-lang_select")
<SIP/[provider name removed]-08218e30> Playing 'prepaid-lang_select'
(language 'en')
--Executing[s at select_lang:4] Read("SIP/[provider name removed]-08218e30",
"lang_input||1")
Accepting a maximum of 1 digits.
User entered nothing.
-------------

Our dialpan tests for empty input and loops back to get it again. This
time, the first 1 is "received"  and the new "1" is buffered:

-------------
--Executing[s at select_lang:5] GotoIf("SIP/[provider name
removed]-08218e30", "1?6:13")
Goto (select_lang,s,6)
--Executing[s at select_lang:6] GotoIf("SIP/[provider name
removed]-08218e30", "1?7:10")
Goto (select_lang,s,7)
--Executing[s at select_lang:7] Set("SIP/[provider name removed]-08218e30",
"loop=2")
--Executing[s at select_lang:8] Goto("SIP/[provider name removed]-08218e30",
"getinput")
Goto (select_lang,s,3)
--Executing[s at select_lang:3] BackGround("SIP/[provider name
removed]-08218e30", "prepaid-lang_select")
<SIP/[provider name removed]-08218e30> Playing 'prepaid-lang_select'
(language 'en')
--Executing[s at select_lang:4] Read("SIP/[provider name removed]-08218e30",
"lang_input||1")
Accepting a maximum of 1 digits.
User entered '1'
-------------

This time, since there's a language selected, we set the language (no need
to show this), and then move on to get the pin number. This is where we can
really see the error, since the pin entered was 222333444555, but Read sees
122233344455:

-------------
--Executing[sw-5-callback at authentication:8] BackGround("SIP/[provider name
removed]-08218e30", "prepaid-enter-pin")
<SIP/[provider name removed]-08218e30> Playing 'prepaid-enter-pin'
(language 'en')
--Executing[sw-5-callback at authentication:9] Read("SIP/[provider name
removed]-08218e30", "pin||14")
Accepting a maximum of 14 digits.
User entered '1222333444555'
-------------

The next executions are omitted because they pertain to the database
queries used to determine if the pin is correct, which it is not. We then
loop back to try again. Unfortunately, the input is ALWAYS wrong because
the last digit of the previous input keeps getting prepended as shown
above. 


====================================================================== 

---------------------------------------------------------------------- 
 rushowr - 06-29-07 15:45  
---------------------------------------------------------------------- 
Updated output. Here we see that we received "1" on DTMF but READ didn't
register it. Then, it says that we received 1 one when we didn't, and
finally we receive 222333444555 but READ uses 122233344455

    -- Executing [s at callcard_select_lang:3] BackGround("SIP/[SIP
PROVIDER]", "prepaid-lang_select") in new stack
    -- <SIP/[SIP PROVIDER]> Playing 'prepaid-lang_select' (language 'en')
[Jun 29 22:32:12] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '1'
received on SIP/[SIP PROVIDER], duration 0 ms
    -- Executing [s at callcard_select_lang:4] Read("SIP/[SIP PROVIDER]",
"lang_input||1||1") in new stack
    -- Accepting a maximum of 1 digits.
    -- User entered nothing.
    -- Executing [s at callcard_select_lang:5] GotoIf("SIP/[SIP PROVIDER]",
"1?6:13") in new stack
    -- Goto (callcard_select_lang,s,6)
    -- Executing [s at callcard_select_lang:6] GotoIf("SIP/[SIP PROVIDER]",
"1?7:10") in new stack
    -- Goto (callcard_select_lang,s,7)
    -- Executing [s at callcard_select_lang:7] Set("SIP/[SIP PROVIDER]",
"loop=2") in new stack
    -- Executing [s at callcard_select_lang:8] Goto("SIP/[SIP PROVIDER]",
"getinput") in new stack
    -- Goto (callcard_select_lang,s,3)
    -- Executing [s at callcard_select_lang:3] BackGround("SIP/[SIP
PROVIDER]", "prepaid-lang_select") in new stack
    -- <SIP/[SIP PROVIDER]> Playing 'prepaid-lang_select' (language 'en')
    -- Executing [s at callcard_select_lang:4] Read("SIP/[SIP PROVIDER]",
"lang_input||1||1") in new stack
    -- Accepting a maximum of 1 digits.
    -- User entered '1'
    -- Executing [s at callcard_select_lang:5] GotoIf("SIP/[SIP PROVIDER]",
"0?6:13") in new stack
    -- Goto (callcard_select_lang,s,13)
    -- Executing [s at callcard_select_lang:13] NoOp("SIP/[SIP PROVIDER]",
"Finish if-callcard_select_lang-63") in new stack
    -- Executing [s at callcard_select_lang:14] Wait("SIP/[SIP PROVIDER]",
"1") in new stack
[Jun 29 22:32:25] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '1'
received on SIP/[SIP PROVIDER], duration 0 ms
    -- Executing [s at callcard_select_lang:15] GotoIf("SIP/[SIP PROVIDER]",
"0?16:20") in new stack
    -- Goto (callcard_select_lang,s,20)
    -- Executing [s at callcard_select_lang:20] Goto("SIP/[SIP PROVIDER]",
"sw-66-1|1") in new stack
    -- Goto (callcard_select_lang,sw-66-1,1)
    -- Executing [sw-66-1 at callcard_select_lang:1] Set("SIP/[SIP
PROVIDER]", "LANGUAGE()=en") in new stack
    -- Executing [sw-66-1 at callcard_select_lang:2] Set("SIP/[SIP
PROVIDER]", "__LANGSET=y") in new stack
    -- Executing [sw-66-1 at callcard_select_lang:3] Goto("SIP/[SIP
PROVIDER]", "s|21") in new stack
    -- Goto (callcard_select_lang,s,21)
    -- Executing [s at callcard_select_lang:21] NoOp("SIP/[SIP PROVIDER]",
"Finish switch-if-callcard_select_lang-65-66") in new stack
    -- Executing [s at callcard_select_lang:22] NoOp("SIP/[SIP PROVIDER]",
"Finish if-callcard_select_lang-65") in new stack
    -- Executing [s at callcard_select_lang:23] Set("SIP/[SIP PROVIDER]",
"announce_status=on") in new stack
    -- Executing [s at callcard_select_lang:24] Return("SIP/[SIP PROVIDER]",
"") in new stack
    -- Executing [sw-5-callback at authentication:2] Wait("SIP/[SIP
PROVIDER]", "1") in new stack
    -- Executing [sw-5-callback at authentication:3] Set("SIP/[SIP
PROVIDER]", "loop=0") in new stack
    -- Executing [sw-5-callback at authentication:4] Set("SIP/[SIP
PROVIDER]", "loop=1") in new stack
    -- Executing [sw-5-callback at authentication:5] GotoIf("SIP/[SIP
PROVIDER]", "0?6:7") in new stack
    -- Goto (authentication,sw-5-callback,7)
    -- Executing [sw-5-callback at authentication:7] NoOp("SIP/[SIP
PROVIDER]", "Finish if-sw-authentication-callback-5-6") in new stack
    -- Executing [sw-5-callback at authentication:8] BackGround("SIP/[SIP
PROVIDER]", "prepaid-enter-pin") in new stack
    -- <SIP/[SIP PROVIDER]> Playing 'prepaid-enter-pin' (language 'en')
    -- Executing [sw-5-callback at authentication:9] Read("SIP/[SIP
PROVIDER]", "pin||14||1") in new stack
    -- Accepting a maximum of 14 digits.
[Jun 29 22:32:30] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '2'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:31] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '2'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:31] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '2'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:32] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '3'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:33] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '3'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:33] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '3'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:34] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '4'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:35] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '4'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:35] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '4'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:36] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '5'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:37] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '5'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:38] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '5'
received on SIP/[SIP PROVIDER], duration 0 ms
[Jun 29 22:32:38] DTMF[2766]: channel.c:2297 __ast_read: DTMF end '#'
received on SIP/[SIP PROVIDER], duration 0 ms
    -- User entered '1222333444555' 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-28-07 15:10  rushowr        New Issue                                    
06-28-07 15:10  rushowr        Asterisk Version          => 1.4.5           
06-28-07 15:10  rushowr        SVN Branch (only for SVN checkou => N/A          
  
06-28-07 15:10  rushowr        Disclaimer on File?       => No              
06-28-07 16:58  dimas          Issue Monitored: dimas                       
06-29-07 07:07  file           Note Added: 0065897                          
06-29-07 07:07  file           Status                   new => feedback     
======================================================================




More information about the Asterisk-bugs mailing list