Introducing Confident Monitor

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

ParameterTypeDescription
pageOptional[int]The page to return. Defaults to 1.
page_sizeOptional[int]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

ParameterTypeDescription
namestrRequired. A name for the voice connection, unique within the project.
configVoiceTransportConfigRequired. See VoiceTransportConfig.
call_settingsOptional[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

ParameterTypeDescription
voice_connection_idstrRequired. 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

ParameterTypeDescription
voice_connection_idstrRequired. The id of the voice connection.
nameOptional[str]A new name, unique within the project.
configOptional[VoiceTransportConfig]See VoiceTransportConfig.
call_settingsOptional[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

ParameterTypeDescription
voice_connection_idstrRequired. 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

ParameterTypeDescription
voice_connection_idstrRequired. 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

ParameterTypeDescription
voice_connection_idstrRequired. The id of the voice connection.
page_sizeOptional[int]The number of logs per page, at most 100. Defaults to 25.
cursorOptional[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.

Returns

This method returns an object of type VoiceConnectionLogList.

Types

SipCredentials

Digest credentials used to authenticate a SIP call.

class SipCredentials:
    username: str
    password: str

usernamestrRequired

The SIP digest username.

Example: "confident"

passwordstrRequired

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

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

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

call_settingsVoiceCallSettingsRequired

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"

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

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

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.

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.

VoiceConnectionRef

A reference to a voice connection by its id.

class VoiceConnectionRef:
    id: str

idstrRequired

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: str

keystrRequired

The header name.

Example: "X-Agent"

valuestrRequired

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"

PHONE · SIP · WEBRTC

VoiceTransportConfig

How Confident AI reaches your voice agent. transport decides which shape applies.

VoiceTransportConfig = Union[
    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"

Building a production pipeline?Design a scalable API workflow for evals, datasets, traces, and promptsTalk to an engineer

Last updated on

Built byConfident AI