From 20aed1b2541ae78d81fb0347404ad60ef9f7cc16 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 9 Dec 2008 16:50:04 +0000 Subject: [PATCH] Merged revisions 162016 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r162016 | russell | 2008-12-09 10:47:39 -0600 (Tue, 09 Dec 2008) | 13 lines Merged revisions 162014 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r162014 | russell | 2008-12-09 10:46:53 -0600 (Tue, 09 Dec 2008) | 5 lines Allow DISA to handle extensions that start with #. (closes issue #13330) Reported by: jcovert ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@162018 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_disa.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/app_disa.c b/apps/app_disa.c index 2ed5e15f7b..51cb85c3d1 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -281,8 +281,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; + } } }