Hi,
I would like to reapeat a field by peer.
Like example: I've the field "253754", and I want to say :
You say '25' '37' 54'.
If the number is : 1253754, I want to say '1' '25' '37' '54'.
How do I make this function?
Thanks by advance.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Says the number by peer
Use of javascript in IVR code
You can do this kind of IVR manipulation in javascript and say the result using an IVR tag, <value>. More specifically, <value expr=""/>.
Say the original field or variable was named "number".
You could do something like what you are asking with
To change the length of the pause, change the value of the "pause" variable in the IVR script to some other string.
Say the original field or variable was named "number".
You could do something like what you are asking with
Code: Select all
<script>
var pause = ' ... ';
var split = number.split('');
if (split.length % 2) { split.unshift(' '); }
var number_split = '';
for (var i in split) {
number_split += (i % 2 ? '' : pause) + split[i];
}
</script>
<prompt>
<value expr="number_split"/>
</prompt>
Last edited by support on Wed Feb 24, 2010 12:36 pm, edited 7 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
clarification of IVR code
This part of the IVR code essentially means: If i modulus 2 is equal to 0, insert a pause.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com