Not that this is an ideal situation, but can you wrap the php code in a shell script and "trap" the HUP signal?
Just a thought. Cullin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Areski K Sent: Wednesday, November 09, 2005 1:20 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] A2Billing Well what is happening is that Asterisk is sending a SIGHUP signal to the AGI script. I guess this feature was always implemented in Asterisk but wasn't working before and has been corrected with the pthread_sigmask(SIG_UNBLOCK (see res_agi.c)... PHP CLI/CGI doesn't normally include the pcntl module for signal handler so the SIGHUP is killing the AGI process, snifff ;( So what the solution for those that want to use the cvs or start to enjoy 1.2.0-rc1, well there 2 solutions : 1# Remove the kill(pid,SIGHUP) in res_agi :D Kidding, some would like to kill me for saying smth like that. 2# install php-pcntl according to your php version (PHP 5 have it already) -> u can download from here http://sourceforge.net/project/showfiles.php?group_id=112092 and then add this at the beginning of a2billing.php (after #!/usr/bin/php -q <?php... ) declare(ticks = 1); if (function_exists('pcntl_signal')) { pcntl_signal(SIGHUP, SIG_IGN); } This will ignore the signal SIGHUP. Anyway, I will release tonight or tomorrow (if I am lazy) so you can catch this changes from the packages. Don't bill too high & save the killed process, /Areski http://areski.net/a2billing/ On 11/9/05, Administrator TOOTAI <[EMAIL PROTECTED]> wrote: > John Fraser a écrit : > > >Hi all, > > > >I am having an issue with individual access vs simultaneous access. > >If I set a card for individual access, make a call with that card the counter > >goes to 1. If the call complets normally shouldnt the counter reset to 0? > >Second call tells me that card is already in use. > > > > > If you're using CVS/1.2, A2Billing is broken and don't recognize hangup. > It's ok with 1.0 branch. Other solution is not to hangup and let > A2Billing do the stuff ;-) > > [...] > > -- > Daniel > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > [email protected] > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > _______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
