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

start_url parameter for outbound calls

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
pat.laclef@lansa.com
Posts: 2
Joined: Tue May 12, 2015 3:12 pm

start_url parameter for outbound calls

Post by pat.laclef@lansa.com »

I am new to this interface and struggling to get my outbound call tests working. The parameter start_url (https://drive.google.com/file/d/0B1qoEC ... sp=sharing) in my tests is probably not set up properly, resulting in call failures, either through the queuecall web service or Google Postman. The issue might be that the script (outbound.php below) is hosted on my google drive, sharable.

Error: This XML file does not appear to have any style information associated with it. The document tree is shown below.
<queuecall status="queued" call_id="32411563">
<login>pat.laclef@lansa.com</login>
<pin>XXXXXXXX</pin>
<phone_number>1XXXXXXXXXXX</phone_number>
<start_url>
https://drive.google.com/file/d/0B1qoEC ... sp=sharing
</start_url>
<max_retries>2</max_retries>
<retry_interval>600</retry_interval>
</queuecall>


HTTP post via Google Postman:
http://outbound.plumvoice.com/webservic ... sp=sharing

Error:
<queuecalls status="failed">Missing "login" POST variable.</queuecalls>

outbound.php
<?xml version="1.0"?>
<vxml version="2.0">
<form id="mainmenu">
<field name="menuchoice">
<grammar type="application/srgs+xml" root="ROOT" mode="dtmf">
<rule id="ROOT">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
</one-of>
</rule>
</grammar>
<prompt>
For sales, press 1.
For tech support, press 2.
For company directory, press 3.
</prompt>
<filled>
<if cond="menuchoice==1">
Welcome to sales.
<elseif cond="menuchoice==2"/>
Welcome to tech support.
<elseif cond="menuchoice==3"/>
Welcome to the company directory.
</if>
</filled>
</field>
</form>
</vxml>

pat.laclef@lansa.com
Posts: 2
Joined: Tue May 12, 2015 3:12 pm

Re: start_url parameter for outbound calls

Post by pat.laclef@lansa.com »

I just wanted to add that hosting the script on google drive does not work, meaning that the VoiceXML Validator returns an error. However, it is validated when hosted on a public site. This is most likely because google encrypts the file name in the URL. But in both cases the outbound program fails as described in the initial post. So this seems to indicate that the issue lies in the Plum DEV web service program queuecall.php What do you think?

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

Re: start_url parameter for outbound calls

Post by support »

Hi,

We have edited your post to remove sensitive information (phone numbers, pins, etc). We apologize if this causes any inconvenience.

From your url, it seems like you are sending your variables as "GET" variables instead of "POST" variables, which is why our platform is returning a "Missing POST variable" error. Please adjust your script to send your parameters using the "POST" method.

Here's an example on how to do this using PHP:

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";

$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);

?>
Also, the start_url you have provided will not work with our platform because it is not sending valid VXML. Instead it is providing an HTML site that displays your VXML on a webpage. As you have described in your second post, hosting your script on a public site will work correctly.

More code examples and a guide to the outbound API can be found in our documentation.

Regards,
Plum Support

Post Reply