Hello,
Generally speaking all of the VoiceXML you write should reside on your IVR application server. You should follow the development process much like you follow standard HTML development. The Plum IVR Platform acts more or less like a remote web browser from the perspective of your IVR application server.
Prepopulating information that will be sent to your IVR application server can be done by assigning values in a script and then placing those variables in the namelist attribute of your
<submit> tag. Here is an IVR example that collects information, posts that information to a PHP script which then reuses the posted information to provide an option to the user:
start.vxml:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="id" type="digits">
<prompt>Please enter your I D</prompt>
</field>
<field name="pin" type="digits">
<prompt>Please enter your pin</prompt>
</field>
<filled>
<submit next="auth.php" namelist="id pin" method="post"/>
</filled>
</form>
</vxml>
auth.php:
Code: Select all
<?php
echo("<?xml version=\"1.0\"?>\n");
include_once("somedatabasecode.php");
?>
<vxml version="2.0">
<form>
<?php if (authenticate($_POST['id'], $_POST['pin'])) { ?>
<field name="check_account" type="boolean">
<prompt>Press 1 if you would like to check your balance or press 2 to disconnect</prompt>
<filled>
<if cond="check_account">
<!-- assign the ecmascript variables with the known good id -->
<var name="id" expr="'<?php echo($_POST['id']);?>'"/>
<submit next="check_account.php" namelist="id" method="post"/>
</if>
</filled>
</field>
<?php } else { ?>
<block>
<prompt>Unauthorized access. Goodbye.</prompt>
<disconnect/>
</block>
<?php } ?>
check_balance.php:
Code: Select all
<?php
echo("<?xml version=\"1.0\"?>\n");
include_once("somedatabasecode.php");
?>
<vxml version="2.0">
<form>
<block>
<prompt>Your account balance is <?php echo(check_balance($_POST['id']))?>. Goodbye.</prompt>
<disconnect/>
</block>
</form>
</vxml>
Regards,
Plum Support