How about setting this only to #?<div><a href="http://wiki.freeswitch.org/wiki/Channel_Variables#playback_terminators">http://wiki.freeswitch.org/wiki/Channel_Variables#playback_terminators</a></div><div><br></div><div>-MC<br>
<br><div class="gmail_quote">On Thu, Jun 16, 2011 at 11:54 AM, Wes <span dir="ltr">&lt;<a href="mailto:wes-fs@499x.com">wes-fs@499x.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;m using the following script to record, and I&quot;m hoping to take a user<br>
keypress to trigger the end of the recording and then play it back:<br>
<br>
(the problem is that it stops on ANY keypress, while it seems like it<br>
should only break on a &quot;#&quot; keypress)<br>
<br>
I found this example at:<br>
<a href="http://wiki.freeswitch.org/wiki/Mod_lua#session:recordFile" target="_blank">http://wiki.freeswitch.org/wiki/Mod_lua#session:recordFile</a><br>
<br>
local numberToCall = 1234<br>
local session = freeswitch.Session(&quot;sofia/xxx.xxx.xxx.xxx/&quot;..numberToCall);<br>
session:set_tts_parms(&quot;flite&quot;, &quot;kal&quot;);<br>
session:speak(&quot;Thank you for using my recording service, press the pound<br>
key to stop the recording.&quot;  );<br>
<br>
function onInput(s, type, obj)<br>
   if (type == &quot;dtmf&quot; and obj[&#39;digit&#39;] == &#39;#&#39;) then<br>
       return &quot;break&quot;;<br>
   end<br>
end<br>
<br>
session:setInputCallback(&quot;onInput&quot;, &quot;&quot;);<br>
session:recordFile(&quot;/tmp/luatest.wav&quot;);<br>
freeswitch.consoleLog(&quot;info&quot;, &quot;recording stopped by user keypress \n&quot;);<br>
session:speak(&quot;your voicehas been recorded, i will play it for you now&quot;);<br>
session:streamFile(&quot;/tmp/luatest.wav&quot;);<br>
session:speak(&quot;that&#39;s it, goodbye.&quot;);<br>
freeswitch.consoleLog(&quot;info&quot;, &quot;hanging up... \n&quot;);<br>
session:hangup();<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>