Merged revisions 193050 via svnmerge from
authorRichard Mudgett <rmudgett@digium.com>
Thu, 7 May 2009 22:24:04 +0000 (22:24 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 7 May 2009 22:24:04 +0000 (22:24 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193050 | rmudgett | 2009-05-07 17:17:06 -0500 (Thu, 07 May 2009) | 5 lines

  Give a more helpful message when an incoming call's dialed extension does not match.

  Added the dialed extension and context to the chan_misdn messages warning
  that the dialed number cannot be matched in the dialplan.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193077 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c

index 4f2a6bf..b356e4d 100644 (file)
@@ -9419,7 +9419,9 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
 
                        if (!ast_canmatch_extension(ch->ast, ch->context, bc->dialed.number, 1, bc->caller.number)) {
                                if (ast_exists_extension(ch->ast, ch->context, "i", 1, bc->caller.number)) {
 
                        if (!ast_canmatch_extension(ch->ast, ch->context, bc->dialed.number, 1, bc->caller.number)) {
                                if (ast_exists_extension(ch->ast, ch->context, "i", 1, bc->caller.number)) {
-                                       ast_log(LOG_WARNING, "Extension can never match, So jumping to 'i' extension. port(%d)\n", bc->port);
+                                       ast_log(LOG_WARNING,
+                                               "Extension '%s@%s' can never match. Jumping to 'i' extension. port:%d\n",
+                                               bc->dialed.number, ch->context, bc->port);
                                        strcpy(ch->ast->exten, "i");
 
                                        ch->state = MISDN_DIALING;
                                        strcpy(ch->ast->exten, "i");
 
                                        ch->state = MISDN_DIALING;
@@ -9427,9 +9429,10 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
                                        break;
                                }
 
                                        break;
                                }
 
-                               ast_log(LOG_WARNING, "Extension can never match, so disconnecting on port(%d).\n"
-                                               "\tMaybe you want to add an 'i' extension to catch this case.\n",
-                                               bc->port);
+                               ast_log(LOG_WARNING,
+                                       "Extension '%s@%s' can never match. Disconnecting. port:%d\n"
+                                       "\tMaybe you want to add an 'i' extension to catch this case.\n",
+                                       bc->dialed.number, ch->context, bc->port);
 
                                if (bc->nt) {
                                        hanguptone_indicate(ch);
 
                                if (bc->nt) {
                                        hanguptone_indicate(ch);
@@ -9656,7 +9659,9 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
                chan_misdn_log(5, bc->port, "CONTEXT:%s\n", ch->context);
                if (!ast_canmatch_extension(ch->ast, ch->context, bc->dialed.number, 1, bc->caller.number)) {
                        if (ast_exists_extension(ch->ast, ch->context, "i", 1, bc->caller.number)) {
                chan_misdn_log(5, bc->port, "CONTEXT:%s\n", ch->context);
                if (!ast_canmatch_extension(ch->ast, ch->context, bc->dialed.number, 1, bc->caller.number)) {
                        if (ast_exists_extension(ch->ast, ch->context, "i", 1, bc->caller.number)) {
-                               ast_log(LOG_WARNING, "Extension can never match, So jumping to 'i' extension. port(%d)\n", bc->port);
+                               ast_log(LOG_WARNING,
+                                       "Extension '%s@%s' can never match. Jumping to 'i' extension. port:%d\n",
+                                       bc->dialed.number, ch->context, bc->port);
                                strcpy(ch->ast->exten, "i");
                                misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE);
                                ch->state = MISDN_DIALING;
                                strcpy(ch->ast->exten, "i");
                                misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE);
                                ch->state = MISDN_DIALING;
@@ -9664,9 +9669,10 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
                                break;
                        }
 
                                break;
                        }
 
-                       ast_log(LOG_WARNING, "Extension can never match, so disconnecting on port(%d).\n"
-                                       "\tMaybe you want to add an 'i' extension to catch this case.\n",
-                                       bc->port);
+                       ast_log(LOG_WARNING,
+                               "Extension '%s@%s' can never match. Disconnecting. port:%d\n"
+                               "\tMaybe you want to add an 'i' extension to catch this case.\n",
+                               bc->dialed.number, ch->context, bc->port);
                        if (bc->nt) {
                                hanguptone_indicate(ch);
                        }
                        if (bc->nt) {
                                hanguptone_indicate(ch);
                        }