Problem with catching failed transfer
Posted: Tue May 02, 2006 1:22 pm
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
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