summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/cdr.c8
-rw-r--r--main/pbx.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/main/cdr.c b/main/cdr.c
index fa68ae9fc..eaad66f05 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -884,9 +884,11 @@ int ast_cdr_update(struct ast_channel *c)
/* Copy account code et-al */
ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
- /* Destination information */ /* XXX privilege macro* ? */
- ast_copy_string(cdr->dst, S_OR(c->macroexten, c->exten), sizeof(cdr->dst));
- ast_copy_string(cdr->dcontext, S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
+ if (!ast_check_hangup(c)) {
+ /* Destination information */ /* XXX privilege macro* ? */
+ ast_copy_string(cdr->dst, S_OR(c->macroexten, c->exten), sizeof(cdr->dst));
+ ast_copy_string(cdr->dcontext, S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
+ }
}
}
diff --git a/main/pbx.c b/main/pbx.c
index edb3d1ba7..9b2d9cc31 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -515,7 +515,7 @@ int pbx_exec(struct ast_channel *c, /*!< Channel */
const char *saved_c_appl;
const char *saved_c_data;
- if (c->cdr && !(c->exten[0] == 'h' && c->exten[1] == 0) )
+ if (c->cdr && !ast_check_hangup(c))
ast_cdr_setapp(c->cdr, app->name, data);
/* save channel values */