Page 1 of 1

postcallresultURL vs submit URL

Posted: Wed May 05, 2004 10:31 am
by ban
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.

IVR ex that posts 2 values to a php page named process.php

Posted: Wed May 05, 2004 3:56 pm
by support
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:

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"/>
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:

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

Posted: Wed May 05, 2004 4:19 pm
by ban
msgReference is one of the variables passed in (along with msgParam1, phone, StartVXMLURL, etc) when the initial call is made. It's passed back as one of the variables to the PostCallResultURL.

(When an outbound call is made.)

Posting variables in a running app.

Posted: Sat Dec 11, 2004 2:07 am
by reu
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