i think i found the source of a problem, <br><br>its <action application="set" data="playback_delimiter=!"/> 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"><<a href="mailto:tculjaga@gmail.com">tculjaga@gmail.com</a>></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> <extension name="LangSelInput"><br>
<condition field="destination_number" expression="^LangSelInput$"><br> <action application="set" data="playback_delimiter=!"/><br> <action application="set" data="playback_terminators=#*0123456789"/><br>
<!-- <action application="start_dtmf"/> --><br> <action inline="true" application="set" data="myLANG="""/><br> <action application="read" data="0 1 ${WELCOME_PR}!${ERR_PR}!${LANG_PROMPT_STRING} myLANG ${LANG_TIMEOUT} "/><br>
<action inline="true" application="set" data="LANG_RETRIES=${expr(${LANG_RETRIES}+1)}"/><br><!-- <action application="stop_dtmf"/> --><br> <action application="execute_extension" data="LangSel XML NXIVR"/><br>
</condition><br> </extension><br><br><br> <extension name="LangSel"><br> <condition field="destination_number" expression="^LangSel$"/><br> <condition field="${myLANG}" expression="^1$" break="on-true"><br>
<action application="log" data="INFO ################# HR ################\n"/><br> <action application="set" data="sound_prefix=$${sounds_dir}/hr/HR/teta1"/><br>
<action application="set" data="language=hr"/><br> </condition><br><br> <condition field="destination_number" expression="^LangSel$"/><br> <condition field="${myLANG}" expression="^2$" break="on-true"><br>
<action application="log" data="INFO ################# EN ################\n"/><br> <action application="set" data="sound_prefix=$${sounds_dir}/en/us/callie"/><br>
<action application="set" data="language=en"/><br> </condition><br><br><br> <condition field="destination_number" expression="^LangSel$"/><br> <condition field="${myLANG}" expression="^[06789]$" break="on-true"><br>
<action application="log" data="INFO ################# WRONG LANG SEL ################\n"/><br> <action application="set" data="language=hr"/><br> <action application="set" data="ERR_PR=${WRONG_LANG_PROMPT}"/><br>
<action application="execute_extension" data="LangRetries XML NXIVR"/><br> </condition><br><br> <condition field="destination_number" expression="^LangSel$"/><br>
<condition field="${myLANG}" expression="^$" break="on-true"><br> <action application="log" data="INFO ################# NO LANG SEL ################\n"/><br>
<action application="set" data="language=hr"/><br> <action application="set" data="ERR_PR=${NO_LANG_PROMPT}"/><br> <action application="execute_extension" data="LangRetries XML NXIVR"/><br>
</condition><br><br> <condition field="destination_number" expression="^LangSel$"/><br> <condition field="${myLANG}" expression="^.*$" break="on-true"><br>
<action application="log" data="INFO ################# WRONG LANG SEL ################\n"/><br> <action application="set" data="language=hr"/><br> <action application="set" data="ERR_PR=${WRONG_LANG_PROMPT}"/><br>
<action application="execute_extension" data="LangRetries XML NXIVR"/><br> </condition><br> </extension><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->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->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->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->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 "1^»@đ " ... 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> 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>