Skip to content

Commit

Permalink
Use realtime portion of the MonoTime here.
Browse files Browse the repository at this point in the history
Issue:	#36
  • Loading branch information
sobomax committed Oct 23, 2020
1 parent 533fcc9 commit 520bf6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sippy/RadiusAccounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def asend(self, type, rtime = None, origin = None, result = 0, ua = None):
dc = '10'
else:
dc = '0'
attributes.extend((('h323-disconnect-time', self.ftime(self.iTime + delay + duration)), \
attributes.extend((('h323-disconnect-time', self.ftime(self.iTime.realt + delay + duration)), \
('Acct-Session-Time', '%d' % round(duration)), ('h323-disconnect-cause', dc)))
if type == 'Stop':
if origin == 'caller':
Expand All @@ -153,14 +153,14 @@ def asend(self, type, rtime = None, origin = None, result = 0, ua = None):
else:
release_source = '8'
attributes.append(('release-source', release_source))
attributes.extend((('h323-connect-time', self.ftime(self.iTime + delay)), ('h323-setup-time', self.ftime(self.iTime)), \
('Acct-Status-Type', type)))
attributes.extend((('h323-connect-time', self.ftime(self.iTime.realt + delay)), \
('h323-setup-time', self.ftime(self.iTime.realt)), ('Acct-Status-Type', type)))
if self.user_agent != None:
attributes.append(('h323-ivr-out', 'sip_ua:' + self.user_agent))
if self.p1xx_ts != None:
attributes.append(('Acct-Delay-Time', round(self.p1xx_ts)))
if self.p100_ts != None:
attributes.append(('provisional-timepoint', self.ftime(self.p100_ts)))
attributes.append(('provisional-timepoint', self.ftime(self.p100_ts.realt)))
pattributes = ['%-32s = \'%s\'\n' % (x[0], str(x[1])) for x in attributes]
pattributes.insert(0, 'sending Acct %s (%s):\n' % (type, self.origin.capitalize()))
self.global_config['_sip_logger'].write(call_id = self.sip_cid, *pattributes)
Expand Down

0 comments on commit 520bf6e

Please sign in to comment.