Managing Voice Connections via Confident AI SDK
Overview
The Confident AI SDK exposes every Voice Connection method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Methods
List Voice Connections
Lists the voice connections in your Confident AI project one page at a time, ordered by name. Requires the Starter plan or above.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.voice_connections.list(page=1, page_size=25)For async mode, call a_list and await it as shown below:
result = await client.voice_connections.a_list(...)Parameters
| Parameter | Type | Description |
|---|---|---|
page | Optional[int] | The page to return. Defaults to 1. |
page_size | Optional[int] | The number of results per page, at most 100. Defaults to 25. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.list(1, 25);Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | The page to return. Defaults to 1. |
pageSize | number | The number of results per page, at most 100. Defaults to 25. |
Returns
This method returns an object of type VoiceConnectionList.
Create Voice Connection
Registers a voice agent Confident AI can call during simulations and returns it. The connection starts unverified; place a test call to verify it. Requires the Starter plan or above.
from confident_ai import ConfidentAI
from confident_ai.voice_connections import (
PhoneVoiceConfig,
SipCredentials,
VoiceCallSettingsInput,
)
client = ConfidentAI()
result = client.voice_connections.create(
name="Support line",
config=PhoneVoiceConfig(
transport="PHONE",
phone_number="+14155550100",
carrier="CONFIDENT",
trunk_uri="sip:outbound@trunk.example.com",
trunk_credentials=SipCredentials(
username="confident",
password="YOUR-SIP-PASSWORD"
),
caller_id="+14155550199"
),
call_settings=VoiceCallSettingsInput(
max_concurrent_calls=1,
ring_timeout_s=45,
max_call_duration_s=1800,
silence_timeout_s=30,
record_calls=True
),
)For async mode, call a_create and await it as shown below:
result = await client.voice_connections.a_create(...)Parameters
| Parameter | Type | Description |
|---|---|---|
name | str | Required. A name for the voice connection, unique within the project. |
config | VoiceTransportConfig | Required. See VoiceTransportConfig. |
call_settings | Optional[VoiceCallSettingsInput] | See VoiceCallSettingsInput. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.create(
"Support line",
{
transport: "PHONE",
phoneNumber: "+14155550100",
carrier: "CONFIDENT",
trunkUri: "sip:outbound@trunk.example.com",
trunkCredentials: {
username: "confident",
password: "YOUR-SIP-PASSWORD"
},
callerId: "+14155550199"
},
{
maxConcurrentCalls: 1,
ringTimeoutS: 45,
maxCallDurationS: 1800,
silenceTimeoutS: 30,
recordCalls: true
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Required. A name for the voice connection, unique within the project. |
config | VoiceTransportConfig | Required. See VoiceTransportConfig. |
callSettings | VoiceCallSettingsInput | See VoiceCallSettingsInput. |
Returns
This method returns an object of type VoiceConnection.
Get Voice Connection
Retrieves a voice connection by id with its full configuration. Stored credentials are returned as saved, so treat the response as carrying secrets.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.voice_connections.get(
voice_connection_id="<VOICE-CONNECTION-ID>",
)For async mode, call a_get and await it as shown below:
result = await client.voice_connections.a_get(...)Parameters
| Parameter | Type | Description |
|---|---|---|
voice_connection_id | str | Required. The id of the voice connection. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.get("<VOICE-CONNECTION-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
voiceConnectionId | string | Required. The id of the voice connection. |
Returns
This method returns an object of type VoiceConnection.
Update Voice Connection
Changes a voice connection and returns it. Only the fields you send are touched. Sending config replaces it whole and marks the connection unverified until its next test call.
from confident_ai import ConfidentAI
from confident_ai.voice_connections import (
PhoneVoiceConfig,
SipCredentials,
VoiceCallSettingsInput,
)
client = ConfidentAI()
result = client.voice_connections.update(
voice_connection_id="<VOICE-CONNECTION-ID>",
name="Support line",
config=PhoneVoiceConfig(
transport="PHONE",
phone_number="+14155550100",
carrier="CONFIDENT",
trunk_uri="sip:outbound@trunk.example.com",
trunk_credentials=SipCredentials(
username="confident",
password="YOUR-SIP-PASSWORD"
),
caller_id="+14155550199"
),
call_settings=VoiceCallSettingsInput(
max_concurrent_calls=1,
ring_timeout_s=45,
max_call_duration_s=1800,
silence_timeout_s=30,
record_calls=True
),
)For async mode, call a_update and await it as shown below:
result = await client.voice_connections.a_update(...)Parameters
| Parameter | Type | Description |
|---|---|---|
voice_connection_id | str | Required. The id of the voice connection. |
name | Optional[str] | A new name, unique within the project. |
config | Optional[VoiceTransportConfig] | See VoiceTransportConfig. |
call_settings | Optional[VoiceCallSettingsInput] | See VoiceCallSettingsInput. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.update(
"<VOICE-CONNECTION-ID>",
{
name: "Support line",
config: {
transport: "PHONE",
phoneNumber: "+14155550100",
carrier: "CONFIDENT",
trunkUri: "sip:outbound@trunk.example.com",
trunkCredentials: {
username: "confident",
password: "YOUR-SIP-PASSWORD"
},
callerId: "+14155550199"
},
callSettings: {
maxConcurrentCalls: 1,
ringTimeoutS: 45,
maxCallDurationS: 1800,
silenceTimeoutS: 30,
recordCalls: true
}
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
voiceConnectionId | string | Required. The id of the voice connection. |
name | string | A new name, unique within the project. |
config | VoiceTransportConfig | See VoiceTransportConfig. |
callSettings | VoiceCallSettingsInput | See VoiceCallSettingsInput. |
Returns
This method returns an object of type VoiceConnection.
Delete Voice Connection
Permanently deletes a voice connection. Dataset schedules that call it stop running, and past test runs and call logs keep their results.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.voice_connections.delete(
voice_connection_id="<VOICE-CONNECTION-ID>",
)For async mode, call a_delete and await it as shown below:
result = await client.voice_connections.a_delete(...)Parameters
| Parameter | Type | Description |
|---|---|---|
voice_connection_id | str | Required. The id of the voice connection. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.delete(
"<VOICE-CONNECTION-ID>",
);Parameters
| Parameter | Type | Description |
|---|---|---|
voiceConnectionId | string | Required. The id of the voice connection. |
Returns
This method returns an object of type VoiceConnectionRef.
Place Voice Call
Places a test call to a voice connection, listens for its greeting, and returns the log of how the call went. The connection is marked verified when the agent answers and unverified otherwise. The request stays open for the length of the call.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.voice_connections.place_voice_call(
voice_connection_id="<VOICE-CONNECTION-ID>",
)For async mode, call a_place_voice_call and await it as shown below:
result = await client.voice_connections.a_place_voice_call(...)Parameters
| Parameter | Type | Description |
|---|---|---|
voice_connection_id | str | Required. The id of the voice connection. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.placeVoiceCall(
"<VOICE-CONNECTION-ID>",
);Parameters
| Parameter | Type | Description |
|---|---|---|
voiceConnectionId | string | Required. The id of the voice connection. |
Returns
This method returns an object of type VoiceConnectionLog.
List Logs
Lists every call placed to a voice connection, newest first: test calls and calls made while evaluating datasets.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.voice_connections.list_logs(
voice_connection_id="<VOICE-CONNECTION-ID>",
page_size=25,
cursor="<NEXT-CURSOR>",
)For async mode, call a_list_logs and await it as shown below:
result = await client.voice_connections.a_list_logs(...)Parameters
| Parameter | Type | Description |
|---|---|---|
voice_connection_id | str | Required. The id of the voice connection. |
page_size | Optional[int] | The number of logs per page, at most 100. Defaults to 25. |
cursor | Optional[str] | This is used for pagination, and should be set to the nextCursor value returned in the previous response to get the next page of results. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.voiceConnections.listLogs(
"<VOICE-CONNECTION-ID>",
25,
"<NEXT-CURSOR>",
);Parameters
| Parameter | Type | Description |
|---|---|---|
voiceConnectionId | string | Required. The id of the voice connection. |
pageSize | number | The number of logs per page, at most 100. Defaults to 25. |
cursor | string | This is used for pagination, and should be set to the nextCursor value returned in the previous response to get the next page of results. |
Returns
This method returns an object of type VoiceConnectionLogList.
Types
SipCredentials
Digest credentials used to authenticate a SIP call.
class SipCredentials:
username: str
password: strusernamestrRequired
The SIP digest username.
Example: "confident"
passwordstrRequired
The SIP digest password.
Example: "YOUR-SIP-PASSWORD"
interface SipCredentials {
username: string;
password: string;
}usernamestringRequired
The SIP digest username.
Example: "confident"
passwordstringRequired
The SIP digest password.
Example: "YOUR-SIP-PASSWORD"
VoiceCallSettings
Limits applied to every call placed to your agent.
class VoiceCallSettings:
max_concurrent_calls: int = Field(alias="maxConcurrentCalls")
ring_timeout_s: int = Field(alias="ringTimeoutS")
max_call_duration_s: int = Field(alias="maxCallDurationS")
silence_timeout_s: Optional[int] = Field(alias="silenceTimeoutS")
record_calls: bool = Field(alias="recordCalls")max_concurrent_callsintRequired
The most calls placed to your agent at once.
Example: 1
ring_timeout_sintRequired
Seconds to wait for your agent to answer, for PHONE and SIP.
Example: 45
max_call_duration_sintRequired
Seconds after which a call is hung up.
Example: 1800
silence_timeout_sOptional[int]Required
Seconds of silence from both sides after which a call is hung up, or null to never hang up for silence.
Example: 30
record_callsboolRequired
Whether simulated calls are recorded.
Example: true
interface VoiceCallSettings {
maxConcurrentCalls: number;
ringTimeoutS: number;
maxCallDurationS: number;
silenceTimeoutS: number | null;
recordCalls: boolean;
}maxConcurrentCallsnumberRequired
The most calls placed to your agent at once.
Example: 1
ringTimeoutSnumberRequired
Seconds to wait for your agent to answer, for PHONE and SIP.
Example: 45
maxCallDurationSnumberRequired
Seconds after which a call is hung up.
Example: 1800
silenceTimeoutSnumber | nullRequired
Seconds of silence from both sides after which a call is hung up, or null to never hang up for silence.
Example: 30
recordCallsbooleanRequired
Whether simulated calls are recorded.
Example: true
VoiceCallSettingsInput
The call limits to set. Omitted settings keep their value.
class VoiceCallSettingsInput:
max_concurrent_calls: Optional[int] = Field(default=None, alias="maxConcurrentCalls")
ring_timeout_s: Optional[int] = Field(default=None, alias="ringTimeoutS")
max_call_duration_s: Optional[int] = Field(default=None, alias="maxCallDurationS")
silence_timeout_s: Optional[int] = Field(default=None, alias="silenceTimeoutS")
record_calls: Optional[bool] = Field(default=None, alias="recordCalls")max_concurrent_callsOptional[int]
The most calls placed to your agent at once.
Example: 1
ring_timeout_sOptional[int]
Seconds to wait for your agent to answer, for PHONE and SIP.
Example: 45
max_call_duration_sOptional[int]
Seconds after which a call is hung up.
Example: 1800
silence_timeout_sOptional[int]
Seconds of silence from both sides after which a call is hung up, or null to never hang up for silence.
Example: 30
record_callsOptional[bool]
Whether simulated calls are recorded.
Example: true
interface VoiceCallSettingsInput {
maxConcurrentCalls?: number;
ringTimeoutS?: number;
maxCallDurationS?: number;
silenceTimeoutS?: number | null;
recordCalls?: boolean;
}maxConcurrentCallsnumber
The most calls placed to your agent at once.
Example: 1
ringTimeoutSnumber
Seconds to wait for your agent to answer, for PHONE and SIP.
Example: 45
maxCallDurationSnumber
Seconds after which a call is hung up.
Example: 1800
silenceTimeoutSnumber | null
Seconds of silence from both sides after which a call is hung up, or null to never hang up for silence.
Example: 30
recordCallsboolean
Whether simulated calls are recorded.
Example: true
VoiceConnection
A voice agent Confident AI calls during simulations. Stored credentials are returned as saved, so treat the response as carrying secrets.
class VoiceConnection:
id: str
project_id: str = Field(alias="projectId")
name: str
active: bool
config: VoiceTransportConfig
call_settings: VoiceCallSettings = Field(alias="callSettings")
created_at: str = Field(alias="createdAt")
updated_at: str = Field(alias="updatedAt")idstrRequired
The id of the voice connection, generated by Confident AI.
Example: "<VOICE-CONNECTION-ID>"
project_idstrRequired
The id of the project the connection belongs to.
Example: "<PROJECT-ID>"
namestrRequired
The name of the voice connection.
Example: "Support line"
activeboolRequired
Whether the last test call reached your agent. Changing config resets it to false.
Example: true
configVoiceTransportConfigRequired
See VoiceTransportConfig.
call_settingsVoiceCallSettingsRequired
See VoiceCallSettings.
created_atstrRequired
When the connection was created, as an ISO 8601 timestamp.
Example: "2026-10-01T09:12:00+00:00"
updated_atstrRequired
When the connection last changed, as an ISO 8601 timestamp.
Example: "2026-10-08T16:40:00+00:00"
interface VoiceConnection {
id: string;
projectId: string;
name: string;
active: boolean;
config: VoiceTransportConfig;
callSettings: VoiceCallSettings;
createdAt: string;
updatedAt: string;
}idstringRequired
The id of the voice connection, generated by Confident AI.
Example: "<VOICE-CONNECTION-ID>"
projectIdstringRequired
The id of the project the connection belongs to.
Example: "<PROJECT-ID>"
namestringRequired
The name of the voice connection.
Example: "Support line"
activebooleanRequired
Whether the last test call reached your agent. Changing config resets it to false.
Example: true
configVoiceTransportConfigRequired
See VoiceTransportConfig.
callSettingsVoiceCallSettingsRequired
See VoiceCallSettings.
createdAtstringRequired
When the connection was created, as an ISO 8601 timestamp.
Example: "2026-10-01T09:12:00+00:00"
updatedAtstringRequired
When the connection last changed, as an ISO 8601 timestamp.
Example: "2026-10-08T16:40:00+00:00"
VoiceConnectionList
One page of voice connections, with the total across all pages.
class VoiceConnectionList:
voice_connections: List[VoiceConnection] = Field(alias="voiceConnections")
total_voice_connections: int = Field(alias="totalVoiceConnections")
page: int
page_size: int = Field(alias="pageSize")voice_connectionsList[VoiceConnection]Required
The voice connections for the current page, ordered by name.
See VoiceConnection.
total_voice_connectionsintRequired
The total number of voice connections in this project.
Example: 2
pageintRequired
The page this response covers.
Example: 1
page_sizeintRequired
The number of voice connections per page.
Example: 25
interface VoiceConnectionList {
voiceConnections: VoiceConnection[];
totalVoiceConnections: number;
page: number;
pageSize: number;
}voiceConnectionsVoiceConnection[]Required
The voice connections for the current page, ordered by name.
See VoiceConnection.
totalVoiceConnectionsnumberRequired
The total number of voice connections in this project.
Example: 2
pagenumberRequired
The page this response covers.
Example: 1
pageSizenumberRequired
The number of voice connections per page.
Example: 25
VoiceConnectionLog
A call placed to a voice connection.
class VoiceConnectionLog:
id: str
created_at: str = Field(alias="createdAt")
voice_connection_id: str = Field(alias="voiceConnectionId")
voice_connection_name: str = Field(alias="voiceConnectionName")
source: Literal["ping", "dataset_evaluation"]
source_name: str = Field(alias="sourceName")
test_run_id: Optional[str] = Field(alias="testRunId")
transport: VoiceTransport
address: str
status: Literal["ANSWERED", "NO_ANSWER", "FAILED"]
connect_ms: Optional[float] = Field(alias="connectMs")
duration_ms: float = Field(alias="durationMs")
transcript: Optional[str]
error: Optional[str]
audio_url: Optional[str] = Field(alias="audioUrl")idstrRequired
The id of the log.
Example: "<VOICE-CONNECTION-LOG-ID>"
created_atstrRequired
When the call started, as an ISO 8601 timestamp.
Example: "2026-10-08T16:40:00+00:00"
voice_connection_idstrRequired
The id of the voice connection that was called.
Example: "<VOICE-CONNECTION-ID>"
voice_connection_namestrRequired
The name of the voice connection when the call was placed.
Example: "Support line"
sourceLiteral["ping", "dataset_evaluation"]Required
What placed the call: ping for a test call, dataset_evaluation for a call made while evaluating a dataset.
source_namestrRequired
The alias of the dataset that was evaluated, or an empty string for test calls.
Example: "support-goldens"
test_run_idOptional[str]Required
The id of the test run the call belongs to, or null for test calls.
transportVoiceTransportRequired
See VoiceTransport.
addressstrRequired
The number, sip: address or URL that was called.
Example: "+14155550100"
statusLiteral["ANSWERED", "NO_ANSWER", "FAILED"]Required
How the call ended: ANSWERED when your agent picked up, NO_ANSWER when nobody picked up in time, FAILED when the call could not be placed.
connect_msOptional[float]Required
Milliseconds until your agent answered or the stream opened, or null when it never did.
Example: 3200
duration_msfloatRequired
How long the call lasted, in milliseconds.
Example: 9400
transcriptOptional[str]Required
For test calls, what your agent said first. Null when nothing was transcribed.
Example: "Hi, thanks for calling. How can I help?"
errorOptional[str]Required
Why the call did not connect, or null when it did.
audio_urlOptional[str]Required
A signed URL to the call audio, valid for one hour: the greeting for test calls and the full recording for evaluation calls. Null when no audio was recorded.
interface VoiceConnectionLog {
id: string;
createdAt: string;
voiceConnectionId: string;
voiceConnectionName: string;
source: "ping" | "dataset_evaluation";
sourceName: string;
testRunId: string | null;
transport: VoiceTransport;
address: string;
status: "ANSWERED" | "NO_ANSWER" | "FAILED";
connectMs: number | null;
durationMs: number;
transcript: string | null;
error: string | null;
audioUrl: string | null;
}idstringRequired
The id of the log.
Example: "<VOICE-CONNECTION-LOG-ID>"
createdAtstringRequired
When the call started, as an ISO 8601 timestamp.
Example: "2026-10-08T16:40:00+00:00"
voiceConnectionIdstringRequired
The id of the voice connection that was called.
Example: "<VOICE-CONNECTION-ID>"
voiceConnectionNamestringRequired
The name of the voice connection when the call was placed.
Example: "Support line"
source"ping" | "dataset_evaluation"Required
What placed the call: ping for a test call, dataset_evaluation for a call made while evaluating a dataset.
sourceNamestringRequired
The alias of the dataset that was evaluated, or an empty string for test calls.
Example: "support-goldens"
testRunIdstring | nullRequired
The id of the test run the call belongs to, or null for test calls.
transportVoiceTransportRequired
See VoiceTransport.
addressstringRequired
The number, sip: address or URL that was called.
Example: "+14155550100"
status"ANSWERED" | "NO_ANSWER" | "FAILED"Required
How the call ended: ANSWERED when your agent picked up, NO_ANSWER when nobody picked up in time, FAILED when the call could not be placed.
connectMsnumber | nullRequired
Milliseconds until your agent answered or the stream opened, or null when it never did.
Example: 3200
durationMsnumberRequired
How long the call lasted, in milliseconds.
Example: 9400
transcriptstring | nullRequired
For test calls, what your agent said first. Null when nothing was transcribed.
Example: "Hi, thanks for calling. How can I help?"
errorstring | nullRequired
Why the call did not connect, or null when it did.
audioUrlstring | nullRequired
A signed URL to the call audio, valid for one hour: the greeting for test calls and the full recording for evaluation calls. Null when no audio was recorded.
VoiceConnectionLogList
The calls placed to a voice connection, newest first.
class VoiceConnectionLogList:
voice_connection_logs: List[VoiceConnectionLog] = Field(alias="voiceConnectionLogs")
next_cursor: Optional[str] = Field(alias="nextCursor")voice_connection_logsList[VoiceConnectionLog]Required
The calls on this page, newest first.
See VoiceConnectionLog.
next_cursorOptional[str]Required
The value to pass as cursor to get the next page, or null when this is the last page.
interface VoiceConnectionLogList {
voiceConnectionLogs: VoiceConnectionLog[];
nextCursor: string | null;
}voiceConnectionLogsVoiceConnectionLog[]Required
The calls on this page, newest first.
See VoiceConnectionLog.
nextCursorstring | nullRequired
The value to pass as cursor to get the next page, or null when this is the last page.
VoiceConnectionRef
A reference to a voice connection by its id.
class VoiceConnectionRef:
id: stridstrRequired
The id of the voice connection, generated by Confident AI.
Example: "<VOICE-CONNECTION-ID>"
interface VoiceConnectionRef {
id: string;
}idstringRequired
The id of the voice connection, generated by Confident AI.
Example: "<VOICE-CONNECTION-ID>"
VoiceHeader
A header sent to your voice agent.
class VoiceHeader:
key: str
value: strkeystrRequired
The header name.
Example: "X-Agent"
valuestrRequired
The header value.
Example: "support"
interface VoiceHeader {
key: string;
value: string;
}keystringRequired
The header name.
Example: "X-Agent"
valuestringRequired
The header value.
Example: "support"
VoiceTransport
How Confident AI reaches your voice agent: PHONE dials a phone number, SIP calls a SIP address directly, and WEBRTC joins a WebRTC session.
class VoiceTransport(Enum):
PHONE = "PHONE"
SIP = "SIP"
WEBRTC = "WEBRTC"enum VoiceTransport {
PHONE = "PHONE",
SIP = "SIP",
WEBRTC = "WEBRTC",
}PHONE · SIP · WEBRTC
VoiceTransportConfig
How Confident AI reaches your voice agent. transport decides which shape applies.
VoiceTransportConfig = Union[
PhoneVoiceConfig,
SipVoiceConfig,
WebRTCVoiceConfig,
]type VoiceTransportConfig =
| PhoneVoiceConfig
| SipVoiceConfig
| WebRTCVoiceConfig;A VoiceTransportConfig is one of the shapes below. Send the fields of one of them, never a mix of both.
Dials your agent over the phone network.
class PhoneVoiceConfig:
transport: Literal["PHONE"]
phone_number: str = Field(alias="phoneNumber")
carrier: Literal["CONFIDENT", "CUSTOM_TRUNK"]
trunk_uri: str = Field(alias="trunkUri")
trunk_credentials: Optional[SipCredentials] = Field(alias="trunkCredentials")
caller_id: str = Field(alias="callerId")transportLiteral["PHONE"]Required
phone_numberstrRequired
The E.164 phone number to dial.
Example: "+14155550100"
carrierLiteral["CONFIDENT", "CUSTOM_TRUNK"]Required
Who carries the call to the phone network: CONFIDENT uses Confident AI's own trunk, CUSTOM_TRUNK uses yours.
trunk_uristrRequired
The sip: address of your outbound trunk. Required when carrier is CUSTOM_TRUNK.
Example: "sip:outbound@trunk.example.com"
trunk_credentialsOptional[SipCredentials]Required
Credentials for your outbound trunk, or null when it needs none.
See SipCredentials.
caller_idstrRequired
The number or sip: address presented to your agent as the caller. Leave it empty to use the default.
Example: "+14155550199"
interface PhoneVoiceConfig {
transport: "PHONE";
phoneNumber: string;
carrier: "CONFIDENT" | "CUSTOM_TRUNK";
trunkUri: string;
trunkCredentials: SipCredentials | null;
callerId: string;
}transport"PHONE"Required
phoneNumberstringRequired
The E.164 phone number to dial.
Example: "+14155550100"
carrier"CONFIDENT" | "CUSTOM_TRUNK"Required
Who carries the call to the phone network: CONFIDENT uses Confident AI's own trunk, CUSTOM_TRUNK uses yours.
trunkUristringRequired
The sip: address of your outbound trunk. Required when carrier is CUSTOM_TRUNK.
Example: "sip:outbound@trunk.example.com"
trunkCredentialsSipCredentials | nullRequired
Credentials for your outbound trunk, or null when it needs none.
See SipCredentials.
callerIdstringRequired
The number or sip: address presented to your agent as the caller. Leave it empty to use the default.
Example: "+14155550199"
Calls your agent's SIP address directly.
class SipVoiceConfig:
transport: Literal["SIP"]
sip_uri: str = Field(alias="sipUri")
signaling_transport: Literal["UDP", "TCP", "TLS"] = Field(alias="signalingTransport")
credentials: Optional[SipCredentials]
caller_id: str = Field(alias="callerId")
headers: List[VoiceHeader]transportLiteral["SIP"]Required
sip_uristrRequired
The sip: address of your agent.
Example: "sip:agent@sip.example.com"
signaling_transportLiteral["UDP", "TCP", "TLS"]Required
The transport used for SIP signaling. A ;transport= parameter on sipUri takes precedence.
credentialsOptional[SipCredentials]Required
Credentials for your SIP endpoint, or null when it needs none.
See SipCredentials.
caller_idstrRequired
The number or sip: address presented to your agent as the caller. Leave it empty to use the default.
Example: "+14155550199"
headersList[VoiceHeader]Required
Extra X- headers sent on the INVITE, for routing on your side.
See VoiceHeader.
interface SipVoiceConfig {
transport: "SIP";
sipUri: string;
signalingTransport: "UDP" | "TCP" | "TLS";
credentials: SipCredentials | null;
callerId: string;
headers: VoiceHeader[];
}transport"SIP"Required
sipUristringRequired
The sip: address of your agent.
Example: "sip:agent@sip.example.com"
signalingTransport"UDP" | "TCP" | "TLS"Required
The transport used for SIP signaling. A ;transport= parameter on sipUri takes precedence.
credentialsSipCredentials | nullRequired
Credentials for your SIP endpoint, or null when it needs none.
See SipCredentials.
callerIdstringRequired
The number or sip: address presented to your agent as the caller. Leave it empty to use the default.
Example: "+14155550199"
headersVoiceHeader[]Required
Extra X- headers sent on the INVITE, for routing on your side.
See VoiceHeader.
Joins a WebRTC session with your agent.
class WebRTCVoiceConfig:
transport: Literal["WEBRTC"]
provider: Literal["LIVEKIT", "CUSTOM", "PIPECAT"]
url: str
livekit: WebRTCVoiceConfigLivekit
pipecat: WebRTCVoiceConfigPipecat
headers: List[VoiceHeader]transportLiteral["WEBRTC"]Required
providerLiteral["LIVEKIT", "CUSTOM", "PIPECAT"]Required
Where your agent runs: LIVEKIT joins a LiveKit room, PIPECAT starts a Pipecat session, and CUSTOM posts an SDP offer to your own signaling URL.
urlstrRequired
The LiveKit server URL (wss://), the Pipecat start URL (https://), or your signaling URL (wss:// or https://).
Example: "wss://your-project.livekit.cloud"
livekitWebRTCVoiceConfigLivekitRequired
LiveKit settings, read when provider is LIVEKIT.
pipecatWebRTCVoiceConfigPipecatRequired
Pipecat settings, read when provider is PIPECAT.
headersList[VoiceHeader]Required
Headers sent to your signaling URL, read when provider is CUSTOM or PIPECAT.
See VoiceHeader.
interface WebRTCVoiceConfig {
transport: "WEBRTC";
provider: "LIVEKIT" | "CUSTOM" | "PIPECAT";
url: string;
livekit: WebRTCVoiceConfigLivekit;
pipecat: WebRTCVoiceConfigPipecat;
headers: VoiceHeader[];
}transport"WEBRTC"Required
provider"LIVEKIT" | "CUSTOM" | "PIPECAT"Required
Where your agent runs: LIVEKIT joins a LiveKit room, PIPECAT starts a Pipecat session, and CUSTOM posts an SDP offer to your own signaling URL.
urlstringRequired
The LiveKit server URL (wss://), the Pipecat start URL (https://), or your signaling URL (wss:// or https://).
Example: "wss://your-project.livekit.cloud"
livekitWebRTCVoiceConfigLivekitRequired
LiveKit settings, read when provider is LIVEKIT.
pipecatWebRTCVoiceConfigPipecatRequired
Pipecat settings, read when provider is PIPECAT.
headersVoiceHeader[]Required
Headers sent to your signaling URL, read when provider is CUSTOM or PIPECAT.
See VoiceHeader.
Last updated on