Documentation
¶
Overview ¶
Package telnyx provides Telnyx WebSocket protocol serializer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct {
TelnyxSampleRate int
SampleRate int
InboundEncoding string
OutboundEncoding string
AutoHangUp bool
}
Params configures the Telnyx serializer.
type Serializer ¶
type Serializer struct {
StreamID string
CallControlID string
APIKey string
SampleRate int
TelnyxRate int
InboundEncoding string // "PCMU" or "PCMA"
OutboundEncoding string // "PCMU" or "PCMA"
AutoHangUp bool
// contains filtered or unexported fields
}
Serializer implements serialize.Serializer and serialize.SerializerWithSetup for Telnyx.
func NewSerializer ¶
func NewSerializer(streamID, outboundEncoding, inboundEncoding, callControlID, apiKey string, params *Params) *Serializer
NewSerializer returns a Telnyx WebSocket serializer.
func (*Serializer) Deserialize ¶
func (s *Serializer) Deserialize(data []byte) (frames.Frame, error)
Deserialize implements serialize.Serializer.
func (*Serializer) Serialize ¶
func (s *Serializer) Serialize(f frames.Frame) ([]byte, error)
Serialize implements serialize.Serializer.
func (*Serializer) Setup ¶
func (s *Serializer) Setup(start *frames.StartFrame)
Setup implements serialize.SerializerWithSetup.
Click to show internal directories.
Click to hide internal directories.