[Asterisk-Users] agi scripting in perl - dealiing withunexpected disconnects gracefully / spurious DTMF
Tim Petlock
tim at petlock.net
Thu Feb 19 15:00:36 MST 2004
I'm not sure what you mean, being kind of new to some of the
terminology. Are you saying that its possible to detect hangup and, for
example, write a timestamp to a table? Is it a signal like I figured
out how to trap below or is it accessed some other way?
I need to do something like this because I've timed calls with a
stopwatch and can't figure out why the records going into the CDR table
are 20 seconds longer (or more) than the actual call time. I understand
that the actual call time includes the time spent entering and
validating data but I've sat and timed it with a stopwatch and the CDR
is always longer than reality.
-Tim
-----Original Message-----
From: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com] On Behalf Of James
Golovich
Sent: Thursday, February 19, 2004 3:13 PM
To: asterisk-users at lists.digium.com
Subject: RE: [Asterisk-Users] agi scripting in perl - dealiing
withunexpected disconnects gracefully / spurious DTMF
Also since you are using Asterisk::AGI you can register a callback that
gets called when most of the AGI commands return error/hangup.
James
On Thu, 19 Feb 2004, Tim Petlock wrote:
> Thanks - that gave me the basis for a couple of google searches.
> Near the top of the script I put in
> $SIG{HUP} = \&exitGracefully;
>
> and I added a subroutine that looks like this:
>
> sub exitGracefully {
> exit(0);
> }
>
> It now kills itself off without needing to be killed and take * with
it.
>
> THANKS!!!
>
> -Tim
>
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list