[asterisk-commits] murf: branch 1.4 r70656 - /branches/1.4/main/cdr.c

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


Author: murf
Date: Thu Jun 21 08:00:39 2007
New Revision: 70656

URL: http://svn.digium.com/view/asterisk?view=rev&rev=70656
Log:
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:
    branches/1.4/main/cdr.c

Modified: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=70656&r1=70655&r2=70656
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Thu Jun 21 08:00:39 2007
@@ -772,8 +772,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));
 		}
@@ -888,11 +888,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