types
Runner session argument types for the development runner.
These types are used by the development runner to pass transport-specific information to bot functions.
- class pipecat.runner.types.DialinSettings(*, call_id: str, call_domain: str, To: str | None = None, From: str | None = None, sip_headers: dict[str, str] | None = None)[source]
Bases:
BaseModelDial-in settings from the Daily webhook.
This model matches the structure sent by Pipecat Cloud and Daily.co webhooks for incoming PSTN/SIP calls.
- Parameters:
call_id – Unique identifier for the call (UUID representing sessionId in SIP Network)
call_domain – Daily domain for the call (UUID representing Daily Domain on SIP Network)
To – The dialed phone number (optional)
From – The caller’s phone number (optional)
sip_headers – Optional SIP headers from the call
- call_id: str
- call_domain: str
- To: str | None
- From: str | None
- sip_headers: dict[str, str] | None
- class pipecat.runner.types.DailyDialinRequest(*, dialin_settings: DialinSettings, daily_api_key: str, daily_api_url: str)[source]
Bases:
BaseModelRequest data for Daily PSTN dial-in requests.
This is the structure passed in runner_args.body for dial-in calls. It matches the payload structure from Pipecat Cloud’s dial-in webhook handler.
- Parameters:
dialin_settings – Dial-in configuration including call_id, call_domain, To, From
daily_api_key – Daily API key for pinlessCallUpdate (required for dial-in)
daily_api_url – Daily API URL (staging or production)
- dialin_settings: DialinSettings
- daily_api_key: str
- daily_api_url: str
- class pipecat.runner.types.CallData(*, stream_id: str | None = None, call_id: str | None = None, from_number: str | None = None, to: str | None = None, body: dict = <factory>, **extra_data: Any)[source]
Bases:
BaseModelParsed telephony handshake data from the provider’s first WebSocket messages.
Populated by
pipecat.runner.utils.parse_telephony_websocket()and exposed onWebSocketRunnerArguments.call_databycreate_transport. Gives typed attribute access —call_data.to_number,call_data.call_id— while staying dict-compatible (call_data["call_id"],call_data.get("body", {})) so bots written against the old dict keep working.Fields are populated per provider; absent ones stay
None. Provider-specific keys not modeled here remain accessible (extra="allow").This base holds the fields common to all providers. Provider-specific fields live on subclasses (
TelnyxCallData,ExotelCallData), whichparse_telephony_websocket/create_transportconstruct per provider.- Parameters:
stream_id – Provider media-stream identifier.
call_id – Provider call identifier, normalized across providers (Twilio
callSid, PlivocallId, Exotelcall_sid, Telnyxcall_control_id).from_number – Caller’s number. Wire key
from.to_number – Dialed number. Wire key
to.body – Custom parameters sent by the provider (e.g. Twilio TwiML stream parameters).
- stream_id: str | None
- call_id: str | None
- from_number: str | None
- to_number: str | None
- body: dict
- class pipecat.runner.types.TelnyxCallData(*, stream_id: str | None = None, call_id: str | None = None, from_number: str | None = None, to: str | None = None, body: dict = <factory>, outbound_encoding: str | None = None, **extra_data: Any)[source]
Bases:
CallDataTelnyx-specific parsed telephony handshake data.
- Parameters:
outbound_encoding – Telnyx outbound media encoding.
- outbound_encoding: str | None
- class pipecat.runner.types.ExotelCallData(*, stream_id: str | None = None, call_id: str | None = None, from_number: str | None = None, to: str | None = None, body: dict = <factory>, account_sid: str | None = None, custom_parameters: str | dict | None = None, **extra_data: Any)[source]
Bases:
CallDataExotel-specific parsed telephony handshake data.
- Parameters:
account_sid – Exotel account sid.
custom_parameters – Exotel custom parameters.
- account_sid: str | None
- custom_parameters: str | dict | None
- class pipecat.runner.types.RunnerArguments(*, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None)[source]
Bases:
objectBase class for runner session arguments.
- Parameters:
handle_sigint – Whether the bot should install a SIGINT handler.
handle_sigterm – Whether the bot should install a SIGTERM handler.
pipeline_idle_timeout_secs – Seconds the pipeline may stay idle before shutting down.
body – Optional request body data passed from the runner entry point.
call_data – Parsed telephony handshake as a
CallDatamodel — typed attribute access (call_data.to_number) that’s also dict-compatible (call_data["call_id"]). Populated bycreate_transport(or a directparse_telephony_websocketcall) for telephony connections;Noneotherwise. Lives on the base so any bot can readrunner_args.call_datauniformly, mirroringbody.session_id – Identifier for this bot session.
cli_args – Parsed CLI arguments from the runner, when launched via the development runner.
- handle_sigint: bool
- handle_sigterm: bool
- pipeline_idle_timeout_secs: int
- body: Any | None
- session_id: str | None = None
- cli_args: Namespace | None = None
- class pipecat.runner.types.DailyRunnerArguments(room_url: str, token: str | None = None, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None)[source]
Bases:
RunnerArgumentsDaily transport session arguments for the runner.
- Parameters:
room_url – Daily room URL to join
token – Authentication token for the room
body – Additional request data
- room_url: str
- token: str | None = None
- class pipecat.runner.types.VonageRunnerArguments(application_id: str, vonage_session_id: str, token: str, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None)[source]
Bases:
RunnerArgumentsVonage transport session arguments for the runner.
- Parameters:
application_id – Vonage application ID
vonage_session_id – Vonage session ID
token – Vonage Session Token
- application_id: str
- vonage_session_id: str
- token: str
- class pipecat.runner.types.WebSocketRunnerArguments(websocket: fastapi.WebSocket, transport_type: str | None = None, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None)[source]
Bases:
RunnerArgumentsWebSocket transport session arguments for the runner.
The parsed telephony handshake is available on the inherited
call_datafield (aCallDatamodel), populated bycreate_transport.- Parameters:
websocket – WebSocket connection for audio streaming
transport_type – Transport type identifier. Set to
"websocket"for plain WebSocket connections;Nonetriggers auto-detection from the first telephony provider message. After auto-detection,create_transportoverwrites this in place with the detected provider (e.g."twilio").body – Additional request data
- websocket: fastapi.WebSocket
- transport_type: str | None = None
- class pipecat.runner.types.SmallWebRTCRunnerArguments(webrtc_connection: Any, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None)[source]
Bases:
RunnerArgumentsSmall WebRTC transport session arguments for the runner.
- Parameters:
webrtc_connection – Pre-configured WebRTC peer connection
- webrtc_connection: Any
- class pipecat.runner.types.LiveKitRunnerArguments(room_name: str, url: str, token: str, *, body: Any | None = <factory>, call_data: CallData | None = None, session_id: str | None = None)[source]
Bases:
RunnerArgumentsLiveKit transport session arguments for the runner.
- Parameters:
room_name – LiveKit room name to join
token – Authentication token for the room
body – Additional request data
- room_name: str
- url: str
- token: str