04-11-2012 11:54 AM - edited 03-14-2019 09:41 AM
Does anyone know any tricks how I could have different MOH in different parts of the SAME script using Hold step (instead of Play prompt step)?
Solved! Go to Solution.
04-12-2012 03:48 AM
Ok. If that's what you're after you can use the Trigger Appliation step in asynchronous mode. While you can pass variables to it within the Trigger Application step you need to use a session to retrieve the end result. So, you can trigger the app, play a prompt, and then retrieve the result from a session. The only downsides to this are: a) you can't stop the prompt whenever that application is done; and, b) this step is the least well understood. There were many bugs on it until later in the 7.x releases and even today it can't deal with exceptions properly if run in synchronous mode.
04-11-2012 12:00 PM
I haven't tried this, but I think this might work.
If you have different call control groups, you can set each group up with a different MOH file.
In your main script, if you want a different MOH to play at specific parts, you can call a subscript that is in a different call control group. When you call the subscript, use the hold step there, and that should play that specific CCGs specified MOH file.
04-11-2012 06:17 PM
The challange with Andrew's suggestion is that you would need to use a Call Consult Transfer or Call Redirect step to move the contact into another trigger, CCG, and application. You cannot use the Subflow step since that would be executed within the existing Java task and by extension the existing CTI Port/CCG. Even if you did one of these transfer steps it's a one-way deal; you can't pull the call back.
I'm sorry to say this but you'll need to use a Play Prompt step.
04-12-2012 12:05 AM
Hi,
well, there's a subtle difference between the Play Prompt and the MOH steps - the main thread blocks at Play Prompt but it does not with MOH, so using that you can play some tasty tunes to the caller while the script does some important work in the background. One cannot do this with Play Prompt.
This is what I'm missing from CRS scripts, creating multiple threads. But I do understand this might be dangerous.
G.
04-12-2012 03:48 AM
Ok. If that's what you're after you can use the Trigger Appliation step in asynchronous mode. While you can pass variables to it within the Trigger Application step you need to use a session to retrieve the end result. So, you can trigger the app, play a prompt, and then retrieve the result from a session. The only downsides to this are: a) you can't stop the prompt whenever that application is done; and, b) this step is the least well understood. There were many bugs on it until later in the 7.x releases and even today it can't deal with exceptions properly if run in synchronous mode.
04-29-2012 12:10 PM
Thanks gents!
04-29-2012 05:13 PM
Yeah, agree with Jonathan here, any reason streaming MOH from UCCX would not work for you? Is it codec constraint?
Chris
04-30-2012 06:16 AM
It would work, but it would use more resources than the hold step.
04-30-2012 09:03 AM
Hi,
Play Prompt blocks.
MOH does not block.
Like:
Play Prompt (Please_wait.wav) <-- prompt is played
Set retVal = { /* expensive, time consuming operation */ } <-- silence
Play Prompt (Thanks.wav) <-- prompt is played
vs
Play Prompt (Please_wait.wav) <-- customer informed what's about to happen
Put call on Hold <-- music starts playing
Set retVal = { /* expensive, time consuming task */ } <-- music is still playing
Call Unhold <-- music stops playing
Play Prompt (Thanks.wav)
The latter is might be a bit comfortable from the customer's (caller's) point of view IMHO.
The point is: MOH music is tied to the CCG and cannot be changed programmatically.
G.
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