On 20/03/2013, at 10:15 PM, Ishfaq Malik <i...@pack-net.co.uk> wrote:

> I wrote the script! I've not put exit status values in it either. 
> 
> I've been having a look the source for res_agi_c (as a non c coder) and
> there is a variable called returnstatus which is instantiated with the
> value AGI_RESULT_SUCCESS which I assume is a constant defined elsewhere.
> This variable is where the 4 is coming from.
> 
> There are other constants referred to as well so I'm trying to work out
> which one equates to 4 to give me more of an idea of why the script is
> failing.

Return codes can be set by you, or can be returned from the scripting language 
you work in.

If you were working in Perl, for instance, a return code of 4 means Interrupted 
System Call.

Check the documentation for your language for a better idea. Also try running 
your script as the user that Asterisk runs as. Maybe asterisk doesn't have 
permissions to execute the script. One way to do this is via the "sudo" 
command, e.g. sudo -u asterisk <path to agi-script>

Thanks,
Andrew
--
_____________________________________________________________________
-- 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