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

Problem with basic tutorial

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
hecleal
Posts: 9
Joined: Fri Jul 15, 2011 1:41 pm

Problem with basic tutorial

Post by hecleal »

We are just getting started and have a 30 day demo. We are trying to learn the system and working with tutorial 1.8 "Sending Data" from your Development Documentation. We have copied the script exactly from yourtutorial and are getting the following error message:

Fri 15 Jul 2011 02:39:25 PM EDT:

HTTP/1.1 404 Not Found - http://wwww.vestanotes.com/download/sub ... erid=59865
DocumentParser::FetchBuffer - could not open URL: http://wwww.vestanotes.com/download/submit.php
DocumentParser::FetchDocument - exiting with error result 2
errno: 203 uri http://wwww.vestanotes.com/download/submit.php
received event: error.badfetch.http.404:
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
A serious error of type </speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>error.badfetch.http.404</speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak> has occurred. Exiting. </speak>
---------
VXI::exit_element()
starting playback: bargein=true, inputmodes="dtmf speech"
Newly queued prompts are now being played

We are not sure how to continue. We are actually trying to send four values to our server. We would like to sent the Caller ID, call time, and 2 id numbers. We were unable to do that, so we came back to running your tutorial and are now wondering why we can't get that to work.

Please help.
Thanks

hecleal
Posts: 9
Joined: Fri Jul 15, 2011 1:41 pm

Re: Problem with basic tutorial

Post by hecleal »

Sorry, I saw a mistake when we retyped the URL. Here is the new error message:
Last edited by hecleal on Fri Jul 15, 2011 3:21 pm, edited 1 time in total.

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

Re: Problem with basic tutorial

Post by support »

Hi,

The reason you are seeing this error is due to an HTTP 404 error. If you enter the URL, http://wwww.vestanotes.com/download/sub ... erid=59865, in a web browser for viewing, you'll see that it returns an HTTP 404 error.

Regards,
Plum Support

hecleal
Posts: 9
Joined: Fri Jul 15, 2011 1:41 pm

Re: Problem with basic tutorial

Post by hecleal »

Re: Problem with basic tutorial
by hecleal » Fri Jul 15, 2011 2:37 pm

Sorry, I saw a mistake when we retyped the URL. Here is the new error message:

Fri 15 Jul 2011 03:34:51 PM EDT:

DocumentParser::FetchDocument - Parse error in file "http://www.vestanotes.com/download/submit.php", line 2, column 6 - Unknown element 'font'
errno: 205 uri http://www.vestanotes.com/download/submit.php
received event: error.badfetch:
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
A serious error of type </speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>error.badfetch</speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak> has occurred. Exiting. </speak>
---------
VXI::exit_element()
starting playback: bargein=true, inputmodes="dtmf speech"
Newly queued prompts are now being played

In case you need to see it, here is the PHP code.

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");

$customerid = $_GET[customerid];
$age = $_GET[age];
?>

<vxml version="2.0">
<form>
<block>
<prompt>
Your customer identification number is <?php echo($customerid)?>.
</prompt>
<prompt>
Your age is <?php echo($age)?>.
</prompt>
</block>
</form>
</vxml>

Thanks.

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

Re: Problem with basic tutorial

Post by support »

Hi,

If you were to view the site (http://www.vestanotes.com/download/subm ... erid=59865) you should see an XML Parsing Error which caused this error.badfetch.

If you view the source code for the script you should see this:

Code: Select all

<?xml version="1.0"?>
<font color=ff0000><br />
<b>Notice</b>:  Use of undefined constant customerid - assumed 'customerid' in <b>/var/www/html/vestanotes/download/submit.php</b> on line <b>5</b><br />
</font><font color=ff0000><br />
<b>Notice</b>:  Use of undefined constant age - assumed 'age' in <b>/var/www/html/vestanotes/download/submit.php</b> on line <b>6</b><br />

</font>
<vxml version="2.0">
  <form>
    <block>
      <prompt>
        Your customer identification number is 59865.
      </prompt>
      <prompt>
        Your age is 55.
      </prompt>
    </block>

  </form>
</vxml>
The application is breaking due to the font tag. You are seeing this due to the $_GET statements. Neither include the single quotes which is causing a php notice to be thrown. Please include the single quotes around each of them.

Code: Select all

$customerid = $_GET['customerid']
$age = $_GET['age']
Hope this helps!

Regards,
Plum Support

hecleal
Posts: 9
Joined: Fri Jul 15, 2011 1:41 pm

Re: Problem with basic tutorial

Post by hecleal »

That did it! Thanks! We were able to fix our other script as well, however we have 2 final questions:

How can we send the call time?

How can we send the caller ID?

We have looked as some stuff, but cant seem to get that to work.

Thanks.

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

Re: Problem with basic tutorial

Post by support »

Hi,

There is no way to get the time when the call started, but you can get the time that the first script was called upon via PHP. The caller ID can be sent using the session.telephone.ani.

Example:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");

$time = time();
?>

<vxml version="2.0">
  <var name="ani" expr="session.telephone.ani"/>
  <var name="time" expr="'<?php echo($time)?>'"/>
</vxml>
Hope this helps!

Regards,
Plum Support

Post Reply