[asterisk-commits] murf: trunk r70676 - in /trunk: ./ main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 21 08:18:12 CDT 2007


Author: murf
Date: Thu Jun 21 08:18:12 2007
New Revision: 70676

URL: http://svn.digium.com/view/asterisk?view=rev&rev=70676
Log:
Merged revisions 70656 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70656 | murf | 2007-06-21 07:00:39 -0600 (Thu, 21 Jun 2007) | 1 line

Via complaints aired in asterisk-users, I submit these changes, which allow cdr updates to see macro context/exten, whether hung up or not
........

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

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

Modified: trunk/main/cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cdr.c?view=diff&rev=70676&r1=70675&r2=70676
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Thu Jun 21 08:18:12 2007
@@ -775,8 +775,8 @@
 			cdr->amaflags = c->amaflags ? c->amaflags :  ast_default_amaflags;
 			ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
 			/* Destination information */
-			ast_copy_string(cdr->dst, c->exten, sizeof(cdr->dst));
-			ast_copy_string(cdr->dcontext, c->context, sizeof(cdr->dcontext));
+			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));
 			/* Unique call identifier */
 			ast_copy_string(cdr->uniqueid, c->uniqueid, sizeof(cdr->uniqueid));
 		}
@@ -891,11 +891,10 @@
 
 			/* Copy account code et-al */	
 			ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
-			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));
-			}
+			
+			/* 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));
 		}
 	}
 




More information about the asterisk-commits mailing list