exotel

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: 5 Imported by: 0

Documentation

Overview

Package exotel provides Exotel Media Streams 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 {
	ExotelSampleRate int
	SampleRate       int
}

Params configures the Exotel serializer.

type Serializer

type Serializer struct {
	StreamSid  string
	CallSid    string
	SampleRate int
	ExotelRate int
}

Serializer implements serialize.Serializer and serialize.SerializerWithSetup for Exotel. Exotel uses PCM (not mu-law) in base64 for media events.

func NewSerializer

func NewSerializer(streamSid, callSid string, params *Params) *Serializer

NewSerializer returns an Exotel Media Streams 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