Page 1 of 1

outbound calling "custom call parameters" documentation

Posted: Wed Apr 26, 2017 10:56 am
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

Re: outbound calling "custom call parameters" documentation

Posted: Wed Apr 26, 2017 1:49 pm
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

Re: outbound calling "custom call parameters" documentation

Posted: Fri Apr 28, 2017 7:12 am
by jason.smoker
Thank you.

Jason