I have come to believe it impossible to execute a script on entering a menu tag. Why this was left out of the 2.1 specification, I do not know.
I need to execute a script at the entry of each form and menu element. This works fine for forms, but with menus, neither assign or script can run at the base level. I know that filled/nomatch/noinput can do so, but I need to know if the user entered a menu, regardless of if action was taken.
Further, I understand that I could run a script before entering a menu either doing so before the next call or by passing through a form specifically used to run the script and continue to the menu. However I hope there is some simple, direct means which I have not yet cogitated. Surely other developers have pulled their hair out over this paradox.
Thanks.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Script Execution within Menu Tag
IVR code for Script Execution within Menu Tag
Hi,
There is one other alternative. You could use the IVR tag, <value>, with the expr attribute to call upon your function.
The value expr attribute would call an ECMAscript function that returns "" and the ECMAscript function, declared elsewhere in your IVR script, could carry out the IVR script.
For IVR example:
Hope this IVR code sample helps.
Regards,
Plum Support
There is one other alternative. You could use the IVR tag, <value>, with the expr attribute to call upon your function.
The value expr attribute would call an ECMAscript function that returns "" and the ECMAscript function, declared elsewhere in your IVR script, could carry out the IVR script.
For IVR example:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<script> <![CDATA[
function runscript(n)
{
//insert script that needs to be run;
n = "";
return n;
}
]]> </script>
<menu id="blah">
<value expr="runscript()"/>
...
...
...
</menu>
</vxml>
Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 2:29 pm, edited 4 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com