I am trying to transfer a call to a pager after calling a subdialog to get a pager number. I can get it to say the number but I can not set the dest= to the variable passed.
Scratchpad program:
<?xml version="1.0"?>
<vxml version="2.0">
<form id="intro">
<block>
<prompt bargein="false">
<audio src="wavfiles/humanvoice.wav">
Hello! Welcome to My program On-Call System!
</audio>
</prompt>
</block>
<field name="option" type="digits?minlength=1;maxlength=1">
<prompt>
Please Enter One for location1, Two for location2
</prompt>
</field>
<subdialog name="random" src="http://myserver.com/pager.php"/>
<block>
The pager number is <value expr="random.pager"/>.
</block>
<!-- transfer to Pager -->
<transfer dest=random.pager connecttimeout="20s" bridge="true"/>
</form>
</vxml>
This is the php file on the server:
<?php
header("Content-type: text/xml");
$pager1 = "12055555555";
?>
<vxml version="2.0">
<form>
<block>
<var name="pager" expr="'<?php echo($pager1)?>'"/>
<return namelist="pager"/>
</block>
</form>
</vxml>
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
How to use variable to transfer call
Change in IVR code allows call transfers
Hi,
The reason why you cannot use the dest attribute of the IVR tag, <transfer>, is because you are trying to pass an ECMAScript expression to it (random.pager). Instead, you should use the destexpr attribute of the <transfer> tag. I would recommend changing this line of IVR code:
to this:
We have tested this IVR code with this one change and confirmed it to work. Hope this helps.
Regards,
Plum Support
The reason why you cannot use the dest attribute of the IVR tag, <transfer>, is because you are trying to pass an ECMAScript expression to it (random.pager). Instead, you should use the destexpr attribute of the <transfer> tag. I would recommend changing this line of IVR code:
Code: Select all
<transfer dest=random.pager connecttimeout="20s" bridge="true"/>
Code: Select all
<transfer destexpr="random.pager" connecttimeout="20s" bridge="true"/>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com