playing audio based on variable
Posted: Tue Oct 19, 2010 1:35 pm
I'm trying to play an audio file based on the filename I get back from a <subdialog>:
Apparently my syntax here is not quite correct, as it is treating "audiofile.varCompleteFileName" as a literal string, therefore not finding the file and playing the text using the synthesized voice. I've tried using single quotes, as well as using "src" instead of "expr", but neither works. Is it possible to do this?
Thanks,
Andrew
Code: Select all
<block>
<assign name="varPrompt" expr="'IMPORTANT'"/>
</block>
<subdialog name="audiofile" namelist="varPrompt" src="audiofile.ashx"/>
<audio expr="audiofile.varCompleteFileName">
Hello, this is Continuing Care calling with an important message. Please press one.
</audio>
Thanks,
Andrew