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

Handle voice mail / answering machine

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
nevenfi
Posts: 11
Joined: Fri Nov 30, 2007 4:00 am

Handle voice mail / answering machine

Post by nevenfi »

If a phonecall is answered by a voice mail or answering machine, only a part of the message is delivered to the customer. This because the messages starts to be played before the recording of the voice mail starts.
I would like to make sure the service waits until after the beep (start of recording voice mail message) before the message playback is started.
Is this possible, and how?

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

Place <record> tag at beginning of IVR script

Post by support »

Hi,

Yes, this implementation is possible. You would have to place the IVR tag, <record>, at the beginning of your IVR script to make sure that the message is played after the beep (start of recording voice mail message). For IVR example:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0"> 
  <form>
	<record finalsilence="4000ms"/>
	<block>
	  <prompt>
	    Here is a reminder to tell you that your appointment is at 1 today.
	  </prompt>
	</block>
  </form>
</vxml>
If this doesn't work, you could try adjusting the value of the IVR property, timeout, to allow for more time for the voicemail.

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

nevenfi
Posts: 11
Joined: Fri Nov 30, 2007 4:00 am

Post by nevenfi »

Ok, this appears to work.
Of course, the <record ... /> tag should only be added if the phone is answered by an answering machine. That's why I've added a variable calleeType and surrounded the <record.../> tag with an if as follows:

Code: Select all

<var name="calleeType" expr="'answeringmachine'"/>
<form>
  <if cond="calleeType=='answeringmachine'"><record finalsilence="4000ms"/></if>
    <block><prompt>Here is a reminder to tell you that your appointment is at 1 today.</prompt></block>
</form>
This gives an error: Serious error of type.
I also tried putting the <if ..><record.../></if> inside the <block> tag, but this gives the same result.

Any suggestions?

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

IVR code fix for <record> tag

Post by support »

Hi,

You should change your IVR code to include the "cond" attribute in the <record> tag instead of putting the <record> tag inside of <if> tags, since the <record> tag is not a valid child IVR tag of the <if> tag.

So, your IVR code should more like this:

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="'answeringmachine'"/>
	<record cond="callee_type=='answeringmachine'" finalsilence="4000ms">
	  <noinput>
     </noinput>
	</record>
	<block>
	  <prompt>
	    Here is a reminder to tell you that your appointment is at 1 today.
	  </prompt>
	</block>
  </form>
</vxml>
Hope this IVR code helps.

Regards,
Plum Support

dgiacobb1
Posts: 10
Joined: Wed Dec 21, 2016 5:27 pm

Re: Handle voice mail / answering machine

Post by dgiacobb1 »

Hi,

When an answering machine picks up a a call, I'd like to have my prompt start playing after the voicemail message has finished so my prompt is not cut off.

I tried the two solutions listed in this thread (example below). Both of them left a voice mail of "Sorry I didn't hear you" instead of the prompt.

Am I missing something?

Thanks
Dan


<form id="testit">
<record finalsilence="3000ms"/>

<block>
<prompt>
Here is a reminder to tell you that your appointment is at 1 today.
</prompt>
</block>
</form>

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

Re: Handle voice mail / answering machine

Post by support »

Hi,

After reviewing your code, I see that there isn’t a <noinput> tag. The reason why you are hearing the “Sorry, I didn’t hear you” message is because if there is silence during the recording, that is considered a no input error, which results in the platform playing the default “no input” error message.

The best way to go about resolving this issue is to specify the platform to do nothing if there is no input. That way, if no one says anything, there will be a no input error thrown for the recording. it will go into the <noinput> tag, but since there is nothing in there, nothing will happen. then it will fall through into the <block> with his message.

Here’s an example:

Code: Select all

<vxml version="2.0"> 
  <form>
        <var name="callee_type" expr="'answeringmachine'"/>
   <record cond="callee_type=='answeringmachine'" finalsilence="4000ms">
     <noinput>
          <!-- do nothing here -->
     </noinput>
   </record>
   <block>
     <prompt>
       Here is a reminder to tell you that your appointment is at 1 today.
     </prompt>
   </block>
  </form>
</vxml>
Regards,
Plum Support

dgiacobb1
Posts: 10
Joined: Wed Dec 21, 2016 5:27 pm

Re: Handle voice mail / answering machine

Post by dgiacobb1 »

Hi,

Thank for the response.

When I used your sample code, even with the <noinput/> tag, voicemail's are not being consistently left.

I called my work phone number and a voice mail was successfully left.
I call two different mobile phone numbers on the AT&T network, while both registered the call, neither was left a voicemail.

Thoughts?

Thanks,
Dan

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

Re: Handle voice mail / answering machine

Post by support »

Hi Dan,

Here is a more robust code example:

Code: Select all

<vxml version="2.0">
  <form id="record">
    <property name="timeout" value="4s"/>
    <record name="answering_machine" finalsilence="4s">
      <noinput> <goto next="#message"/> </noinput>
      <filled> <goto next="#message"/> </filled>
    </record>
  </form>
  
  <form id="message">
    <block name="message">
      <prompt>
        Here is a reminder to tell you that your appointment is at 1 today.
      </prompt>
    </block>
  </form>
</vxml>
In this example, we force the IVR to play the reminder message after the <record>, regardless if there is a noinput, or if it did record the answering machine message. Right now, the reminder message will play after 4 seconds of silence, but you may need to experiment with the number of seconds to reach an optimal number of voicemails.

Post Reply