cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
772
Views
0
Helpful
6
Replies

Playing prompt through fetch audio rather than Menu element

shayanahmad96
Level 1
Level 1

I am playing a prompt through Fetch Audio, while this prompt plays i want to send call to Menu element and loop between Menu element and a decision element for the duration of that prompt played in Fetch Audio node. Is there any way i can stop the Menu element from trying to play a prompt on its own. Currently, as soon as the call hits the Menu element the fetch audio prompt stops running. I would like the prompt to continue playing through fetch audio.

1 Accepted Solution

Accepted Solutions

Here's a method that might just work.

Break your menu prompt into separate audio files (for example, name them
prompt1.wav, prompt2.wav etc so that you can check the java class
between each prompt played).

Steps:

1a. Create a Session Variable named MyCounter and initialize it with the
value 0.

1b. Then use the Counter element, but it's very important that in its
Data tab, you do _*both *_these things:
    Element Data: Name: count   Value: {Data.Session.MyCounter} Type:
Integer  Create: BEFORE [ADD]
    Session Data:  Name: MyCounter  Value:
{Data.Element.Counter_01.count}  Create: AFTER [ADD]


Step 1a and 1b will let you use Studio element to increment an integer
counter but to also be able to reset it to 0, so you can execute the
loop again on a nomatch, etc.

2.Use a Menu or Form Element (set Initial Audio Group to play URI:  
prompt{Data.Element.Counter_01.count}.wav
configure Setting: NoInput Timeout (1s) and MaxNoInput set to 1,
MaxNoMatch set to 1.

3.Connect the Menu-->max_noinput path to your custom java class -->
connect that to your decision element.  The Decision element must also
now check for the Counter being equal to your number of options, so you
know whether the caller hasn't selected anything, and it's time to
restart from the beginning.

4a.If the caller hasn't heard all the prompts yet, then if you need to
loop back to the menu, you should loop to the Counter element to
increment its counter. Then the Menu element will play
prompt{Data.Element.Counter_01.count}.wav  which is now prompt2.wav

4b. If the caller has heard all of the prompts, but hasn't selected
anything yet (or if it's a nomatch), then loop back to step 1a to re-set
the Session Data MyCounter to 0.  That will cause 1b to re-set the
element data of the Counter to 0, and then increment it to 1. So you're
starting over.




View solution in original post

6 Replies 6

I'm sorry if I'm not following. Can you explain the business case/the what and why you're trying to accomplish ?
If the fetch audio is done playing and you've moved onto the menu element, isn't that an indicator that whatever you were trying to look up/fetch is ready?

janinegraves
Spotlight
Spotlight
I agree with Bill. It sounds like you're trying to use fetchaudio to
play the initial audio prompt of the menu.  And then as soon as the
caller enters the DTMF, you want to check its value using the Decision
element.

So, why don't you just put whatever you're trying to play in the
fetchaudio into the Initial Audio Group of the Menu element?

Are you trying to somehow change the valid Menu DTMF entries based on
some runtime logic? If so, then you might use a Form element as your
menu, and you can use variables to allow any DTMF tone by using DTMF
Keypress with a dot as the value (any dtmf) or \d (accept any digit, but
not the star). Then have it go to connect decision element.



Hi Janine, thanks for replying. Yes you are right i am trying to use fetchaudio to play the initial audio prompt of the menu. Let me elaborate further. I play the initial audio prompt of the menu through fetch audio after which the call goes to a custom class where certain parameters are checked. If the result comes as false i want call to go to menu element and customer will be able to enter an input for a 1s timeout. After which the call will again loop back to my custom class and again check the result from there. This will go on till either the fetchaudio prompt (playing initial audio prompt of menu) ends, or my custom class returns true or customer enters some input while on menu element. The issue im facing is as soon as call comes to the menu element the fetchaudio prompt is cut off. Is there any workaround to avoid this?

Here's a method that might just work.

Break your menu prompt into separate audio files (for example, name them
prompt1.wav, prompt2.wav etc so that you can check the java class
between each prompt played).

Steps:

1a. Create a Session Variable named MyCounter and initialize it with the
value 0.

1b. Then use the Counter element, but it's very important that in its
Data tab, you do _*both *_these things:
    Element Data: Name: count   Value: {Data.Session.MyCounter} Type:
Integer  Create: BEFORE [ADD]
    Session Data:  Name: MyCounter  Value:
{Data.Element.Counter_01.count}  Create: AFTER [ADD]


Step 1a and 1b will let you use Studio element to increment an integer
counter but to also be able to reset it to 0, so you can execute the
loop again on a nomatch, etc.

2.Use a Menu or Form Element (set Initial Audio Group to play URI:  
prompt{Data.Element.Counter_01.count}.wav
configure Setting: NoInput Timeout (1s) and MaxNoInput set to 1,
MaxNoMatch set to 1.

3.Connect the Menu-->max_noinput path to your custom java class -->
connect that to your decision element.  The Decision element must also
now check for the Counter being equal to your number of options, so you
know whether the caller hasn't selected anything, and it's time to
restart from the beginning.

4a.If the caller hasn't heard all the prompts yet, then if you need to
loop back to the menu, you should loop to the Counter element to
increment its counter. Then the Menu element will play
prompt{Data.Element.Counter_01.count}.wav  which is now prompt2.wav

4b. If the caller has heard all of the prompts, but hasn't selected
anything yet (or if it's a nomatch), then loop back to step 1a to re-set
the Session Data MyCounter to 0.  That will cause 1b to re-set the
element data of the Counter to 0, and then increment it to 1. So you're
starting over.




That does seem like a good approach and I had thought of splitting the prompts. Thank you for the detailed suggestion on how to implement it. The only reason I’m not confident in doing this is won’t this cause the Audio to sound glitchy and impact user experience ? As in whenever call will leave menu element and loop back around from custom class won’t there be a slight glitch due to change in prompt?

Hey Janine after extensive testing of this solution, it does give a reasonable way to solve this problem however as noted above the customer experience is impacted due to the slight delay of milliseconds between the prompts which causes the audio to be a bit choppy. I don’t currently see any way past this. Thank you for your help

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: