Passing Digits on Playback
Is it possible to pass the digits collected to the callback url
on Playback similar to Speak? It seems like the behaviour should be
consistent. We have a menu where we play:
Press 1 for...
Press 2 for...
Press 3 for...
Press 4 for...
Press 5 for...
Press 9 for...
it would be nice if the user could press the digit they want while listening to the message without having to wait for the end of the message and the subsequent GetDigits command.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Dean on 13 Feb, 2010 05:10 AM
By the way, we've chucked the message up into 12 different segments each with a callback URL.
3 Posted by singingwolfboy on 14 Feb, 2010 05:30 PM
This would be great for voice recording, as well! Ideally, the user should be able to "cut off" the system: it should detect when the user has started speaking and stop the "Speak" command there, so that the user can speak instead.
Support Staff 4 Posted by Troy on 15 Feb, 2010 04:27 AM
Hi Dean,
I wanted to let you know that we're going to tinker on this tomorrow and see what we can get going. If I understand correctly, you have prepared audio files for each menu option, and are using Playback to play them in series. Would the ideal case be for a keypress during the Playback to immediately trigger the callback URL?
Cheers and thanks,
Troy
Cloudvox
5 Posted by Dean on 15 Feb, 2010 04:41 AM
Hi Troy,
Thanks for the response. I have prepared a series of audio files that are each played and have a callback URL
Example
Audio 1 - To listen to the options again
Audio 2 - Press 1
Audio 3 - To be transferred to the next available agent
Audio 4 - Press 2
There are 12 of these that when played sequentially, form a complete menu. I've added a callback URL to each option, hoping that any digits collected would be passed as a result.
With respect to your question regarding the immediate trigger of the callback URL, I would think the behavior should be consistent with speak. How does speak work? I would think that if a keypress immediately triggered the callback URL, then it would never support more than 1 digit. I don't know if that should be the behavior for all apps...
Support Staff 6 Posted by Troy on 20 Feb, 2010 05:28 PM
Hi Dean,
Thanks for the explanation. You nailed it about the tradeoff between immediately performing a callback and waiting for successive digits. For your case, would you prefer it to be at the end of the Playback (or Speak), but not immediately, and not needing to wait for the getdigits? We may need to play with this a bit, but I totally see the usefulness.
Cheers,
Troy
Cloudvox
7 Posted by Dean on 21 Feb, 2010 08:49 PM
For my case right now, immediately interrupting the prompt and hitting the callback URL would be ideal.
Having said that, I just want to throw one thought out there. What if there were the ability to configure speak and playback actions in such a way that if any digits were dialed, the collected digits would be immediately passed to the next GetDigits that is queued up. This method would allow you to reuse the existing GetDigits functionality and also allow 1 or more digits.
Obviously, this would have to be an attribute that is configured on Playback and Speak as this behaviour should only occur when a GetDigits is queued up.
Just a thought.
Support Staff 8 Posted by Troy on 03 Mar, 2010 12:58 AM
Hi Dean,
I just wanted to reply and let you know we're mulling this over as part of our next major upgrade. This isn't an easy undertaking to pull off, but I think it would be really useful, and can see exactly why you want it.
Also, I tested the speak method followed by a getdigit command, with the scripts at:
https://gist.github.com/944363fa381556402980
I tested both playback then getdigits, and speak then getdigits (the 2 files shown). When a digit is pressed midway through the speak phrase, about 0.5 seconds later it jumps ahead to the getdigits and posts that already-entered digit as the result.
However, for playback, the digits are discarded and getdigits waits for fresh input.
I think the only solution right now might be to use AGI (any of the language-specific options on http://help.cloudvox.com/faqs/getting-started/), and to use the Background command. It is interrupted immediately when the user presses a digit.
When we next do a major refresh the HTTP API, we'll look strongly at supporting an "interruptable" option that can be set on Speak, which would do exactly this. I don't have an ETA for that. Until then, I'd suggest AGI as a good workaround.
And thanks again for the great feedback. Cheers,
Troy
Cloudvox
Troy resolved this discussion on 03 Mar, 2010 12:58 AM.
Support Staff 9 Posted by Troy on 03 Mar, 2010 01:02 AM
Also, Dean, I updated the docs on http://help.cloudvox.com/faqs/getting-started/http-api for both steps. Cheers,
Troy
Cloudvox
Eric re-opened this discussion on 14 May, 2010 05:42 PM
Support Staff 10 Posted by Eric on 14 May, 2010 05:42 PM
We've deployed a fix where now:
speakwill interrupt the playbackgetdigitsThis should make that code much simpler.
Let me know if you run into any issues.
Troy resolved this discussion on 11 Jun, 2010 03:32 PM.