[asterisk-bugs] [Asterisk 0011849]: Missing CDR's for Transfers
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Jul 31 14:15:31 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=11849
======================================================================
Reported By: greyvoip
Assigned To: murf
======================================================================
Project: Asterisk
Issue ID: 11849
Category: CDR/General
Reproducibility: always
Severity: major
Priority: normal
Status: feedback
Asterisk Version: 1.4.17
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-01-26 11:11 CST
Last Modified: 2008-07-31 14:15 CDT
======================================================================
Summary: Missing CDR's for Transfers
Description:
At the moment there is one CDR generated per generic bridge. This tends not
to create any problems when the bridge has been created by something like:
SIP User -> Asterisk -> PSTN
The CDR generated will have the PSTN number as the destination and the SIP
User's accountcode.
When a transfer is undertaken the one CDR per generic bridge approach
breaks down. An example call flow for a blind transfer is:
SIP User -> Asterisk -> PSTN
PSTN <- Asterisk -> PSTN (this is after the user has blind transferred the
first call to a second PSTN number)
At the moment Asterisk will correctly generate a CDR for the first call
leg but for the second call leg there is a problem. For the sconed call leg
both ends of the bridge are now billable but as Asterisk only generates a
single CDR per bridge one of the legs will not get billed.
A straight forward fix (at least architecturally) would be to generate a
CDR for each end of the bridge instead of combining both ends into a single
CDR. It would mean some extra CDR's for the standard SIP User -> PSTN call
but it's a lot easier to filter out CDR's to ignore than it is to try and
work out how to handle ones that are missing.
I've classified this as major since it's costing me (and other providers)
money every time a user does a transfer :).
======================================================================
----------------------------------------------------------------------
(0090936) svnbot (reporter) - 2008-07-31 14:15
http://bugs.digium.com/view.php?id=11849#c90936
----------------------------------------------------------------------
Repository: asterisk
Revision: 134883
U branches/1.4/res/res_features.c
------------------------------------------------------------------------
r134883 | murf | 2008-07-31 14:15:24 -0500 (Thu, 31 Jul 2008) | 51 lines
(closes issue http://bugs.digium.com/view.php?id=11849)
Reported by: greyvoip
Tested by: murf
OK, a few days of debugging, a bunch of instrumentation
in chan_sip, main/channel.c, main/pbx.c, etc. and 5 solid
notebook pages of notes later, I have made the small
tweek necc. to get the start time right on the second
CDR when:
A Calls B
B answ.
A hits Xfer button on sip phone,
A dials C and hits the OK button,
A hangs up
C answers ringing phone
B and C converse
B and/or C hangs up
But does not harm the scenario where:
A Calls B
B answ.
B hits xfer button on sip phone,
B dials C and hits the OK button,
B hangs up
C answers ringing phone
A and C converse
A and/or C hangs up
The difference in start times on the second CDR is because
of a Masquerade on the B channel when the xfer number is
sent. It ends up replacing the CDR on the B channel with
a duplicate, which ends up getting tossed out. We keep
a pointer to the first CDR, and update *that* after the
bridge closes. But, only if the CDR has changed.
I hope this change is specific enough not to muck
up any current CDR-based apps. In my defence, I
assert that the previous information was wrong,
and this change fixes it, and possibly other
similar scenarios.
I wonder if I should be doing the same thing
for the channel, as I did for the peer, but
I can't think of a scenario this might affect.
I leave it, then, as an exersize for the users,
to find the scenario where the chan's CDR
changes and loses the proper start time.
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=134883
Issue History
Date Modified Username Field Change
======================================================================
2008-07-31 14:15 svnbot Checkin
2008-07-31 14:15 svnbot Note Added: 0090936
======================================================================
More information about the asterisk-bugs
mailing list