diff --git a/apps/app_disa.c b/apps/app_disa.c index 654cb6c8d8..72f0eaf864 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -279,8 +279,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; + } } }