diff options
author | Matthew Jordan <mjordan@digium.com> | 2014-02-03 01:31:53 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2014-02-03 01:31:53 +0000 |
commit | 01af8d6e12b4ff76a7b234bf2a78d3e0c27cd657 (patch) | |
tree | 3dc4d256945318ea4035da0c5a09a963febf89f0 /main/cdr.c | |
parent | e5899852cc61a3f0a53707c2099ba35380198c69 (diff) |
cdrs: Check for applications to lock onto during dial begin handling
This patch brings CDR processing further in line with r407085. During some dial
operations, the application would not be locked to the Dial application and
would instead continue to show the previously known application. In particular,
this would occur when a Parked call would time out. This was due to a previous
snapshot already locking the application to Park - processing this in a Dial
Begin allows the Dial application to reassert its rightful place.
(CDRs. Ugh.)
But hooray for the Parked Call tests for catching this in the Asterisk Test
Suite.
........
Merged revisions 407166 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/cdr.c b/main/cdr.c index 2b67ba969..c15da10d5 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1351,13 +1351,13 @@ static int base_process_party_a(struct cdr_object *cdr, struct ast_channel_snaps ast_assert(strcasecmp(snapshot->name, cdr->party_a.snapshot->name) == 0); - cdr_object_swap_snapshot(&cdr->party_a, snapshot); /* Ignore any snapshots from a dead or dying channel */ if (ast_test_flag(&snapshot->softhangup_flags, AST_SOFTHANGUP_HANGUP_EXEC) && ast_test_flag(&mod_cfg->general->settings, CDR_END_BEFORE_H_EXTEN)) { cdr_object_check_party_a_hangup(cdr); return 0; } + cdr_object_swap_snapshot(&cdr->party_a, snapshot); /* When Party A is originated to an application and the application exits, the stack * will attempt to clear the application and restore the dummy originate application @@ -1447,7 +1447,7 @@ static int single_state_process_dial_begin(struct cdr_object *cdr, struct ast_ch RAII_VAR(struct module_config *, mod_cfg, ao2_global_obj_ref(module_configs), ao2_cleanup); if (caller && !strcasecmp(cdr->party_a.snapshot->name, caller->name)) { - cdr_object_swap_snapshot(&cdr->party_a, caller); + base_process_party_a(cdr, caller); CDR_DEBUG(mod_cfg, "%p - Updated Party A %s snapshot\n", cdr, cdr->party_a.snapshot->name); cdr_object_swap_snapshot(&cdr->party_b, peer); @@ -1461,7 +1461,7 @@ static int single_state_process_dial_begin(struct cdr_object *cdr, struct ast_ch ast_set_flag(&cdr->flags, AST_CDR_LOCK_APP); } else if (!strcasecmp(cdr->party_a.snapshot->name, peer->name)) { /* We're the entity being dialed, i.e., outbound origination */ - cdr_object_swap_snapshot(&cdr->party_a, peer); + base_process_party_a(cdr, peer); CDR_DEBUG(mod_cfg, "%p - Updated Party A %s snapshot\n", cdr, cdr->party_a.snapshot->name); } |