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

outbound calling "custom call parameters" documentation

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
jason.smoker
Posts: 15
Joined: Wed Apr 26, 2017 9:41 am

outbound calling "custom call parameters" documentation

Post by jason.smoker »

I haven't found much documentation on how "custom call parameters" are used in outbound calling (https://outbound.plumvoice.com/webservice/queuecall.php). Are these parameters available in the vxml of the "start url" in some way?

Where can I get more information? I've looked over the outbound guide several times to try to find more detail. http://www.plumvoice.com/docs/dev/plumd ... boundguide

Thanks,
Jason

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

Re: outbound calling "custom call parameters" documentation

Post by support »

Hi Jason,

Custom call parameters are an optional POST variable you can send to your start URL when queuing an outbound call with either the quecall or quecalls API.

For example, if you have a start URL called myscript.php as follows:

Code: Select all

<?php
header('Content-type: text/xml');
$first_last_name = explode('|', $_POST['call_parameters']);
$first_name = $first_last_name[0];
$last_name = $first_last_name[1];
echo('<?xml version="1.0"?>');
?>
<vxml version="2.0">
	<form id="welcome">
        <block name="welcome_message">
                <prompt>Hello. Your first name is <value expr="'<?= $first_name ?>'"/> and your last name is <value expr="'<?= $last_name ?>'"./></prompt>
        </block>
	</form>
</vxml>
you could queue a call that sets the custom call parameters with the following script:

Code: Select all

<?php

$params['login'] = "user1";
$params['pin'] = "12345678";
$params['phone_number'] = "tel:+12345678900";
$params['start_url'] = "http://www.mywebserver.com/~user/myscript.php";
$params['call_parameters'] = "John|Doe";

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_URL, "http://outbound.plumvoice.com/webservice/queuecall.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
echo $result;

curl_close($ch);

?>
This would result in your outbound call saying "Hello. Your first name is John and your last name is Doe."
Please let us know if you have any further questions.

Regards,
Plum Support

jason.smoker
Posts: 15
Joined: Wed Apr 26, 2017 9:41 am

Re: outbound calling "custom call parameters" documentation

Post by jason.smoker »

Thank you.

Jason

Post Reply