Review Board 1.7.16


Review Request #1734 - Created Feb. 12, 2012 and submitted

Russell Bryant
This patch adds a variable AGIEXITONHANGUP for res_agi.  If this variable is set to "yes" on a channel, AGI() will exit immediately once a channel hangup has been detected.  This was the behavior of AGI() in Asterisk 1.4 and earlier and is still desired by some people.
Wrote a simple AGI script that executes HANGUP and observed differences in behavior between Asterisk versions and then with/without this variable enabled.
Ship it!
Posted (Feb. 13, 2012, 5:19 a.m.)
Seems like a reasonable change to me.
/trunk/res/res_agi.c (Diff revision 1)
You can just call ast_true() here. ast_true() calls ast_strlen_zero() itself and will return 0 if ast_strlen_zero() evaluates true.
  1. Done
Posted (Feb. 13, 2012, 5:43 a.m.)


/trunk/res/res_agi.c (Diff revision 1)
What mmichelson said could also be applied to this line.
  1. done
/trunk/res/res_agi.c (Diff revision 1)
Locate the exit_on_hangup check here.
/trunk/res/res_agi.c (Diff revision 1)
A better place for this check would be right after sending the SIGHUP signal or HANGUP message to the AGI script.  Located above.
  1. done
Posted (Feb. 13, 2012, 9:10 a.m.)
Is this patch intended for ASTERISK-17998?
  1. Not quite ... I left some comments on the issue. runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to