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 GetPhoneNumberInboundSipTrunkConfigResponseModel

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

Overview

Description

GetPhoneNumberInboundSipTrunkConfigResponseModel is a Pydantic model representing the response configuration for an inbound SIP trunk associated with a phone number. It encapsulates details about allowed addresses, allowed phone numbers, media encryption settings, authentication credentials, username, and remote domains used for TLS certificate validation.

Usage

This model is returned by the ElevenLabs API when querying the inbound SIP trunk configuration for a specific phone number. It provides read-only access to the trunk's security and routing settings, including IP-based access control lists, phone number allow-lists, media encryption mode, and authentication state.

Code Reference

Source Location

src/elevenlabs/types/get_phone_number_inbound_sip_trunk_config_response_model.py

Class Signature

class GetPhoneNumberInboundSipTrunkConfigResponseModel(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import GetPhoneNumberInboundSipTrunkConfigResponseModel

I/O Contract

Field Name Type Required Description
allowed_addresses typing.List[str] Yes List of IP addresses that are allowed to use the trunk. Each item can be an individual IP address or a CIDR block notation.
allowed_numbers typing.Optional[typing.List[str]] No List of phone numbers that are allowed to use the trunk.
media_encryption SipMediaEncryptionEnum Yes The media encryption setting for the SIP trunk.
has_auth_credentials bool Yes Whether authentication credentials are configured.
username typing.Optional[str] No SIP trunk username (if available).
remote_domains typing.Optional[typing.List[str]] No Domains of remote SIP servers used to validate TLS certificates.

Model Configuration:

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

Usage Examples

Accessing response fields

from elevenlabs.types import GetPhoneNumberInboundSipTrunkConfigResponseModel

# After receiving the response from the API
response: GetPhoneNumberInboundSipTrunkConfigResponseModel = ...

# Access allowed IP addresses
for address in response.allowed_addresses:
    print(f"Allowed address: {address}")

# Check authentication status
if response.has_auth_credentials:
    print(f"Username: {response.username}")

# Check media encryption setting
print(f"Media encryption: {response.media_encryption}")

# Access optional remote domains
if response.remote_domains:
    for domain in response.remote_domains:
        print(f"Remote domain: {domain}")

Constructing the model directly

from elevenlabs.types import GetPhoneNumberInboundSipTrunkConfigResponseModel

config = GetPhoneNumberInboundSipTrunkConfigResponseModel(
    allowed_addresses=["192.168.1.0/24", "10.0.0.1"],
    allowed_numbers=["+15551234567"],
    media_encryption="srtp",
    has_auth_credentials=True,
    username="sip_user",
    remote_domains=["sip.example.com"],
)

Related Pages

Page Connections

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