Re: [Freeswitch-users] Javascript input
That would make no sense because it is totally unreasonable to assume that everyone wants that behavior. Why does *your* preference deserve to be the default behavior instead of mine? If you need monolithic narrow minded approaches to ivr code I can recommend something else for you. Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 ----- Original Message ---- From: Jonas Gauffin <jonas.gauffin@gmail.com> To: freeswitch-users@lists.freeswitch.org Sent: Thursday, August 9, 2007 10:45:58 AM Subject: [Freeswitch-users] Javascript input Hello I would like to have a change in the way that DTMF input are being used. It would be much nicer if records and playing phrases are per default aborted if a DTMF is pressed. This behavior should be overridden if recordFile and streamFile have got a callback specified (which handles if a DTMF should stops the recording/phrase or not). I think that the most usual case is that DTMF aborts both recordings and phrases, and it should therefore be the most easy alternative to use. Right now, one have to use callbacks (which requires a lot more work) to get the most common behavior. //jonas _______________________________________________ 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 ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469
What polite and friendly answer. Thank you. Almost sounds that you don't want any discussion if someone questions your design choices. And that is NOT what I did. FreeSwitch is very nice. I simply suggested what I thought was the best solution for a commonly used function. And it would be nice to get a discussion and not such rude answer back. And i'm not making suggestions out of the blue, i'm been working as a telecom programmer for 11 years now. And trust me, my solutions have NEVER been "monolithic narrow minded". On 8/9/07, Anthony Minessale <anthmct@yahoo.com> wrote:
That would make no sense because it is totally unreasonable to assume that everyone wants that behavior. Why does *your* preference deserve to be the default behavior instead of mine? If you need monolithic narrow minded approaches to ivr code I can recommend something else for you.
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
----- Original Message ---- From: Jonas Gauffin <jonas.gauffin@gmail.com> To: freeswitch-users@lists.freeswitch.org Sent: Thursday, August 9, 2007 10:45:58 AM Subject: [Freeswitch-users] Javascript input
Hello
I would like to have a change in the way that DTMF input are being used.
It would be much nicer if records and playing phrases are per default aborted if a DTMF is pressed. This behavior should be overridden if recordFile and streamFile have got a callback specified (which handles if a DTMF should stops the recording/phrase or not).
I think that the most usual case is that DTMF aborts both recordings and phrases, and it should therefore be the most easy alternative to use. Right now, one have to use callbacks (which requires a lot more work) to get the most common behavior.
//jonas
_______________________________________________ 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
________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. _______________________________________________ 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
Why not simply make another streamFile method that aborts on input. Then the user can choose which one he wants. I can elaborate my wish too. I guess that you have used a lot of IVR applications, right? For instance, you call your phone provider and they have a IVR menu before the call center. The first time you call them you listen on all the choices and press the correct DTMF after each phrase. But after a couple of times you have learned that "1 2 1" get's you to the correct queue. Do you then want to hear all the phrases or do you want to be able to press the correct DTMF digits right away? You must agree with me that that is the most common way of coding IVR apps, right? How often do you want to force the customer to listen to a phrase? As I see it, it's only when you play important phrases. And how often is that? I'm quite interested in your point of view. Why did you make ignore-and-eat-all-DTMF the default choice? On 8/10/07, Jonas Gauffin <jonas.gauffin@gmail.com> wrote:
What polite and friendly answer. Thank you. Almost sounds that you don't want any discussion if someone questions your design choices. And that is NOT what I did. FreeSwitch is very nice. I simply suggested what I thought was the best solution for a commonly used function.
And it would be nice to get a discussion and not such rude answer back. And i'm not making suggestions out of the blue, i'm been working as a telecom programmer for 11 years now. And trust me, my solutions have NEVER been "monolithic narrow minded".
On 8/9/07, Anthony Minessale <anthmct@yahoo.com> wrote:
That would make no sense because it is totally unreasonable to assume that everyone wants that behavior. Why does *your* preference deserve to be the default behavior instead of mine? If you need monolithic narrow minded approaches to ivr code I can recommend something else for you.
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
----- Original Message ---- From: Jonas Gauffin <jonas.gauffin@gmail.com> To: freeswitch-users@lists.freeswitch.org Sent: Thursday, August 9, 2007 10:45:58 AM Subject: [Freeswitch-users] Javascript input
Hello
I would like to have a change in the way that DTMF input are being used.
It would be much nicer if records and playing phrases are per default aborted if a DTMF is pressed. This behavior should be overridden if recordFile and streamFile have got a callback specified (which handles if a DTMF should stops the recording/phrase or not).
I think that the most usual case is that DTMF aborts both recordings and phrases, and it should therefore be the most easy alternative to use. Right now, one have to use callbacks (which requires a lot more work) to get the most common behavior.
//jonas
_______________________________________________ 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
________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. _______________________________________________ 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
You do currently have the option to either continue playing the prompt or abort the prompt. In order to collect the digits during the playing of a prompt you must code a dtmf_callback handler. When a user presses a digit your call back handler gets called. You can decide it the digit is a valid one and if it is valid return "false" (or the digit) causing the prompt to stop. If the digit is not valid you can ignore it by returning "true" and the prompting will continue. While this does require the application developer to code a digit handler it gives you a much richer option for the handling of the results. You are free to develop your own wrapper function to force the particular behaviour you want. I have written a getdigits function in javascript that you are welcome to use to get the behaviour you are looking for. Michael B. Murdock ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Jonas Gauffin Sent: Fri 8/10/2007 2:49 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Javascript input Why not simply make another streamFile method that aborts on input. Then the user can choose which one he wants. I can elaborate my wish too. I guess that you have used a lot of IVR applications, right? For instance, you call your phone provider and they have a IVR menu before the call center. The first time you call them you listen on all the choices and press the correct DTMF after each phrase. But after a couple of times you have learned that "1 2 1" get's you to the correct queue. Do you then want to hear all the phrases or do you want to be able to press the correct DTMF digits right away? You must agree with me that that is the most common way of coding IVR apps, right? How often do you want to force the customer to listen to a phrase? As I see it, it's only when you play important phrases. And how often is that? I'm quite interested in your point of view. Why did you make ignore-and-eat-all-DTMF the default choice? On 8/10/07, Jonas Gauffin <jonas.gauffin@gmail.com> wrote:
What polite and friendly answer. Thank you. Almost sounds that you don't want any discussion if someone questions your design choices. And that is NOT what I did. FreeSwitch is very nice. I simply suggested what I thought was the best solution for a commonly used function.
And it would be nice to get a discussion and not such rude answer back. And i'm not making suggestions out of the blue, i'm been working as a telecom programmer for 11 years now. And trust me, my solutions have NEVER been "monolithic narrow minded".
On 8/9/07, Anthony Minessale <anthmct@yahoo.com> wrote:
That would make no sense because it is totally unreasonable to assume that everyone wants that behavior. Why does *your* preference deserve to be the default behavior instead of mine? If you need monolithic narrow minded approaches to ivr code I can recommend something else for you.
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
----- Original Message ---- From: Jonas Gauffin <jonas.gauffin@gmail.com> To: freeswitch-users@lists.freeswitch.org Sent: Thursday, August 9, 2007 10:45:58 AM Subject: [Freeswitch-users] Javascript input
Hello
I would like to have a change in the way that DTMF input are being used.
It would be much nicer if records and playing phrases are per default aborted if a DTMF is pressed. This behavior should be overridden if recordFile and streamFile have got a callback specified (which handles if a DTMF should stops the recording/phrase or not).
I think that the most usual case is that DTMF aborts both recordings and phrases, and it should therefore be the most easy alternative to use. Right now, one have to use callbacks (which requires a lot more work) to get the most common behavior.
//jonas
_______________________________________________ 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 <http://www.freeswitch.org/>
________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. _______________________________________________ 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 <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 <http://www.freeswitch.org/>
Yes. The current architecture works just fine. I'm not saying that the current method should be removed. It's excellent in those cases when you want to filter input during streamFile and recordFile. But I still think that those cases are more rare than wanting to abort the speech. Consider this a feature request then: A new streamFile that do not eat DTMF but aborts the speech instead. Or simply a new argument that specifies that the method should abort instead of eating the DTMF. On 8/10/07, Mike Murdock <mmurdock@coppercom.com> wrote:
You do currently have the option to either continue playing the prompt or abort the prompt. In order to collect the digits during the playing of a prompt you must code a dtmf_callback handler. When a user presses a digit your call back handler gets called. You can decide it the digit is a valid one and if it is valid return "false" (or the digit) causing the prompt to stop. If the digit is not valid you can ignore it by returning "true" and the prompting will continue. While this does require the application developer to code a digit handler it gives you a much richer option for the handling of the results.
You are free to develop your own wrapper function to force the particular behaviour you want. I have written a getdigits function in javascript that you are welcome to use to get the behaviour you are looking for.
Michael B. Murdock
________________________________
From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Jonas Gauffin Sent: Fri 8/10/2007 2:49 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Javascript input
Why not simply make another streamFile method that aborts on input. Then the user can choose which one he wants.
I can elaborate my wish too. I guess that you have used a lot of IVR applications, right? For instance, you call your phone provider and they have a IVR menu before the call center. The first time you call them you listen on all the choices and press the correct DTMF after each phrase.
But after a couple of times you have learned that "1 2 1" get's you to the correct queue. Do you then want to hear all the phrases or do you want to be able to press the correct DTMF digits right away?
You must agree with me that that is the most common way of coding IVR apps, right? How often do you want to force the customer to listen to a phrase?
As I see it, it's only when you play important phrases. And how often is that?
I'm quite interested in your point of view. Why did you make ignore-and-eat-all-DTMF the default choice?
On 8/10/07, Jonas Gauffin <jonas.gauffin@gmail.com> wrote:
What polite and friendly answer. Thank you. Almost sounds that you don't want any discussion if someone questions your design choices. And that is NOT what I did. FreeSwitch is very nice. I simply suggested what I thought was the best solution for a commonly used function.
And it would be nice to get a discussion and not such rude answer back. And i'm not making suggestions out of the blue, i'm been working as a telecom programmer for 11 years now. And trust me, my solutions have NEVER been "monolithic narrow minded".
On 8/9/07, Anthony Minessale <anthmct@yahoo.com> wrote:
That would make no sense because it is totally unreasonable to assume that everyone wants that behavior. Why does *your* preference deserve to be the default behavior instead of mine? If you need monolithic narrow minded approaches to ivr code I can recommend something else for you.
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
----- Original Message ---- From: Jonas Gauffin <jonas.gauffin@gmail.com> To: freeswitch-users@lists.freeswitch.org Sent: Thursday, August 9, 2007 10:45:58 AM Subject: [Freeswitch-users] Javascript input
Hello
I would like to have a change in the way that DTMF input are being used.
It would be much nicer if records and playing phrases are per default aborted if a DTMF is pressed. This behavior should be overridden if recordFile and streamFile have got a callback specified (which handles if a DTMF should stops the recording/phrase or not).
I think that the most usual case is that DTMF aborts both recordings and phrases, and it should therefore be the most easy alternative to use. Right now, one have to use callbacks (which requires a lot more work) to get the most common behavior.
//jonas
_______________________________________________ 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 <http://www.freeswitch.org/>
________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. _______________________________________________ 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 <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 <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
Jonas, To what purpose would having a streamFile abort without DTMF input? If the streamFile operation is going to require aborting then DTMF input or voice recognition will be the means. Jonas, your heart is in the right place, but everything you have asked for is already implemented in a very flexible manner within the JavaScript engine. Regards, Chris Danielson
Yes. The current architecture works just fine.
I'm not saying that the current method should be removed. It's excellent in those cases when you want to filter input during streamFile and recordFile. But I still think that those cases are more rare than wanting to abort the speech.
Consider this a feature request then: A new streamFile that do not eat DTMF but aborts the speech instead. Or simply a new argument that specifies that the method should abort instead of eating the DTMF.
On 8/10/07, Mike Murdock <mmurdock@coppercom.com> wrote:
You do currently have the option to either continue playing the prompt or abort the prompt. In order to collect the digits during the playing of a prompt you must code a dtmf_callback handler. When a user presses a digit your call back handler gets called. You can decide it the digit is a valid one and if it is valid return "false" (or the digit) causing the prompt to stop. If the digit is not valid you can ignore it by returning "true" and the prompting will continue. While this does require the application developer to code a digit handler it gives you a much richer option for the handling of the results.
You are free to develop your own wrapper function to force the particular behaviour you want. I have written a getdigits function in javascript that you are welcome to use to get the behaviour you are looking for.
Michael B. Murdock
________________________________
From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Jonas Gauffin Sent: Fri 8/10/2007 2:49 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Javascript input
Why not simply make another streamFile method that aborts on input. Then the user can choose which one he wants.
I can elaborate my wish too. I guess that you have used a lot of IVR applications, right? For instance, you call your phone provider and they have a IVR m
Ok. Let's take an example: I got a voicemail application that plays a lot of phrases. Let's check a simple example: session.streamFile("you_have.wav"); session.streamFile("2.wav"); session.streamFile("new_messages.wav"); choice = session.getDigit(1, "", 5000); Ok. I want to skip to the second voicemail by pressing 2. That's not possible with the code above. Instead you have to do something like this: var _digits = ""; function on_dtmf(type, digits, arg) { _digits += digits; return false; } function say(phrase) { if (_digits != "") return false; session.streamFile(phrase, on_dtmf); } function getDigits(length, terminators, timeout) { if (_digits != '') { var tempVar = _digits; _digits = ""; return tempVar; } return session.getDigits(length, terminators, timeout); } say("you_have.wav"); say("2.wav"); say("new_messages"); choice = getDigits(1, "", 5000); Right? That will abort speach on input and return the pressed digit. But what if we want to enter a pincode or something like that? Then we need to handle both _digits AND use session.getDigits: function getDigits(length, terminators, timeout) { if (_digits.length < length) { tempVar = _digits; _digits = ""; tempVar += session.getDigits(length - _digits.length, terminators, timeout); return tempVar; } else { tempVar = _digits; _digits = ""; return tempVar; } } Get my point? All of that could have been two lines of code if there was an alternative to streamFile which do not remove the DTMF from the input queue (or whatever it's called): session.streamAndAbortOnDtmf("theFile.wav"); var digit = session.getDigits(1, "", 3000); All I wanted was an alternative that is simple. Again: I'm not looking for a replacement of streamFile but an complement for those who just want to do the above. I apologize if my examples are incorrect in some way, I've written them directly in this email with my mind as a reference. I might have done some syntax errors or something like that. Afterall, it's saturday =) But anyway. I can create an alternative to streamFile which does On 8/10/07, Chris Danielson <chris@maxpowersoft.com> wrote:
Jonas, To what purpose would having a streamFile abort without DTMF input? If the streamFile operation is going to require aborting then DTMF input or voice recognition will be the means. Jonas, your heart is in the right place, but everything you have asked for is already implemented in a very flexible manner within the JavaScript engine. Regards, Chris Danielson
Yes. The current architecture works just fine.
I'm not saying that the current method should be removed. It's excellent in those cases when you want to filter input during streamFile and recordFile. But I still think that those cases are more rare than wanting to abort the speech.
Consider this a feature request then: A new streamFile that do not eat DTMF but aborts the speech instead. Or simply a new argument that specifies that the method should abort instead of eating the DTMF.
On 8/10/07, Mike Murdock <mmurdock@coppercom.com> wrote:
You do currently have the option to either continue playing the prompt or abort the prompt. In order to collect the digits during the playing of a prompt you must code a dtmf_callback handler. When a user presses a digit your call back handler gets called. You can decide it the digit is a valid one and if it is valid return "false" (or the digit) causing the prompt to stop. If the digit is not valid you can ignore it by returning "true" and the prompting will continue. While this does require the application developer to code a digit handler it gives you a much richer option for the handling of the results.
You are free to develop your own wrapper function to force the particular behaviour you want. I have written a getdigits function in javascript that you are welcome to use to get the behaviour you are looking for.
Michael B. Murdock
________________________________
From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Jonas Gauffin Sent: Fri 8/10/2007 2:49 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Javascript input
Why not simply make another streamFile method that aborts on input. Then the user can choose which one he wants.
I can elaborate my wish too. I guess that you have used a lot of IVR applications, right? For instance, you call your phone provider and they have a IVR m
_______________________________________________ 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
participants (4)
-
Anthony Minessale
-
Chris Danielson
-
Jonas Gauffin
-
Mike Murdock