[Freeswitch-users] Barge on on prompts

Phillip Jones pjintheusa at gmail.com
Thu Jul 23 12:39:02 PDT 2009


Hi there,

Thanks for the reply. That information is extremely useful.

Given the code below though - when if I press '1' when the phrase is playing
- playing does not stop. It continues. I am looking for a method to barge in
and collect & react to digits immediately.


            Session.DtmfReceivedFunction = (d, t) =>
                {
                    Log.WriteLine(LogLevel.Info, "Received {0} for {1}.", d,
t);
                    Session.StreamFile("", 0);
                    CollectedDigits = d.ToString().Trim();
                    return "";

                };

            Session.SayPhrase("msgcount", "187346", "en");


Any ideas? I am sure I must be missing something simple.

Thanks a lot.


Phillip Jones





On Thu, Jul 23, 2009 at 2:40 PM, Michael Collins <msc at freeswitch.org> wrote:

> I think you might want to check out phrase macros...
> http://wiki.freeswitch.org/wiki/Speech_Phrase_Management
> -MC
>
> On Thu, Jul 23, 2009 at 11:13 AM, Phillip Jones <pjintheusa at gmail.com>wrote:
>
>> Hi there,
>>
>> Very simple scenario:
>>
>> Session.DtmfReceivedFunction = (d, t) =>
>> {
>>     Log.WriteLine(LogLevel.Info, "Received {0} for {1}.", d, t);
>>     CollectedDigits = d.ToString().Trim();
>>     return "";
>> };
>>
>>
>> Session.flushDigits();
>> Session.StreamFile(VoicemailPromptsDirectory + "abigfile.wav", 0);
>>
>> Question is, it there a way to kill the streaming when the a digit is
>> pressed?
>>
>> I would use the Session.PlayAndGetDigits()
>>
>> but that does not help when want to string things together like:
>>
>> Session.StreamFile(VoicemailPromptsDirectory +
>> "vm-to_delete_the_message.wav", 0);
>> Session.StreamFile(VoicemailPromptsDirectory + "vm-press.wav", 0);
>> Session.Say("7", "en", "number", "pronounced");
>>
>> Any help would be appreciated.
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090723/fb2f57f6/attachment-0002.html 


More information about the FreeSWITCH-users mailing list