telnyx

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL