[asterisk-bugs] [Asterisk 0011553]: [patch] ChannelRedirect causes the channel executing it to terminate if any form of error occurs.

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Feb 4 19:24:52 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11553 
====================================================================== 
Reported By:                johan
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11553
Category:                   Applications/app_channelredirect
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.15  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             12-14-2007 11:05 CST
Last Modified:              02-04-2008 19:24 CST
====================================================================== 
Summary:                    [patch] ChannelRedirect causes the channel executing
it to terminate if any form of error occurs.
Description: 
When you use ChannelRedirect on a channel that does not exist the call will
be terminated, and the execution of the dial plan will end. Instead only
the error message should be returned, and the execution of the dial plan
can then continue as it should.

The enclosed patch change the behaviour of ChannelRedirect to set the
channel variable CR_STATUS to either SUCCESS, NOARGS, BADARGS, NOCHANNEL,
BADEXTENSION or FAIL, so that your dial plan does not have to crash and
burn in agony.
====================================================================== 

---------------------------------------------------------------------- 
 johan - 02-04-08 19:24  
---------------------------------------------------------------------- 
Maybe you could add a relationship to 0011753, that is the main issue
here.
Also right now this needs to be merged manualy because some changes after
this patch to app_channelredirect.c

However I have one question. In revision 76703 the following test was
removed, that I have reintroduced. Am I in error here?
-	res = ast_parseable_goto(chan2, args.label);
+	if (!ast_parseable_goto(chan2, args.label)) {
+		ast_log(LOG_WARNING, "%s failed for %s\n", app, args.channel);
+		pbx_builtin_setvar_helper(chan, "CHANNELREDIRECT_STATUS", "FAIL");
+	} else {
+		pbx_builtin_setvar_helper(chan, "CHANNELREDIRECT_STATUS", "SUCCESS");
+	} 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-04-08 19:24  johan          Note Added: 0081695                          
======================================================================




More information about the asterisk-bugs mailing list