VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
pjintheusa at gmail.com Guest
|
Posted: Thu Jul 23, 2009 1:20 pm Post subject: [Freeswitch-users] Barge on on prompts |
|
|
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. |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Thu Jul 23, 2009 1:44 pm Post subject: [Freeswitch-users] Barge on on prompts |
|
|
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@gmail.com (pjintheusa@gmail.com)> wrote:
Quote: | 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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
pjintheusa at gmail.com Guest
|
Posted: Thu Jul 23, 2009 2:48 pm Post subject: [Freeswitch-users] Barge on on prompts |
|
|
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@freeswitch.org (msc@freeswitch.org)> wrote:
Quote: | 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@gmail.com (pjintheusa@gmail.com)> wrote:
Quote: |
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@lists.freeswitch.org (FreeSWITCH-users@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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
dave at 3c.co.uk Guest
|
Posted: Thu Jul 23, 2009 3:24 pm Post subject: [Freeswitch-users] Barge on on prompts |
|
|
Hi Phillip,
You need to call FreeSWITCH's break function - I'd guess
Session.Break(); might do it for you, but no guarantees.
--Dave
Quote: | 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@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@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
| --
David Knell, Director, 3C Limited
T: +44 20 3298 2000
E: dave@3c.co.uk
W: http://www.3c.co.uk
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
pjintheusa at gmail.com Guest
|
Posted: Thu Jul 23, 2009 4:23 pm Post subject: [Freeswitch-users] Barge on on prompts |
|
|
Ah! That you very much.
Not Session.Break() but:
Session.DtmfReceivedFunction = (d, t) =>
{
Log.WriteLine(LogLevel.Info, "Received {0} for {1}.", d, t);
CollectedDigits = d.ToString().Trim();
return "break";
}
Thanks to you both for your help on this.
On Thu, Jul 23, 2009 at 4:17 PM, David Knell <dave@3c.co.uk (dave@3c.co.uk)> wrote:
Quote: | Hi Phillip,
You need to call FreeSWITCH's break function - I'd guess
Session.Break(); might do it for you, but no guarantees.
--Dave
Quote: | 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@freeswitch.org (msc@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@gmail.com (pjintheusa@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@lists.freeswitch.org (FreeSWITCH-users@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@lists.freeswitch.org (FreeSWITCH-users@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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
--
David Knell, Director, 3C Limited
T: +44 20 3298 2000
E: dave@3c.co.uk (dave@3c.co.uk)
W: http://www.3c.co.uk
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|