[asterisk-bugs] [Asterisk 0012466]: AGISTATUS is set to SUCCESS although the agi program returns not 0

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Apr 17 14:51:29 CDT 2008


The following issue has been CLOSED 
====================================================================== 
http://bugs.digium.com/view.php?id=12466 
====================================================================== 
Reported By:                fmueller
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   12466
Category:                   Resources/res_agi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 114184 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             04-17-2008 07:48 CDT
Last Modified:              04-17-2008 14:51 CDT
====================================================================== 
Summary:                    AGISTATUS is set to SUCCESS although the agi program
returns not 0
Description: 
I have this context:

[default]
exten => 69,1,Answer()
exten => 69,2,AGI(exit-status)
exten => 69,3,Noop(${AGISTATUS})
exten => 69,4,Hangup()

The source for the application "exit-status" is this:

#include <stdlib.h>
int main(void)
{
        exit(-1);
}

The documentation in UPGRADE.txt says:

If an AGI script exits with a non-zero exit code, the AGISTATUS variable
will be set to "FAILURE" as opposed to "SUCCESS".

The problem is that AGISTATUS is set to SUCCESS as you can see in the
following verbose output:

*CLI>     -- Executing [69 at default:1] Answer("SIP/111-08202838", "") in
new stack
    -- Executing [69 at default:2] AGI("SIP/111-08202838", "exit-status") in
new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/exit-status
    -- AGI Script exit-status completed, returning 0
    -- Executing [69 at default:3] NoOp("SIP/111-08202838", "SUCCESS") in new
stack
    -- Executing [69 at default:4] Hangup("SIP/111-08202838", "") in new
stack
  == Spawn extension (default, 69, 4) exited non-zero on
'SIP/111-08202838'

Thanks for your feedback.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-17-08 14:51  Corydon76      Assigned To               => Corydon76       
04-17-08 14:51  Corydon76      Status                   feedback => closed  
04-17-08 14:51  Corydon76      Resolution               open => no change
required
======================================================================




More information about the asterisk-bugs mailing list