Page 1 of 1

transfer events

Posted: Fri Aug 18, 2006 4:18 am
by jdee
Hi, I have a specific logic problem, and I'm wondering if anyone can assist in helping me work through it.

My application transfers users to a call centre if they make an incorrect input.

If the user hangs up BEFORE they speak to a call centre worker, an email is sent to the call centre with the callers CLI so that a call centre can telephone the caller. This is done by capturing the hangup event.

The problem is, that once the caller has successfully spoken to a call centre worker and then hangs up, the application still sends the 'caller hungup before speaking to a worker' email.

It appears the hungup event fires even after a successful transfer.

Is there any event I can catch that can differentiate between a caller waiting for a transfer to be answered, and a transfer being answered?

Or is there another way to solve this problem?

Thanks in advance for any assistance.

Posted: Fri Aug 18, 2006 8:33 am
by adriannaude
You could try something like this:

Place a <catch> for the hangup as part of your <transfer>.
Test the value of the shadow variable name$.duration. If this is greater than zero then the transfer must have taken place. If it is zero then assume the transfer didn't complete and throw a new hangup event that can then be caugth by the global <catch>.

(I haven't tested this, but good luck!)

Adrian

IVR engineers working on issue with acquiring name$.duration

Posted: Fri Aug 18, 2006 11:34 am
by support
There appears to be an IVR issue with acquiring name$.duration in the case of a near-end disconnect which would make the method described below (which is conceptually sound) difficult to use. We are currently investigating the possible cause for this IVR behavior and will post a reply here when a good workaround is found and when this IVR issue has been solved within the IVR platform. Thanks for you patience.

workaround for IVR code

Posted: Fri Aug 18, 2006 1:02 pm
by support
As a workaround, you can do the following with the <catch> tag in your IVR code:

Code: Select all

<var name="duration"/>
...
<catch event="connection.disconnect">
        <if cond="mytransfer == undefined || mytransfer$.duration == 0">
                <!-- The caller hung up after being connected -->
                <assign name="duration" expr="'nearenddisconnect'"/>
        <else/>
                <!-- The caller hung up before being connected -->
                <assign name="duration" expr="noconnection"/>
        </if>
        <submit next="process.php" method="get" namelist="duration"/>
</catch>