Dynamic Audio Prompt Expression Example

Status
Not open for further replies.

UCMUserAZ

Customer
Joined
Dec 19, 2023
Messages
122
Reaction score
214
Hi all. I am trying multiple expressions in the dynamic audio prompt and just not getting it. Can someone post an iif example? I see a variable strLanguage to 1 or 2 in beginning of CFD. Then in the dynamic audio express I have:

[IIf(callflow$.strLanguage=="1","English.wav","Spanish.wav")]

The wav files are in the Audio folder of the project. But build does not like the expression. Still new to the CFD expressions.

Thank you in advance.
 
Just wanted to share. So appears an IIF is not supported in the dynamic audio prompt expression builder. Just in my mind I was thinking an inline IIF to come up with the recording file name. Anyhow, to resolve following steps for others if interested:
1) Set language variable in beginning of CFD flow based on DTMF or speech. (Eng_) or (Span_) (strLanguage)
2) Have 2 recordings; one Eng_Main.wav and Span_Main.wav
3) In the dynamic audio file expression concatenate the variable strLanguage with "Main.wav". So it is playing Eng_Main.wav or Span_Main.wav.
4) Then throughout the CFD you can always reference your strLanguage variable and the name of the recording.

Also, if you change the recording I tested naming it the same and since the dynamic audio has the expression it played the new recording when I uploaded the new CFD script to 3cx. No cycle of any service. I had seen in some previous posts that if you needed to change the recording that it was cached and had to cycle the service. I did not find this to be the case with the dynamic audio prompt test with the expression.

If by some chance an IIF is somehow allowed in the expression for a dynamic audio file prompt please still share. Thanks in advance.
 
You're correct, there is no such IIF expression. You are on the right track by setting that prefix for the language.
 
Status
Not open for further replies.