04-04-2022 09:09 AM
Hi everyone,
I am trying to play a music prompt whilst am performing GET query from Rest element in cvp call studio.
I have set the fetchaudio and timeout as shown in screenshot.
Once the get is performed, i have to check if the task_status is complete or In progress . If its still in progress , then i am waiting in silence for 5 seconds . If the task_status is complete, then it would proceed in the callflow.
I would like to know is there any alternative way to loop in queue ?
My expected result was to play music without any interruption. The above studio app is now having Music -> Wait silence of 5 sec . Could you please help guide me for improvements .
04-04-2022 09:48 AM
Deepak,
The CVP REST element won't complete UNTIL it has failed or successfully retrieved the value.
So your Script completes and THEN sleeps for 5 seconds silence which I assume is not what you want?
Within the REST element you can set a connect and read timeouts, e.g. to 5 and 10 seconds (5000 ms and 10,000 ms)?
Lets say the backend server the REST Client is completely down - so it won't be responding to TCP at all.
This would be an example where it would take 5 seconds before exiting and you might want to play some music in the background?
1) Set the global fetchtimeout to a high value such as 60 seconds
2) Set the fetchaudio URL
3) Set a timeout in your REST element
you might want to change the default value for fetchaudiodelay (See below - how long it waits BEFORE start to play the file).
I don't know if VVB supports fetchaudiominimum - you can test and see!
To test timeouts to your REST Server - put in a IP address that is NOT reachable (e.g. an IP address which is not assigned to any server) - so will replicate like a server is down.
Gerry
fetchaudio | The URI of the audio to play while waiting for a document to be fetched. The default is not to play any audio during fetch delays. There are no fetchaudio properties for audio, grammars, objects, and scripts. The fetching of the audio clip is governed by the audiofetchhint, audiomaxage, audiomaxstale, and fetchtimeout properties in effect at the time of the fetch. The playing of the audio clip is governed by the fetchaudiodelay, and fetchaudiominimum properties in effect at the time of the fetch. | |
fetchaudiodelay | The time interval to wait at the start of a fetch delay before playing the fetchaudio source. The value is a Time Designation (see Section 6.5). The default interval is platform-dependent, e.g. “2s”. The idea is that when a fetch delay is short, it may be better to have a few seconds of silence instead of a bit of fetchaudio that is immediately cut off. | |
fetchaudiominimum | The minimum time interval to play a fetchaudio source, once started, even if the fetch result arrives in the meantime. The value is a Time Designation (see Section 6.5). The default is platform-dependent, e.g., “5s”. The idea is that once the user does begin to hear fetchaudio, it should not be stopped too quickly. | |
fetchtimeout | The timeout for fetches. The value is a Time Designation (see Section 6.5). The default value is platform-dependent. |
04-04-2022 10:37 AM
04-08-2022 06:09 AM
Thanks @Gerry O'Rourke and @janinegraves for your detailed responses !!
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