Ah! That you very much.<br><br>Not Session.Break() but:<br><br>Session.DtmfReceivedFunction = (d, t) =><br>{<br> Log.WriteLine(LogLevel.Info, "Received {0} for {1}.", d, t);<br> CollectedDigits = d.ToString().Trim();<br>
return "break";<br>}<br><br><br>Thanks to you both for your help on this.<br><br><div class="gmail_quote">On Thu, Jul 23, 2009 at 4:17 PM, David Knell <span dir="ltr"><<a href="mailto:dave@3c.co.uk">dave@3c.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Phillip,<br>
<br>
You need to call FreeSWITCH's break function - I'd guess<br>
Session.Break(); might do it for you, but no guarantees.<br>
<br>
--Dave<br>
<div><div></div><div class="h5"><br>
> Hi there,<br>
><br>
> Thanks for the reply. That information is extremely useful.<br>
><br>
> Given the code below though - when if I press '1' when the phrase is<br>
> playing - playing does not stop. It continues. I am looking for a<br>
> method to barge in and collect & react to digits immediately.<br>
><br>
><br>
> Session.DtmfReceivedFunction = (d, t) =><br>
> {<br>
> Log.WriteLine(LogLevel.Info, "Received {0} for<br>
> {1}.", d, t);<br>
> Session.StreamFile("", 0);<br>
> CollectedDigits = d.ToString().Trim();<br>
> return "";<br>
><br>
> };<br>
><br>
> Session.SayPhrase("msgcount", "187346", "en");<br>
><br>
><br>
> Any ideas? I am sure I must be missing something simple.<br>
><br>
> Thanks a lot.<br>
><br>
><br>
> Phillip Jones<br>
><br>
><br>
><br>
><br>
><br>
> On Thu, Jul 23, 2009 at 2:40 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>
> wrote:<br>
> I think you might want to check out phrase macros...<br>
> <a href="http://wiki.freeswitch.org/wiki/Speech_Phrase_Management" target="_blank">http://wiki.freeswitch.org/wiki/Speech_Phrase_Management</a><br>
> -MC<br>
><br>
><br>
> On Thu, Jul 23, 2009 at 11:13 AM, Phillip Jones<br>
> <<a href="mailto:pjintheusa@gmail.com">pjintheusa@gmail.com</a>> wrote:<br>
><br>
><br>
> Hi there,<br>
><br>
> Very simple scenario:<br>
><br>
> Session.DtmfReceivedFunction = (d, t) =><br>
> {<br>
> Log.WriteLine(LogLevel.Info, "Received {0} for<br>
> {1}.", d, t);<br>
> CollectedDigits = d.ToString().Trim();<br>
> return "";<br>
> };<br>
><br>
><br>
> Session.flushDigits();<br>
> Session.StreamFile(VoicemailPromptsDirectory +<br>
> "abigfile.wav", 0);<br>
><br>
> Question is, it there a way to kill the streaming when<br>
> the a digit is pressed?<br>
><br>
> I would use the Session.PlayAndGetDigits()<br>
><br>
> but that does not help when want to string things<br>
> together like:<br>
><br>
> Session.StreamFile(VoicemailPromptsDirectory +<br>
> "vm-to_delete_the_message.wav", 0);<br>
> Session.StreamFile(VoicemailPromptsDirectory +<br>
> "vm-press.wav", 0);<br>
> Session.Say("7", "en", "number", "pronounced");<br>
><br>
> Any help would be appreciated.<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>
><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>
><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>
</div></div><font color="#888888">--<br>
David Knell, Director, 3C Limited<br>
T: +44 20 3298 2000<br>
E: <a href="mailto:dave@3c.co.uk">dave@3c.co.uk</a><br>
W: <a href="http://www.3c.co.uk" target="_blank">http://www.3c.co.uk</a><br>
</font><div><div></div><div class="h5"><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>
</div></div></blockquote></div><br>