<div style="text-align:auto">Brian, I've read 8-9 of your emails asking to not hijack threads in threads where this it didn't happen (like this). I see this as a new thread with a single message (plus yours, of course) inside with "[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is playing" as the subject - and I think is quite relevant to the message. I suspect you have something wrong in your email client (mine is gmail) or server and suggest you to give it a check.</div>
<div style="text-align:auto"><br></div><div style="text-align:auto">Regards,</div><div style="text-align:auto"> Raffaele</div>
<br><div class="gmail_quote">On Sat, Aug 8, 2009 at 17:59, Brian West <span dir="ltr"><<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Examples exist in the scripts/lua folder called callback.lua. Also<br>
please DO NOT hijack threads. You can't click reply, change the<br>
subject as it messes up the mailing list threading and most mail<br>
readers will thread it incorrectly.<br>
<br>
Thanks,<br>
<font color="#888888">Brian<br>
</font><div><div></div><div><br>
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:<br>
<br>
> in a lua script, i've tried using session:setInputCallback() to catch<br>
> DTMF tones while a phrase macro is playing, but it doesn't seem to<br>
> work. the same callback _does_ catch DTMF when i use<br>
> session:streamFile() to play something. is there some other way to do<br>
> it?<br>
><br>
> below is an example of how i'm doing it now. when voicemail/vm-<br>
> mailbox_full.wav plays, i see key presses being printed to the<br>
> console, but when the phrase plays, no key presses are displayed.<br>
><br>
> function key_press(session, input_type, data)<br>
> if input_type == "dtmf" then<br>
> freeswitch.consoleLog("info", "Key pressed: " .. data["digit"] ..<br>
> "\n")<br>
> end<br>
> end<br>
><br>
> if session:ready() then<br>
> session:answer()<br>
> session:execute("sleep", "1000")<br>
> session:setInputCallback("key_press", "")<br>
> session:streamFile("voicemail/vm-mailbox_full.wav")<br>
> session:execute("phrase", "voicemail_menu,1:2:3:#")<br>
> end<br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
</div></div></blockquote></div><br>