(closes issue #12286)
Reported by: lmamane
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@196116
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
chan_misdn_log(1, bc->port, "* Starting Ast ctx:%s dad:%s oad:%s with 's' extension\n", ast->context, ast->exten, ast->cid.cid_num);
strcpy(ast->exten, "s");
-
- if (pbx_start_chan(ch) < 0) {
+
+ if (!ast_canmatch_extension(ast, ast->context, ast->exten, 1, bc->oad) || pbx_start_chan(ch) < 0) {
ast = NULL;
+ bc->out_cause = AST_CAUSE_UNALLOCATED;
hangup_chan(ch);
hanguptone_indicate(ch);