[svn-commits] russell: branch 1.4 r203375 - /branches/1.4/res/res_features.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 25 16:02:28 CDT 2009


Author: russell
Date: Thu Jun 25 16:02:18 2009
New Revision: 203375

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203375
Log:
Fix a case where CDR answer time could be before the start time involving parking.

(closes issue #13794)
Reported by: davidw
Patches:
      13794.patch uploaded by murf (license 17)
      13794.patch.160 uploaded by murf (license 17)
Tested by: murf, dbrooks

Modified:
    branches/1.4/res/res_features.c

Modified: branches/1.4/res/res_features.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=203375&r1=203374&r2=203375
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Thu Jun 25 16:02:18 2009
@@ -1768,7 +1768,16 @@
 		   before the macro started playing. To the phone system,
 		   this is billable time for the call, even tho the caller
 		   hears nothing but ringing while the macro does its thing. */
-		if (peer_cdr && !ast_tvzero(peer_cdr->answer)) {
+
+		/* Another case where the peer cdr's time will be set, is when
+		   A self-parks by pickup up phone and dialing 700, then B
+		   picks up A by dialing its parking slot; there may be more 
+		   practical paths that get the same result, tho... in which
+		   case you get the previous answer time from the Park... which
+		   is before the bridge's start time, so I added in the 
+		   tvcmp check to the if below */
+
+		if (peer_cdr && !ast_tvzero(peer_cdr->answer) && ast_tvcmp(peer->cdr->answer, bridge_cdr->start) >= 0) {
 			ast_cdr_setanswer(bridge_cdr, peer_cdr->answer);
 			ast_cdr_setdisposition(bridge_cdr, peer_cdr->disposition);
 			if (chan_cdr) {




More information about the svn-commits mailing list