On Sat, 24 Sep 2011, Steve Edwards wrote:

Instead of ignoring the signal, how setting up a handler and logging the reception?

On Mon, 26 Sep 2011, Mehmet Avcioglu wrote:

The program is written in a very top to bottom way (himm stateless? non-oo? not sure what to call it) and would be really hard for me to catch those and figure out where it happened and clean things up.

All you need to do is set a signal handler and call syslog() to log the occurrence in a 'safe' place and then exit().. If the signal is already causing your script to abort, you're not doing any cleanup or recovery anyway. All we want to establish is if you are actually receiving a signal.

Whose AGI library did you use?

I am using my own. Yes agreed, but this doesn't even interact with asterisk at all. Just receives a couple values and updates jobs, database accordingly. Does not return anything back to asterisk.

Are you reading the AGI environment in the script?

How are you passing variables from Asterisk? As channel variables or as command line parameters?

What is the dialplan statement that executes your script?

Can you post the script source?

If you captured the AGI dialog from a call when your script failed and you feed the same values (including the AGI environment) into your script from a shell does it fail?

On a Unix system level, a 4 means 'Interrupted system call' -- assuming this is what your '4' signifies. BTW, I'm a 1.2 Luddite and the AGI return value was meaningless back then.

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to