VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tilghman at mail.jeffa... Guest
|
Posted: Wed Apr 09, 2008 8:37 am Post subject: [asterisk-users] Catch end of Eagi script when caller hung u |
|
|
On Wednesday 09 April 2008 07:41:17 equis software wrote:
Quote: | Hi, I need to catch then end of an eagi script (python) when caller hungup
because I want to generate my own CDR.
I try this
def run()
signal.signal(signal.SIGHUP, self.logsignal)
def logsignal(self,signum, frame):
self.putCDR()
....but didn't work. Then try with several signals like:
signal.signal(signal.SIGTERM, self.logsignal)
signal.signal(signal.SIGTSTP, self.logsignal)
signal.signal(signal.SIGPIPE, self.logsignal)
|
If you read the Python documentation, you'll see that your signal handler must
be a routine that takes 2 arguments, not the 3 that you're providing here.
--
Tilghman |
|
Back to top |
|
|
equissoftware at gmail... Guest
|
Posted: Wed Apr 09, 2008 8:56 am Post subject: [asterisk-users] Catch end of Eagi script when caller hung u |
|
|
Excuse me, but I thik this function is ok because I did this...
def run()
signal.signal(signal.SIGALRM, self.logsignal)
signal.alarm(10)
def logsignal(self,signum, frame):
self.putCDR()
And work very well, offcourse I need to putCDR() only with SIGHUP not with
the SIGALRM.
On Wed, Apr 9, 2008 at 10:37 AM, Tilghman Lesher <
tilghman at mail.jeffandtilghman.com> wrote:
Quote: | On Wednesday 09 April 2008 07:41:17 equis software wrote:
Quote: | Hi, I need to catch then end of an eagi script (python) when caller
| hungup
Quote: | because I want to generate my own CDR.
I try this
def run()
signal.signal(signal.SIGHUP, self.logsignal)
def logsignal(self,signum, frame):
self.putCDR()
....but didn't work. Then try with several signals like:
signal.signal(signal.SIGTERM, self.logsignal)
signal.signal(signal.SIGTSTP, self.logsignal)
signal.signal(signal.SIGPIPE, self.logsignal)
|
If you read the Python documentation, you'll see that your signal handler
must
be a routine that takes 2 arguments, not the 3 that you're providing here.
--
Tilghman
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
| -------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080409/669d6936/attachment.htm |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|