I am attempting to transfer a call to a phone number that is in a variable.
When the following code is executed, it treats the phone number like a very large number in scientific notation. ie: 1.81796e61.
How do I get it to treat it as a string or a list of digits?
Thanks
<form id="transfer">
<var name="dest_num"/>
<block>
<assign name="dest_num" expr="18179661716"/>
</block>
<transfer dest="dest_num">
<prompt>
Transferring to
<say-as type="acronym">
<value expr="dest_num"/>
</say-as>.
</prompt>
</transfer>
</form>
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Problem with transfer using a variable for the phone number
-
- Posts: 30
- Joined: Tue Apr 18, 2006 3:05 pm
- Location: Bedford, TX
IVR script for use of destexpr attribute
Hello,
To use an ECMAScript variable as the destination for the IVR tag, <transfer>, you should use the destexpr attribute, not the dest attribute. For IVR example:
Hope this helps.
Regards,
Plum Support
To use an ECMAScript variable as the destination for the IVR tag, <transfer>, you should use the destexpr attribute, not the dest attribute. For IVR example:
Code: Select all
<form id="transfer">
<var name="dest_num"/>
<block>
<assign name="dest_num" expr="18179661716"/>
</block>
<transfer destexpr="dest_num">
<prompt>
Transferring to
<say-as type="acronym">
<value expr="dest_num"/>
</say-as>.
</prompt>
</transfer>
</form>
Regards,
Plum Support
Last edited by support on Thu Feb 25, 2010 2:10 pm, edited 4 times in total.
-
- Posts: 30
- Joined: Tue Apr 18, 2006 3:05 pm
- Location: Bedford, TX
IVR fix by assigning dest_num to string instead of number
Hello,
The problem you were really having was completely overlooked. You were complaining that the number was being converted to scientific notation. The IVR problem can be fixed by assigning dest_num to a string instead of a number (notice the single quotes inside the double quotes):
It helps to be concious of the fact that everything that can be assigned is an ECMAScript variable. The same rules that were causing your number to come out as scientific notation hold true in all standard web browsers. The above IVR code is just shorthand for the following ECMAScript:
Hope this helps.
Regards,
Plum Support
The problem you were really having was completely overlooked. You were complaining that the number was being converted to scientific notation. The IVR problem can be fixed by assigning dest_num to a string instead of a number (notice the single quotes inside the double quotes):
Code: Select all
<assign name="dest_num" expr="'18179661716'"/>
Code: Select all
<script>
dest_num='18179661716';
</script>
Regards,
Plum Support
Last edited by support on Thu Feb 25, 2010 2:10 pm, edited 2 times in total.
-
- Posts: 30
- Joined: Tue Apr 18, 2006 3:05 pm
- Location: Bedford, TX