diff options
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index 4d7ebbaba..550add495 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2520,6 +2520,8 @@ static int __ast_pbx_run(struct ast_channel *c) } if (!found && !error) ast_log(LOG_WARNING, "Don't know what to do with '%s'\n", c->name); + if (res != AST_PBX_KEEPALIVE) + ast_softhangup(c, c->hangupcause ? c->hangupcause : AST_CAUSE_NORMAL_CLEARING); if ((res != AST_PBX_KEEPALIVE) && ast_exists_extension(c, c->context, "h", 1, c->cid.cid_num)) { if (c->cdr && ast_opt_end_cdr_before_h_exten) ast_cdr_end(c->cdr); |