We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

debugging vxml & php

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
jbrohan
Posts: 19
Joined: Mon Nov 19, 2007 10:17 am
Location: Montreal Canada
Contact:

debugging vxml & php

Post by jbrohan »

Do any of you experienced people have a trick for tracing a variable between vxml and php. In just php I could put in some echo statements and trace my error. With this voice programming it's not so simple. I have a variable which is the termchar of a recording and I need to use it to update a database. The other variables seem OK, but this one is giving me gyp it's always zero.
John Brohan National Instruments LabVIEW expert in Montreal
Traders Micro "We connect all sorts of things to computers"
telemedicine applications
www.woundfollowup.com

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR example for tracing a variable

Post by support »

Hi,

I'm not sure what you mean by a "trick" for tracing a variable...here's an IVR example that might help you with what you need. Note the use of the <submit> tag below.

vxmlpart.vxml:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
    <form>
        <record name="myrecording" beep="true">
            <prompt>
                Please record a message after the beep.
            </prompt>

            <filled>
                You just recorded the following message:
                <value expr="myrecording"/>
                You terminated your recording by pressing <value expr="myrecording$.termchar"/>.
                <assign name="termchar" expr="myrecording$.termchar"/>
                <submit next="submittest.php" method="post" namelist="termchar"/>
            </filled>
        </record>
    </form>
</vxml> 
submittest.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");

$termchar= $_POST[termchar];
?>

<vxml version="2.0">
	<form>
		<var name="termchar" expr="'<?php echo($termchar)?>'"/>
		<block>
			<prompt> Your termination character is <value expr="termchar"/>. </prompt>
		</block>
	</form>
</vxml>
Hope this helps.

Regards,
Plum Support

Post Reply