09-15-2020 12:01 PM
I'm looking for a way to set the Play Prompt variable, or possibly an alternate variable, to only play a specific duration of the file. Appreciate the help.
UCCX 11.6
09-15-2020 12:14 PM
In all my years of working with this product, I have never seen this, and thinking on it, I don't think it's possible with native steps. I do wonder if the brilliant mind of @tannerezell could figure something out using Java? Or perhaps, if you could request the wav file from an outside server, which itself can generate snippets of audio on the fly, with duration based on a URL param.
E.g.,
Play Prompt (--Triggering Contact--, URL[https://promptserver/play/1005?duration=15)
09-15-2020 01:29 PM - edited 09-15-2020 01:42 PM
That is certainly an interesting solution. The problem I'm trying to solve is using a local MOH file, but still be able to accomplish tasks while the file is playing. For instance, when you use the MOH from the CTI, you place the caller on hold, but can still proceed with steps in the script. When using the local MOH file via Play Prompt, no other steps can occur behind the scenes while the hold music is playing. With CTI I can use the delay > call unhold > play expected wait time scenario. If uisng the local MOH file, I would have to create smaller snippets of the file which would be a PITA keeping track of when the MOH files change.
09-15-2020 01:51 PM
On one hand you said you wanted to do something while the music was playing, but on the other hand you said you wanted to stop the music, then do something, then return to the music. Is it more the latter scenario? Being able to arbitrarily pick how long the audio plays for? Because if it's the former, you could actually use the Trigger Application step in async mode to perform actions during a play prompt.
But yeah, I think I get your point about chopping up the audio, and the effort involved. Especially in an environment with a lot of different MOH, and frequently changing MOH.
So then, the solution you're originally asked for, that would need to be able to start playing a WAV file from a certain point too right? That way you can play like the first 30 seconds, pause, play EWT, then resume playing at 31 seconds, until like 60 seconds, etc.?
09-17-2020 09:53 AM
Should be do-able but won't be exactly trivial. Open the prompt file to get the audio stream, skip the relevant amount of time to play, then write the remaining bits of that stream to a temporary file or stream and feed that back as a user document to the play prompt steps, StreamDocument will take an input stream.
09-18-2020 06:46 AM
Thanks for the confirmation it could be done. I did google "java play wav file segment" and found some indications that it might be possible, but you know how mapping java solutions on stack overflow to uccx can go. Not great. At least, not for me. Here's to hoping you two gents' can work out a deal.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide