Dear support team,
I'm implementing IVR application where customer can call and listen info about debt. I have integration with PHP and according to return value I receive digits (for example: "125"). These digits are the debt. I also have announcement files in following format: "one hundred", "two hundreds", etc - "ten", "twenty", etc - "one", "two", etc. So, my question is: Is it possible to implement some rules which allow to play correct announcement regarding received value? I mean if IVR receive "164" we need to choose and play: "one hundred" "sixty" "four" (3 announcements) consequentially.
Thanks beforehand.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Rule for playing announcements
Re: Rule for playing announcements
Yes, it's possible. You'll have to implement rules to generate a proper list of audio files to play. Once you have this list, you can loop through to play each audio file like so:
Code: Select all
<?php
header('Content-type: text/xml');
echo "<?xml version=\"1.0\"?>\n";
$debt_prompts = array("one hundred" => "one-hundred.wav",
"sixty" => "sixty.wav",
"four" => "four.wav");
?>
<vxml version="2.0">
<form>
<block>
<prompt>
Your debt is
<?php
foreach ($debt_prompts as $prompt => $audio_file) {
echo "<audio src=\"$audio_file\">$prompt</audio>\n";
}
?>
</prompt>
</block>
</form>
</vxml>
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com