aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-25 21:02:18 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-25 21:02:18 +0000
commite960ccb3b81669362fef754267b08fc76d0b35db (patch)
tree59b7805a8b8c0e7be1c5ef0461ea04632b7fb72d /res
parent63c12cc1147129ad028a46f8b9c8974b9edf4343 (diff)
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 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@203375 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c
index b5bd27bc0..b148bb71d 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1768,7 +1768,16 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
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) {