Handle voice mail / answering machine

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

  • Author
  • Message
Offline

nevenfi

  • Posts: 11
  • Joined: Fri Nov 30, 2007 5:00 am

Handle voice mail / answering machine

PostMon Dec 03, 2007 6:18 am

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?
Offline

support

  • Posts: 3348
  • Joined: Mon Jun 02, 2003 4:47 pm
  • Location: Boston, MA

Place <record> tag at beginning of IVR script

PostMon Dec 03, 2007 1:39 pm

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 5:15 pm, edited 4 times in total.
Offline

nevenfi

  • Posts: 11
  • Joined: Fri Nov 30, 2007 5:00 am

PostMon Dec 17, 2007 11:49 am

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?
Offline

support

  • Posts: 3348
  • Joined: Mon Jun 02, 2003 4:47 pm
  • Location: Boston, MA

IVR code fix for <record> tag

PostMon Dec 17, 2007 12:42 pm

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
Offline

dgiacobb1

  • Posts: 10
  • Joined: Wed Dec 21, 2016 6:27 pm

Re: Handle voice mail / answering machine

PostMon Feb 27, 2017 7:53 pm

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>
Offline

support

  • Posts: 3348
  • Joined: Mon Jun 02, 2003 4:47 pm
  • Location: Boston, MA

Re: Handle voice mail / answering machine

PostTue Feb 28, 2017 5:20 pm

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
Offline

dgiacobb1

  • Posts: 10
  • Joined: Wed Dec 21, 2016 6:27 pm

Re: Handle voice mail / answering machine

PostThu Mar 02, 2017 1:11 pm

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
Offline

support

  • Posts: 3348
  • Joined: Mon Jun 02, 2003 4:47 pm
  • Location: Boston, MA

Re: Handle voice mail / answering machine

PostThu Mar 02, 2017 6:02 pm

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.

Return to Plum DEV Q&A

Who is online

Users browsing this forum: No registered users and 1 guest

cron