[svn-commits] mjordan: trunk r407169 - in /trunk: ./ main/cdr.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Feb 2 19:31:55 CST 2014


Author: mjordan
Date: Sun Feb  2 19:31:53 2014
New Revision: 407169

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407169
Log:
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

Modified:
    trunk/   (props changed)
    trunk/main/cdr.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cdr.c?view=diff&rev=407169&r1=407168&r2=407169
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Sun Feb  2 19:31:53 2014
@@ -1351,13 +1351,13 @@
 
 	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 @@
 	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 @@
 		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);
 	}




More information about the svn-commits mailing list