Hello, I have an AGI script that occasionally disappears without completing its action and asterisk logs the following. <Local/0123456 at context-f46e;1>AGI Script script.php completed, returning 4 Spawn extension (context, 0123456, 2) exited non-zero on 'Local/0123456 at context-f46e;1' I figured this was due to channel hanging up and * sending a SIGHUP to the script and added a catch and ignore for SIGHUP and SIGPIPE. But I still have instances where AGI script gets lost. I am running 1.8. Any ideas what "returning 4" really means, where should I concentrate? Thanks -- Mehmet
-----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mehmet Avcioglu Sent: Friday, September 23, 2011 12:02 PM To: asterisk-users at lists.digium.com Subject: [asterisk-users] AGI Problem Hello, I have an AGI script that occasionally disappears without completing its action and asterisk logs the following. <Local/0123456 at context-f46e;1>AGI Script script.php completed, returning 4 Spawn extension (context, 0123456, 2) exited non-zero on 'Local/0123456 at context-f46e;1' I figured this was due to channel hanging up and * sending a SIGHUP to the script and added a catch and ignore for SIGHUP and SIGPIPE. But I still have instances where AGI script gets lost. I am running 1.8. Any ideas what "returning 4" really means, where should I concentrate? Thanks -- Mehmet Just a WAG - 4 is the error level returned by your php script, where it normally returns 0.
On Sep 23, 2011, at 8:01 PM, Mehmet Avcioglu wrote:> I have an AGI script that occasionally disappears without completing its action and asterisk logs the following. > > <Local/0123456 at context-f46e;1>AGI Script script.php completed, returning 4 > Spawn extension (context, 0123456, 2) exited non-zero on 'Local/0123456 at context-f46e;1'I also changed the dialplan and added a line to print AGISTATUS, but when this "returning 4" happens, asterisk stops there and doesn't execute any further dialplan actions, so I don't even see AGISTATUS value. exten => h,1,AGI(script.php,${ANSWEREDTIME},,,) exten => h,n,NoOp(${AGISTATUS}) Executing [h at context:1] AGI("Local/0123456 at context-4b79;1", "script.php,13,,,") in new stack <Local/0123456 at context-4b79;1>AGI Script script.php completed, returning 4 Spawn extension (context, h, 1) exited non-zero on 'Local/0123456 at context-4b79;1' -- Mehmet