Can you clarify my understanding of how one might grab the values in the namelist and the msgReference using mod_perl handlers?
From what I understand, the namelist values are sent to the URL specified in the <submit next="... " namelist=" ... ">, and the msgReference is available at the PostCallResultURL.
If this is true, then how would one tie the two together? I want to grab the namelist values, together with the msgReference, and update a database.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
postcallresultURL vs submit URL
IVR ex that posts 2 values to a php page named process.php
I don't quite follow what you mean by msgReference...perhaps you could elaborate on what that refers to.
the namelist attribute in the <submit> tag is simply a list of the variables stored in GET or POST headers depending on the submit method you use. Here is an IVR example that posts 2 values to a php page named process.php:
The above IVR code sends 2 POST variables to a server side page
Here is the implementation of the process.php page which reads both POST variables:
NOTE: process.php is not a complete script! when you use the <submit> tag, the document being submitted to MUST contain valid voice XML, or the VXML platform won't know what to do with the resulting page since it is malformed.
Now that the 2 values are stored in the php variables defined in the above snippet, they can be manipulated and stored in a database if necessary.
hope this helps you!
Plum Support Team
the namelist attribute in the <submit> tag is simply a list of the variables stored in GET or POST headers depending on the submit method you use. Here is an IVR example that posts 2 values to a php page named process.php:
Code: Select all
<var name="pin_code" expr="'20844'"/>
<var name="amount" expr="'459.62'"/>
<submit next="http://www.samplehost.com/process.php" namelist="pin_code amount" method="POST"/>
Here is the implementation of the process.php page which reads both POST variables:
Code: Select all
<?php
$pin_code = $_POST['pin_code'];
$dollar_amount = $_POST['amount'];
?>
NOTE: process.php is not a complete script! when you use the <submit> tag, the document being submitted to MUST contain valid voice XML, or the VXML platform won't know what to do with the resulting page since it is malformed.
Now that the 2 values are stored in the php variables defined in the above snippet, they can be manipulated and stored in a database if necessary.
hope this helps you!
Plum Support Team
Last edited by support on Thu Feb 25, 2010 4:01 pm, edited 3 times in total.
Posting variables in a running app.
Hi,
I think that you can only able to post/assign variable start url,max tetries etc used in the call start up operation. You can't dynamically assign these type of values during the execution of vxml.
And the things that you can post are application variables using the
<submit> tag.
Thanks
Reu
I think that you can only able to post/assign variable start url,max tetries etc used in the call start up operation. You can't dynamically assign these type of values during the execution of vxml.
And the things that you can post are application variables using the
<submit> tag.
Thanks
Reu