Excuse me, but I thik this function is ok because I did this...<br><br>def run()<br> signal.signal(signal.SIGALRM, self.logsignal)<br> signal.alarm(10)<br><br>def logsignal(self,signum, frame):<br>
self.putCDR()<br><br>And work very well, offcourse I need to putCDR() only with SIGHUP not with the SIGALRM.<br><br><br><br><br><br><div class="gmail_quote">On Wed, Apr 9, 2008 at 10:37 AM, Tilghman Lesher <<a href="mailto:tilghman@mail.jeffandtilghman.com">tilghman@mail.jeffandtilghman.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">On Wednesday 09 April 2008 07:41:17 equis software wrote:<br>
> Hi, I need to catch then end of an eagi script (python) when caller hungup<br>
> because I want to generate my own CDR.<br>
> I try this<br>
><br>
> def run()<br>
> signal.signal(signal.SIGHUP, self.logsignal)<br>
><br>
> def logsignal(self,signum, frame):<br>
> self.putCDR()<br>
><br>
> ....but didn't work. Then try with several signals like:<br>
> signal.signal(signal.SIGTERM, self.logsignal)<br>
> signal.signal(signal.SIGTSTP, self.logsignal)<br>
> signal.signal(signal.SIGPIPE, self.logsignal)<br>
<br>
</div></div>If you read the Python documentation, you'll see that your signal handler must<br>
be a routine that takes 2 arguments, not the 3 that you're providing here.<br>
<br>
--<br>
Tilghman<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br>