@ariaflowagents/livekit-plugin-transport-smartpbx
v1.0.0
Published
SmartPBX transport adapter for AriaFlow voice agents.
Maintainers
Readme
@ariaflow/livekit-plugin-transport-smartpbx
SmartPBX transport adapter for AriaFlow voice agents.
This package provides a reusable TransportAdapter implementation for SmartPBX-like
WebSocket media streams so production code can live in a package, while playground
examples stay thin.
Protocol stance:
- Follow the SmartPBX AI Provider contract documented in
SmartPBX AI Provider Docsversion2025.10.29. - Treat
start,media, and WebSocket close as the normative protocol surface. - Do not invent SmartPBX protocol events for agent text or client turn markers.
Exports
SmartPBXTransportAdapterSmartPBXAudioInputSmartPBXAudioOutputSmartPBXTextOutputDEFAULT_SMARTPBX_SAMPLE_RATEDEFAULT_WEBSOCKET_OPEN_STATE
Notes
- This package focuses on transport I/O contract and stream lifecycle.
- Codec conversion (G.711, Opus, resample strategy) can be composed in the host app
through the
onAudioFramecallback. audioInput.endCurrentTurn()finalizes the local inbound stream only. It does not emit SmartPBX protocol messages back to the peer.- Outbound playback lifecycle is only reported after a frame is actually handed to
onAudioFrame, so interruption logic is not driven by undeliverable audio. - Agent text is surfaced through an optional
onText(text, session)host callback rather than through SmartPBX WebSocket messages, because the official protocol does not define a text event.
