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

Recordcall appending empty recording

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
dwollberg
Posts: 15
Joined: Thu Mar 07, 2019 3:03 pm

Recordcall appending empty recording

Post by dwollberg »

My application (among other things) connects the caller to a third party via <transfer>. At the AppRoot level, I have the recordcall property turned on, as the entire IVR portion of the call is recorded. However, for some transfers, we want to turn off recording. The transfer is essentially the end of the call, so we expect that the recording ends at the point right before the transfer begins. Here is a simplified version of this part of my code:

Code: Select all

<vxml version="2.1" application="../AppRoot.xml">
  <form id="Start">
    <block>
      <prompt bargein="false">
        <audio src=".">This is a prompt that plays and is recorded.</audio>
      </prompt>
	  <goto next="#TransferMessage" />
    </block>
  </form>
  <form id="TransferMessage">
    <block>
      <prompt>
        <audio src=".">Please wait while we connect you.</audio>
      </prompt>
      <goto next="#Transfer" />
    </block>
  </form>
  <form id="Transfer">
    <property name="recordcall" value="false" />
    <transfer name="callTransfer" destexpr="TransferNumber" connecttimeout="120s" transferaudio="https://holdmusic.wav">
      <filled>
        <goto next="#Hangup" />
      </filled>
    </transfer>
  </form>
  <form id="Hangup">
    <property name="recordcall" value="false" />
    <block>
      <audio src=".">Goodbye.</audio>
      <disconnect />
    </block>
  </form>
</vxml>
The line of code I added recently was the <property> in the "Hangup" form. Without that line, the recording played all the before transfer stuff, then immediately played "Goodbye." However, our business users didn't like how that sounded, so we wanted to turn off recording of the "Goodbye" part, hence me adding that line. However, when I add that line, the recording actually continues recording silence for the duration of the call and the goodbye. Meaning there may be 20+ minutes of blank recording for a call. (Let's assume I want to keep my <form>s the way they are, i.e. without consolidating everything to 2 forms.)

Is there a way I can get the recording to not record empty space when that property is turned off?

dwollberg
Posts: 15
Joined: Thu Mar 07, 2019 3:03 pm

Re: Recordcall appending empty recording

Post by dwollberg »

I sent in a request to support, but thought I would give an update here.

I determined this is because of the <disconnect/> tag in the Hangup form. If I use a <throw event="connection.disconnect"/>, the recording works as expected. However, I am using disconnect very intentionally - I want to hang up on the caller before starting the end call processing tasks to avoid delays and errors.

This seems to be an error with the disconnect tag. I will post here if I learn anything new from support.

dwollberg
Posts: 15
Joined: Thu Mar 07, 2019 3:03 pm

Re: Recordcall appending empty recording

Post by dwollberg »

Support said this is indeed a platform issue and is slated to be resolved in a future release. The workaround I came up with for my specific situation is to use SOX to trim the silence at the end of the call. See the SOX documentation for "silence" for more information. Here is the full SOX command I am using in my download php file to convert, trim, then add a second of silence back (because the trim made it a little abrupt).

Code: Select all

SOX\sox -t ul -r 8000 $tempfilepath $filepath reverse silence 1 0.1 1% reverse pad 0 1.0
(This reverses the recording, then trims the silence in the front, then reverses it back and adds the padding at the end.)

Post Reply