i think i found the source of a problem, <br><br>its &lt;action application=&quot;set&quot; data=&quot;playback_delimiter=!&quot;/&gt; when playing chained prompts for the 1st time in DP. Any other usage of chained prompts further in DP results in no DTMF inputs messup.<br>
what i did was to combine prompts to be played into a single file and served that to read function. ... after that any other attempt to collect digits was fine ...<br><br>T.<br><br><br><div class="gmail_quote">On Tue, Aug 10, 2010 at 2:34 PM, Tihomir Culjaga <span dir="ltr">&lt;<a href="mailto:tculjaga@gmail.com">tculjaga@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">hello guys,<br><br>i got a problem with read function (<a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_read" target="_blank">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_read</a>) in dialplan.<br>
<br><br><br>  &lt;extension name=&quot;LangSelInput&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot; expression=&quot;^LangSelInput$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;playback_delimiter=!&quot;/&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;playback_terminators=#*0123456789&quot;/&gt;<br>

      &lt;!-- &lt;action application=&quot;start_dtmf&quot;/&gt; --&gt;<br>      &lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;myLANG=&quot;&quot;&quot;/&gt;<br>      &lt;action application=&quot;read&quot; data=&quot;0 1 ${WELCOME_PR}!${ERR_PR}!${LANG_PROMPT_STRING} myLANG ${LANG_TIMEOUT} &quot;/&gt;<br>

      &lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;LANG_RETRIES=${expr(${LANG_RETRIES}+1)}&quot;/&gt;<br>&lt;!--      &lt;action application=&quot;stop_dtmf&quot;/&gt; --&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;LangSel XML NXIVR&quot;/&gt;<br>

    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br><br>   &lt;extension name=&quot;LangSel&quot;&gt;<br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^LangSel$&quot;/&gt;<br>      &lt;condition field=&quot;${myLANG}&quot; expression=&quot;^1$&quot; break=&quot;on-true&quot;&gt;<br>

         &lt;action application=&quot;log&quot; data=&quot;INFO ################# HR ################\n&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;sound_prefix=$${sounds_dir}/hr/HR/teta1&quot;/&gt;<br>

         &lt;action application=&quot;set&quot; data=&quot;language=hr&quot;/&gt;<br>      &lt;/condition&gt;<br><br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^LangSel$&quot;/&gt;<br>      &lt;condition field=&quot;${myLANG}&quot; expression=&quot;^2$&quot; break=&quot;on-true&quot;&gt;<br>

         &lt;action application=&quot;log&quot; data=&quot;INFO ################# EN ################\n&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;sound_prefix=$${sounds_dir}/en/us/callie&quot;/&gt;<br>

         &lt;action application=&quot;set&quot; data=&quot;language=en&quot;/&gt;<br>      &lt;/condition&gt;<br><br><br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^LangSel$&quot;/&gt;<br>      &lt;condition field=&quot;${myLANG}&quot; expression=&quot;^[06789]$&quot; break=&quot;on-true&quot;&gt;<br>

         &lt;action application=&quot;log&quot; data=&quot;INFO ################# WRONG LANG SEL ################\n&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;language=hr&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;ERR_PR=${WRONG_LANG_PROMPT}&quot;/&gt;<br>

         &lt;action application=&quot;execute_extension&quot; data=&quot;LangRetries XML NXIVR&quot;/&gt;<br>      &lt;/condition&gt;<br><br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^LangSel$&quot;/&gt;<br>

      &lt;condition field=&quot;${myLANG}&quot; expression=&quot;^$&quot; break=&quot;on-true&quot;&gt;<br>         &lt;action application=&quot;log&quot; data=&quot;INFO ################# NO LANG SEL ################\n&quot;/&gt;<br>

         &lt;action application=&quot;set&quot; data=&quot;language=hr&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;ERR_PR=${NO_LANG_PROMPT}&quot;/&gt;<br>         &lt;action application=&quot;execute_extension&quot; data=&quot;LangRetries XML NXIVR&quot;/&gt;<br>

      &lt;/condition&gt;<br><br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^LangSel$&quot;/&gt;<br>      &lt;condition field=&quot;${myLANG}&quot; expression=&quot;^.*$&quot; break=&quot;on-true&quot;&gt;<br>

         &lt;action application=&quot;log&quot; data=&quot;INFO ################# WRONG LANG SEL ################\n&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;language=hr&quot;/&gt;<br>         &lt;action application=&quot;set&quot; data=&quot;ERR_PR=${WRONG_LANG_PROMPT}&quot;/&gt;<br>

         &lt;action application=&quot;execute_extension&quot; data=&quot;LangRetries XML NXIVR&quot;/&gt;<br>      &lt;/condition&gt;<br>   &lt;/extension&gt;<br><br><br><br><br>when this part of dialplan executes and i enter the DTMF digit immediately on 1st letter, the collected DTMF digits are not consistent... as there is a memory overwrite somewhere ....<br>

<br><br><br><br>2010-08-10 15:27:22.056491 [INFO] mod_dptools.c:946 ################# LangSel ################\n<br>2010-08-10 15:27:22.056491 [NOTICE] switch_core_session.c:1949 Execute set(WELCOME_PR=${DEFAULT_LANG_PATH}ivr/welcome.wav)<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> set(WELCOME_PR=/usr/local/freeswitch/sounds/hr/HR/teta1/ivr/welcome.wav)<br>2010-08-10 15:27:22.056491 [DEBUG] mod_dptools.c:816 sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> SET [WELCOME_PR]=[/usr/local/freeswitch/sounds/hr/HR/teta1/ivr/welcome.wav]<br>

2010-08-10 15:27:22.056491 [NOTICE] switch_core_session.c:1949 Execute execute_extension(LangSelInput XML NXIVR)<br>EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> execute_extension(LangSelInput XML NXIVR)<br>

2010-08-10 15:27:22.056491 [INFO] mod_dialplan_xml.c:418 Processing 38516659280-&gt;LangSelInput in context NXIVR<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> parsing [NXIVR-&gt;LangSelInput] continue=false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSelInput] destination_number(LangSelInput) =~ /^LangSelInput$/ break=on-false<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action set(playback_delimiter=!) <br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action set(playback_terminators=#*0123456789) <br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action set(myLANG=) INLINE<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> set(myLANG=)<br>2010-08-10 15:27:22.058522 [DEBUG] mod_dptools.c:816 sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> SET [myLANG]=[UNDEF]<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action read(0 1 ${WELCOME_PR}!${ERR_PR}!${LANG_PROMPT_STRING} myLANG ${LANG_TIMEOUT} ) <br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action set(LANG_RETRIES=${expr(${LANG_RETRIES}+1)}) INLINE<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> set(LANG_RETRIES=1)<br>2010-08-10 15:27:22.058522 [DEBUG] mod_dptools.c:816 sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> SET [LANG_RETRIES]=[1]<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action execute_extension(LangSel XML NXIVR) <br>2010-08-10 15:27:22.058522 [NOTICE] switch_core_session.c:1949 Execute set(playback_delimiter=!)<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> set(playback_delimiter=!)<br>2010-08-10 15:27:22.058522 [DEBUG] mod_dptools.c:816 sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> SET [playback_delimiter]=[!]<br>

2010-08-10 15:27:22.058522 [NOTICE] switch_core_session.c:1949 Execute set(playback_terminators=#*0123456789)<br>EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> set(playback_terminators=#*0123456789)<br>

2010-08-10 15:27:22.058522 [DEBUG] mod_dptools.c:816 sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> SET [playback_terminators]=[#*0123456789]<br>2010-08-10 15:27:22.058522 [NOTICE] switch_core_session.c:1949 Execute read(0 1 ${WELCOME_PR}!${ERR_PR}!${LANG_PROMPT_STRING} myLANG ${LANG_TIMEOUT} )<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> read(0 1 /usr/local/freeswitch/sounds/hr/HR/teta1/ivr/welcome.wav!!/usr/local/freeswitch/sounds/hr/HR/teta1/ivr/for_croatian.wav!/usr/local/freeswitch/sounds/hr/HR/teta1/ivr/press.wav!/usr/local/freeswitch/sounds/hr/HR/teta1/ivr/one.wav!/usr/local/freeswitch/sounds/en/us/callie/ivr/for_en_press2.wav!/usr/local/freeswitch/sounds/de/de/helge/ivr/for_german_press3.wav!/usr/local/freeswitch/sounds/it/it/ambra/ivr/for_italian_press4.wav!/usr/local/freeswitch/sounds/fr/fr/celine/ivr/for_french_press5.wav myLANG 10000 )<br>

2010-08-10 15:27:22.059474 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms<br>2010-08-10 15:27:22.872525 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>2010-08-10 15:27:22.934526 [DEBUG] switch_rtp.c:2428 RTP RECV DTMF 1:752<br>

2010-08-10 15:27:22.934526 [ERR] mod_native_file.c:74 Error opening /usr/local/freeswitch/sounds/en/us/callie/.PCMA<br>2010-08-10 15:27:23.892521 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>2010-08-10 15:27:25.012528 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>

2010-08-10 15:27:25.832521 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>2010-08-10 15:27:29.792528 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>2010-08-10 15:27:31.872524 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>

2010-08-10 15:27:34.492524 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>2010-08-10 15:27:37.152526 [DEBUG] switch_ivr_play_say.c:1444 done playing file<br>2010-08-10 15:27:37.152526 [NOTICE] switch_core_session.c:1949 Execute execute_extension(LangSel XML NXIVR)<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> execute_extension(LangSel XML NXIVR)<br>2010-08-10 15:27:37.152526 [INFO] mod_dialplan_xml.c:418 Processing 38516659280-&gt;LangSel in context NXIVR<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> parsing [NXIVR-&gt;LangSel] continue=false<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^1$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^2$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^3$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^4$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^5$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^[06789]$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (FAIL) [LangSel] ${myLANG}(1^»@đ ) =~ /^$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] destination_number(LangSel) =~ /^LangSel$/ break=on-false<br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Regex (PASS) [LangSel] ${myLANG}(1^»@đ ) =~ /^.*$/ break=on-true<br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action log(INFO ################# WRONG LANG SEL ################\n) <br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action set(language=hr) <br>Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action set(ERR_PR=${WRONG_LANG_PROMPT}) <br>

Dialplan: sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> Action execute_extension(LangRetries XML NXIVR) <br>2010-08-10 15:27:37.154487 [NOTICE] switch_core_session.c:1949 Execute log(INFO ################# WRONG LANG SEL ################\n)<br>

EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> log(INFO ################# WRONG LANG SEL ################\n)<br>2010-08-10 15:27:37.154487 [INFO] mod_dptools.c:946 ################# WRONG LANG SEL ################\n<br>

2010-08-10 15:27:37.154487 [NOTICE] switch_core_session.c:1949 Execute set(language=hr)<br>EXECUTE sofia/external/<a href="mailto:38516659280@195.88.212.41" target="_blank">38516659280@195.88.212.41</a> set(language=hr)<br>
<br><br>you can see myLANG variable holds &quot;1^»@đ &quot; ... of course i dialed 1 as seen in the log (switch_rtp.c:2428 RTP RECV DTMF 1:752).<br>
<br><br>now, i did some extra testing and found that it happens only when i use a playback_separator to append multiple files to be played....<br><br>i checked  switch_ivr_read and switch_ivr_collect_digits_count functions but everything seems to be ok there...<br>

<br><br><br>can anyone help locating the problem ?<br><br><br><br><br>Ps: im running <br><br><br>freeswitch@cxss01&gt; version<br><br>FreeSWITCH Version 1.0.6 (svn-exported)<br><br>tried with Revision: 17032 before this one but seems to be the same....<br>

<br><br><br>[tculjaga@cxss01 src]$ cat /etc/issue<br>CentOS release 5.4 (Final)<br>Kernel \r on an \m<br><br>[tculjaga@cxss01 src]$<br><br><br><br>[tculjaga@cxss01 src]$ uname -a<br>Linux cxss01 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux<br>

[tculjaga@cxss01 src]$<br><br><br><br><br><br> <br><br><br>
</blockquote></div><br>