/*
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)
}
