You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
836 B
Go

3 years ago
/*
RFC 3550. RTP: A Transport Protocol for Real-Time Applications
*/
package icspacketparser
import (
"fmt"
"gitlab.com/cinnamon/voiceagent/icserror"
"gitlab.com/cinnamon/voiceagent/recorddata/readcallsignal"
)
type CallSignal struct {
readcallsignal.CallSignal
}
func NewCallSignal() CallSignal {
cs := CallSignal{}
return cs
}
//implm interface Packeter
func (cs *CallSignal) GetPacketData(packet []byte) *icserror.IcsError {
if err := cs.Parse(packet); err != nil {
//err.Print()
return err
}
return nil
}
func (cs CallSignal) String() string {
return fmt.Sprintf("ChannelID: %s, ServerID: %s, AgentID: %s, Station: %s, CreateTime: %d, EventType: %s, StartTime: %d, EndTime: %d, InOut: %s",
cs.ChannelID, cs.ServerID, cs.AgentID, cs.Station, cs.CreateTime, cs.EventType, cs.StartTime, cs.EndTime, cs.InOut)
}