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

Recording of forwarded phone calls possible?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
James
Posts: 3
Joined: Wed Oct 22, 2008 11:15 am

Recording of forwarded phone calls possible?

Post by James »

Is it possible to record phone calls that have been forwarded?

Let's say I provision an 800 number with a call-to number to X. I want to record the conversations for up to a few weeks in case their is a dispute about the contents of the call.

Is that possible with VXML and Plum's system? I can't seem to figure it out.

Thanks much,

James

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

IVR code to record phone calls that have been forwarded

Post by support »

Hi,

Yes, it is possible to record IVR calls that have been "bridge transferred" to another number. Here is some sample IVR code to demonstrate how this works:

callrecording.php

Code: Select all

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

<vxml version="2.0">
<form>
    <property name="recordcall" value="true"/>
    <field name="targetnumber" type="digits">
      <prompt>
        What phone number would you like to dial?
      </prompt>
    </field>
    <transfer destexpr="targetnumber">
      <prompt>
        Transferring to
        <say-as type="acronym">
          <value expr="targetnumber"/>
        </say-as>.
      </prompt>
    </transfer>
    <block>
      <disconnect/>
    </block>
</form>
<catch event="connection.disconnect">
  <submit next="savecallrecording.php" namelist="callrecording" method="post"/>
</catch>
</vxml>
savecallrecording.php

Code: Select all

<?php
echo "<?xml version=\"1.0\" encoding=\"latin-1\"?>";
?>
<vxml version="2.0">
    <form>
        <block>
<?php
	if (isset($_FILES['callrecording']) && is_uploaded_file($_FILES['callrecording']['tmp_name'])) {
		move_uploaded_file($_FILES['callrecording']['tmp_name'],"temp.ul");
		$timestamp = time();
		$cmdline = `/usr/local/bin/sox -t ul -r 8000 temp.ul $timestamp.wav`;
		unlink("temp.ul");
		echo "<exit/>\n";
	} else {
		echo "<exit/>\n";
	}
?>
        </block>
    </form>
</vxml>
Hope this helps.

Regards,
Plum Support
Last edited by support on Tue Feb 16, 2010 1:33 pm, edited 4 times in total.

James
Posts: 3
Joined: Wed Oct 22, 2008 11:15 am

Trying to record a transferred phone call..

Post by James »

Thanks very much, but I'm not getting the recorded call.

I get the call transferred, but the there is no object posted.

Is there something I'm doing wrong, or is this feature not enabled with the test account?

Thanks much,

James


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

<form>

<block>
<prompt>
<audio src="http://ec2-75-101-219-17.compute-1.amaz ... stones.wav" fetchhint="prefetch"/>
</prompt>
<!-- <prompt>Preparing to dial the number.</prompt> -->
</block>

<transfer name="MyCall" dest="tel:+1XXXYYYZZZZ"
bridge="true" connecttimeout="20s" maxtime="60s">
</transfer>
<catch event="connection.disconnect">
<submit next="http://ec2-75-101-219-17.compute-1.amaz ... ording.php" namelist="callrecording" method="post"/>
</catch>

</form>

</vxml>

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

Clarification of IVR code with forwarded calls

Post by support »

Hi James,

We noticed from your IVR code that you are not using the IVR property, recordcall, which is what allows you to record a transferred phone call. You must have this line of IVR code

Code: Select all

<property name="recordcall" value="true"/>
in there to allow you to do this.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 12:51 pm, edited 4 times in total.

James
Posts: 3
Joined: Wed Oct 22, 2008 11:15 am

Post by James »

Many thanks!

hct
Posts: 16
Joined: Sat Feb 28, 2009 1:46 am
Location: Boston
Contact:

Windows SOX parameters

Post by hct »

If you want to kickout a converted file from the default VXML recording using Windows, this string will work. Just download Sox for Windows from sourceforge. To make MP3's you need to install a codec.

Code: Select all

sox -S -c 1 -b 8 -t ul -r 8000 infile.wav outfile.wav




-Joe

Post Reply