Skip to main content

Interface: TelephonyStreamTransportConfig

Defined in: packages/agentos/src/io/channels/telephony/TelephonyStreamTransport.ts:27

Optional construction-time configuration for TelephonyStreamTransport.

Properties​

authorizeStart()?​

optional authorizeStart: (start) => boolean

Defined in: packages/agentos/src/io/channels/telephony/TelephonyStreamTransport.ts:38

Validates the call and custom parameters against the already verified upgrade. Must be synchronous.

Parameters​

start​
callSid​

string

Provider call-leg identifier (e.g. Twilio CallSid, Telnyx call_control_id).

metadata?​

Record<string, unknown>

Additional provider-specific metadata attached to the start event.

streamSid​

string

Provider-assigned stream identifier.

type​

"start"

Stream successfully started; metadata about the call is available.

This is always the first meaningful event on a new stream connection. The TelephonyStreamTransport transitions from connecting to open upon receiving this event and sends the optional MediaStreamParser.formatConnected acknowledgment.

Returns​

boolean


outputSampleRate?​

optional outputSampleRate: number

Defined in: packages/agentos/src/io/channels/telephony/TelephonyStreamTransport.ts:34

Sample rate the pipeline expects for inbound AudioFrame events. Incoming 8 kHz telephony audio is upsampled to this rate. Carrier mode accepts 8000 or 16000.

Default Value​

16000

playbackTimeoutMs?​

optional playbackTimeoutMs: number

Defined in: packages/agentos/src/io/channels/telephony/TelephonyStreamTransport.ts:44

Deadline for each write and each playback checkpoint; default 10000 ms, maximum 30000 ms. A chunk with a generation has it for its writes and its checkpoint together; a chunk without one, written in order, has it for its checkpoint from when it is the oldest written chunk awaiting one.


protocol?​

optional protocol: "legacy" | "carrier"

Defined in: packages/agentos/src/io/channels/telephony/TelephonyStreamTransport.ts:36

Omission retains the original transport; carrier mode requires a carrier parser.