summaryrefslogtreecommitdiff
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-01-16 00:16:22 +0000
committerMatthew Jordan <mjordan@digium.com>2013-01-16 00:16:22 +0000
commit9693f8f10f1e9273f24995e9979af1c005e3255c (patch)
treed620fca0d58a265ca6853d68f8a72a69f82aa838 /channels/chan_misdn.c
parenta4d0878955241dc6f3feb65482f017a57959d67e (diff)
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 ........ Merged revisions 379146 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index af632f077..4047d1c3e 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -10096,8 +10096,8 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
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;
@@ -10354,6 +10354,7 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
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;