]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow DISA to handle extensions that start with #.
authorRussell Bryant <russell@russellbryant.com>
Tue, 9 Dec 2008 16:46:53 +0000 (16:46 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 9 Dec 2008 16:46:53 +0000 (16:46 +0000)
(closes issue #13330)
Reported by: jcovert

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

apps/app_disa.c

index f0c9aced7f40a37997be9eacfa15096c37ae704b..c3fe1a90a5c8df996ab7ef3759ec6305392e7839 100644 (file)
@@ -298,8 +298,14 @@ static int disa_exec(struct ast_channel *chan, void *data)
                                        continue;
                                }
                        } else {
-                               if (j == '#') { /* end of extension */
-                                       break;
+                               if (j == '#') { /* end of extension .. maybe */
+                                       if (i == 0 && 
+                                                       (ast_matchmore_extension(chan, args.context, "#", 1, chan->cid.cid_num) ||
+                                                        ast_exists_extension(chan, args.context, "#", 1, chan->cid.cid_num)) ) {
+                                               /* Let the # be the part of, or the entire extension */
+                                       } else {
+                                               break;
+                                       }
                                }
                        }