Page 1 of 1

Where the caller hung up

Posted: Thu Apr 26, 2007 2:48 am
by bilcorry
I want to know where the caller hung up during the call. My first thought was to pepper the code with:

<var name="hungup" expr="'got to A'" />
...
<var name="hungup" expr="'got to B'" />

Then use the "hungup" var with <catch> to know where they hung up. Unfortunately, the script keeps running when a caller hangs up, which always sets the hungup var to the very last value. So my next idea was to conditionally set it:

<if cond="_event != 'connection.disconnect.hangup'">
<var name="hungup" expr="'got to B'" />
</if>

That way, if a hangup occurred, only the appropriate var would be set. But that results in a semantic error. My guess is the _event var is only available within <catch>.

So I'm looking for other ideas that don't involved chopping my <form> into a bazillion little forms to be able to capture the point where the call ended. Is there a way to have the script abort immediately? Is there a way to conditionally test if an event has occurred outside of <catch>?

Thanks in advance.

- Bil

Posted: Thu Apr 26, 2007 1:43 pm
by bilcorry
Here's my solution for the archives (can you search these?):

Instead of trying to save the location where the user hung up in a var, I instead have a "tickler" that periodically records their location in the call via <data>. It appears the script doesn't execute <data> if the caller has hung up. It's a bit chatty (many db calls per page), but it works. If there's a better solution, please let me know.

Just to be clear, this is what I'm doing:

<data name="pointA" src="tickle.lasso?tickle=pointA" namelist="mysession" />

... do stuff ...

<data name="pointB" src="tickle.lasso?tickle=pointB" namelist="mysession" />

... do stuff ...

<data name="pointC" src="tickle.lasso?tickle=pointC" namelist="mysession" />


- Bil

IVR server and your DB server are co-located on the same net

Posted: Mon Apr 30, 2007 10:09 am
by support
Hi,

If bandwith/speed is not an IVR issue (e.g. the IVR server and your DB server are co-located on the same network), then using a "tickler" is probably just fine.

We typically use the previous approach of setting variables at various points in the IVR call flow. However, you need to make sure that you end the IVR call somewhere in your <catch> block (or in some ensuing block). E.g.:

<catch event="connection.disconnect.hangup">
caller hung up at <value expr="hungup" />
<exit />
</catch>

The number of forms you break your IVR code into is dependent entirely on how specifically you need to know where the caller hung up.


Regards,
Plum Support