mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-19 22:28:45 +05:00
dump call costs
This commit is contained in:
@@ -119,10 +119,12 @@ func (sm *FSSessionManager) OnChannelHangupComplete(ev Event) {
|
||||
s := sm.GetSession(ev.GetUUID())
|
||||
if sm.sessionDelegate != nil {
|
||||
sm.sessionDelegate.OnChannelHangupComplete(ev, s)
|
||||
s.SaveMOperations()
|
||||
} else {
|
||||
log.Print("HangupComplete")
|
||||
}
|
||||
if s != nil {
|
||||
|
||||
s.Close()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,3 +104,12 @@ func (s *Session) Disconnect() {
|
||||
func (s *Session) String() string {
|
||||
return fmt.Sprintf("%v: %s -> %s", s.callDescriptor.TimeStart, s.callDescriptor.Subject, s.callDescriptor.DestinationPrefix)
|
||||
}
|
||||
|
||||
//
|
||||
func (s *Session) SaveMOperations() {
|
||||
go func() {
|
||||
for _, cc := range s.CallCosts {
|
||||
log.Print(cc)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user