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

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
ban
Posts: 21
Joined: Mon May 03, 2004 1:39 pm

postcallresultURL vs submit URL

Post 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.

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

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

Post 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
Last edited by support on Thu Feb 25, 2010 4:01 pm, edited 3 times in total.

ban
Posts: 21
Joined: Mon May 03, 2004 1:39 pm

Post 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.)

reu
Posts: 8
Joined: Mon Dec 06, 2004 10:08 am

Posting variables in a running app.

Post 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

Post Reply