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

Problem with catching failed transfer

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
always24x7
Posts: 30
Joined: Tue Apr 18, 2006 3:05 pm
Location: Bedford, TX

Problem with catching failed transfer

Post by always24x7 »

I am attemting to write code that will try to bridge transfer a call, but catch it gracefully if it fails to connect. I purposely set the timeout short to fake a failed connect for testing purposes.

The problem is that the timeout hits and it appears that it catches it, but it disconnects caller from the IVR without speaking the prompt or going to the location in the goto tag.

Is there a single event that I can catch that will happen no matter why the transfer failed?

Also, what am I doing wrong that the script does not continue after the failed transfer?

How do you correctly handle a failed transfer?

Here is the code:
============

<transfer destexpr="operatorNumber" connecttimeout="10s">
<prompt bargein="false">
Please wait while I transfer you to the next available representative.
</prompt>
<catch event="connection.disconnect.hangup">
<prompt>
I was unable transfer you to a representative at this time.
Please try again later.
<break time="2s"/>
</prompt>
<goto next="#card_holder"/>
</catch>
</transfer>

Here is the section of the log that is produced:
=================================

Tue 02 May 2006 01:03:10 PM EDT:
dtmf input: 1
Found grammar match
hypothesis #0: true (0.9990)
VXI::queue_prompts()
bargein set to false
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS text/plain;charset=wchar_t for:
---------

Please wait while I transfer you to the next available representative.

---------
Previously playing audio (if any) has finished
Newly queued prompts are now being played

Tue 02 May 2006 01:03:14 PM EDT:
Previously playing audio (if any) has finished
Previously playing audio (if any) has finished
Bridge Transfer: 1-817-966-1716

Tue 02 May 2006 01:03:24 PM EDT:
Transfer Failed: Timeout of 10000ms reached
Previously playing audio (if any) has finished
Previously playing audio (if any) has finished
received event: connection.disconnect.hangup
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
I was unable transfer you to a representative at this time.
Please try again later.
<break size="medium" time="2s"/></speak>
---------
errno: 999 message unexpected jump to a dialog

Tue 02 May 2006 01:03:25 PM EDT:
Call End Event
Ending session
Ending Session On Channel 12
ProcessDocument returned error code -57

plumvp::ChannelThread: Channel 12: Call Terminated
New session ID 000003;012;1146589405 for Channel 12
plumvp::ChannelThread: Channel 12: Enabling Call 153
Enabling Calls For Channel 12
plumvp::ChannelThread: About to call VXIplatformWaitForCall
Waiting For Calls on Channel 12

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

need a <catch> block in IVR code to cover when caller.

Post by support »

Hi,

The great irony here is that you don't actually use the <catch> tag to "catch" a transfer's failure to connect. <catch> is only used to handle "events", and most of the transfer failures you want to handle are technically not classified as such.
Instead, you would use a <filled> block to evaluate the transfer variable itself (possible values are enumerated in the transfer section of the VoiceXML spec). E.g.:

<form id="transfer">
<transfer name="the_transfer" destexpr="operatorNumber" connecttimeout="10s">
<prompt bargein="false">Please wait while I transfer you to the next available representative.</prompt>
<filled>
<if cond="the_transfer == 'noanswer' || the_transfer == 'network_busy' || the_transfer == 'unknown' || the_transfer == 'busy'">
<prompt>I was unable transfer you to a representative at this time. Please try again later. <break time="2s"/></prompt>
<goto next="#card_holder"/>
</if>
</filled>
</transfer>
</form>

Note that you must provide a name for your <transfer> (using the "name" attribute) so that you can refer to it in the <filled> block.

And you will still need a <catch> block in your IVR code if you want to handle the case where the caller hangs up during the transfer.

Hope this helps.

Regards,

Plum Support

Post Reply