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

Caller ID and Voice Mail

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
PSN
Posts: 6
Joined: Thu Jun 11, 2009 9:47 am
Location: Madison, WI
Contact:

Caller ID and Voice Mail

Post by PSN »

I have a couple of questions.

First of all can we have a custom number or name coming up on the Caller ID for each campaign? If so, how do we go about doing it?

Secondly, can we have a custom voice mail message if the call does go to voice mail?
PSN Developer
Payment Service Network

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

caller ID for IVR

Post by support »

Hi,

About your question on caller ID, you can follow the suggestions from this post: http://support.plumvoice.com/viewtopic.php?t=523

Also, about leaving a custom voicemail for someone, you can use this IVR code as a guideline:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0"> 
  <form>
  <var name="callee_type" expr="'<?=$_POST['callee_type']?>'"/>
	<record cond="callee_type=='answeringmachine'" finalsilence="3000ms"/>
	<block>
	  <prompt>
	    Here is a reminder to tell you that your appointment is at 1 today.
	  </prompt>
	</block>
  </form>
</vxml>
Hope this helps.

Regards,
Plum Support
Last edited by support on Mon Dec 21, 2009 5:44 pm, edited 1 time in total.

PSN
Posts: 6
Joined: Thu Jun 11, 2009 9:47 am
Location: Madison, WI
Contact:

Post by PSN »

Hi,

Thanks a lot. that did help me out. I have a quick question about posting a file to the Plum page for campaign calls. I am trying to read a file into a binary reader and post it with the other post parameters. But reading a binary file into the POST variables is not working for me. Unfortunately due to the nature of the app, I am not able to use HTML for the post, using method and action properties for the <FORM> tag.
This is what I have so far.......

Code: Select all

Dim fs As New FileStream("C:\File.txt", FileMode.Open, FileAccess.Read)
                Dim read As New BinaryReader(fs)
                Dim URl2 As String = "Start URL"
                sPhoneStr = "login=******"
                sPhoneStr = sPhoneStr & "&pin=*********"
                sPhoneStr = sPhoneStr & "&phone_list=" & read.Read
                sPhoneStr = sPhoneStr & "&start_url=" & URl2
                sPhoneStr = sPhoneStr & "&campaign_name=CampName "
                Dim url As String = "http://outbound.plumgroup.com/webservice/queuecall.php"
                xmlhttp.Open("POST", url, sPhoneStr)
                xmlhttp.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
                xmlhttp.Send(sPhoneStr)
Could you please suggest a way of doing it. I would highly appreciate it.
Thanks in advance.
PSN Developer
Payment Service Network

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

php example to help with IVR application

Post by support »

Hi,

This may or may not help you (since you appear to be using ASP), but here's an example in PHP that uses the CURL capabilities for POSTing variables to queuecalls.php for an IVR campaign:

Code: Select all

<?php

// utility function for posting to a given webservice
function curl_post($url, $post_vars) {
  //initialize curl
  $ch = curl_init();

  //set the necessary curl options
  curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);

  //execute the call to the backend script, retrieve the results
  $xmlstr = curl_exec($ch);
  curl_close($ch);

  return $xmlstr;
}

$post_vars="login=xxxxxx&pin=xxxxxxxx&campaign_name=xxxxx&phone_list=phonenumbers.txt&start_url=http://example.com/PlumVoice/StartCall.aspx";
$xml = curl_post("http://outbound.plumgroup.com/webservice/queuecalls.php", $post_vars);
echo $xml;
?> 
Regards,
Plum Support
Last edited by support on Mon Dec 21, 2009 5:46 pm, edited 1 time in total.

PSN
Posts: 6
Joined: Thu Jun 11, 2009 9:47 am
Location: Madison, WI
Contact:

Post by PSN »

Hi,

Thanks for the reply.
I was wondering where exactly phone_list=phonenumbers.txt is set and where the physical path to the file is set. Could you explain. We can replicate that in ASP, but the error we get is there are no phone numbers.

Thanks in advance
PSN Developer
Payment Service Network

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

code example for posting phone number list for IVR outbound

Post by support »

Hi,

Sorry about that earlier IVR code example. This php example would allow you to post a file of phone numbers to queuecalls.php for your IVR outbound:

Code: Select all

<?php

$params['login'] = "xxxxxx";
$params['pin'] = "xxxxxxxx";

$params['campaign_name'] = "callnumbers";

$params['max_retries'] = "2";

$params['retry_interval'] = "300";

$params['phone_list'] = "@path/to/file/phonenumbers.txt"; //some local file on server

$params['call_parameters'] = "lang=en_us";

$params['start_url'] = "http://example.com/PlumVoice/StartCall.aspx";

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


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

curl_close($ch);

?>
Hope this helps.

Regards,
Plum Support

Post Reply