[asterisk-commits] mjordan: branch 11 r379146 - in /branches/11: ./ channels/chan_misdn.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 15 18:14:42 CST 2013


Author: mjordan
Date: Tue Jan 15 18:14:38 2013
New Revision: 379146

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379146
Log:
Set the INVALID_EXTEN channel variable when chan_misdn forces the 'i' extension

The chan_misdn channel driver will send a channel with an invalid destination
to the 'i' extension itself if said extension can be reached. It forgot,
however, to set the INVALID_EXTEN channel variable when it bounces the channel
to this extension. Dialplan writers everywhere moaned at yet another
inconsistency.

This is yet another example of why duplicating logic in multiple places results
in bugs that stick around in Jira for just under three years.

Yes: ASTERISK-15456 was created on January 18th, 2010. Patch committed on
January 15th, 2013. Ouch.

(closes issue ASTERISK-15456)
Reported by: Thomas Omerzu
patches:
  chan_misdn_invalid.patch2 uploaded by Thomas Omerzu (license 5927)
........

Merged revisions 379145 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/channels/chan_misdn.c

Propchange: branches/11/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Tue Jan 15 18:14:38 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001
+/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001,379145

Modified: branches/11/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_misdn.c?view=diff&rev=379146&r1=379145&r2=379146
==============================================================================
--- branches/11/channels/chan_misdn.c (original)
+++ branches/11/channels/chan_misdn.c Tue Jan 15 18:14:38 2013
@@ -10088,8 +10088,8 @@
 					ast_log(LOG_WARNING,
 						"Extension '%s@%s' can never match. Jumping to 'i' extension. port:%d\n",
 						bc->dialed.number, ch->context, bc->port);
+					pbx_builtin_setvar_helper(ch->ast, "INVALID_EXTEN", bc->dad);
 					ast_channel_exten_set(ch->ast, "i");
-
 					ch->state = MISDN_DIALING;
 					start_pbx(ch, bc, ch->ast);
 					break;
@@ -10346,6 +10346,7 @@
 				ast_log(LOG_WARNING,
 					"Extension '%s@%s' can never match. Jumping to 'i' extension. port:%d\n",
 					bc->dialed.number, ch->context, bc->port);
+				pbx_builtin_setvar_helper(ch->ast, "INVALID_EXTEN", bc->dad);
 				ast_channel_exten_set(ch->ast, "i");
 				misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE);
 				ch->state = MISDN_DIALING;




More information about the asterisk-commits mailing list