Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python OutboundSipTrunkConfigRequestModel

From Leeroopedia
Attribute Value
Page Type Implementation
Language Python
SDK elevenlabs
Class OutboundSipTrunkConfigRequestModel
Source File src/elevenlabs/types/outbound_sip_trunk_config_request_model.py
Auto-Generated Yes (Fern API Definition)

Overview

Description

OutboundSipTrunkConfigRequestModel is a Pydantic model representing the configuration request for an outbound SIP trunk. It specifies the destination address, transport protocol, media encryption mode, custom SIP headers, and optional digest authentication credentials for outbound SIP calls.

Usage

This model is used when configuring the outbound leg of a SIP trunk phone number. It defines where SIP INVITE requests are sent, which transport protocol to use, whether media should be encrypted, and any custom headers or authentication credentials required by the remote SIP server.

Code Reference

Source Location

src/elevenlabs/types/outbound_sip_trunk_config_request_model.py

Class Signature

class OutboundSipTrunkConfigRequestModel(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import OutboundSipTrunkConfigRequestModel

I/O Contract

Field Name Type Required Description
address str Yes Hostname or IP the SIP INVITE is sent to.
transport typing.Optional[SipTrunkTransportEnum] No Protocol to use for SIP transport (signalling layer).
media_encryption typing.Optional[SipMediaEncryptionEnum] No Whether or not to encrypt media (data layer).
headers typing.Optional[typing.Dict[str, str]] No SIP X-* headers for INVITE request. These headers are sent as-is and may help identify this call.
credentials typing.Optional[SipTrunkCredentialsRequestModel] No Optional digest authentication credentials (username/password). If not provided, ACL authentication is assumed.

Model Configuration:

  • Frozen (immutable) model
  • Allows extra fields
  • Supports both Pydantic v1 and v2

Usage Examples

Basic outbound configuration

from elevenlabs.types import OutboundSipTrunkConfigRequestModel

config = OutboundSipTrunkConfigRequestModel(
    address="sip.provider.com",
)

Full outbound configuration with headers and credentials

from elevenlabs.types import (
    OutboundSipTrunkConfigRequestModel,
    SipTrunkCredentialsRequestModel,
)

config = OutboundSipTrunkConfigRequestModel(
    address="sip.provider.com:5060",
    transport="udp",
    media_encryption="srtp",
    headers={
        "X-Custom-Header": "my-value",
        "X-Account-Id": "12345",
    },
    credentials=SipTrunkCredentialsRequestModel(
        username="sip_user",
        password="sip_password",
    ),
)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment