Skip to main content
PATCH
/
sip-trunks
/
trunks
/
{trunk_id}
cURL
curl --request PATCH \
  --url https://api.bolna.ai/sip-trunks/trunks/{trunk_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "auth_username": "<string>",
  "auth_password": "<string>",
  "gateways": [
    {
      "gateway_address": "sip.zadarma.com",
      "port": 5060,
      "priority": 1
    }
  ],
  "ip_identifiers": [
    {
      "ip_address": "15.207.90.192/31"
    }
  ],
  "allow": "<string>",
  "disallow": "<string>",
  "inbound_enabled": true,
  "outbound_leading_plus_enabled": true,
  "is_active": true,
  "qualify_frequency": 123,
  "media_encryption_optimistic": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "provider": "<string>",
  "description": "<string>",
  "auth_username": "<string>",
  "gateways": [
    {
      "gateway_address": "sip.zadarma.com",
      "port": 5060,
      "priority": 1
    }
  ],
  "ip_identifiers": [
    {
      "ip_address": "15.207.90.192/31"
    }
  ],
  "phone_numbers": [
    {
      "id": "<string>",
      "phone_number": "<string>",
      "name": "<string>",
      "byot_trunk_id": "<string>",
      "telephony_provider": "sip-trunk",
      "deleted": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "allow": "<string>",
  "disallow": "<string>",
  "direct_media": true,
  "rtp_symmetric": true,
  "force_rport": true,
  "media_encryption_optimistic": true,
  "qualify_frequency": 123,
  "inbound_enabled": true,
  "outbound_leading_plus_enabled": true,
  "is_active": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

SIP Trunking is currently in Beta.

Please reach out to us at enterprise@bolna.ai or schedule a call at https://www.bolna.ai/meet for more information and access.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trunk_id
string
required

The unique trunk ID

Body

application/json

Fields to update

Fields to update on an existing SIP trunk. Only provided fields are changed.

name
string

Updated human-readable trunk name.

description
string

Updated trunk description for internal reference.

auth_username
string

Updated SIP username (used only when the trunk uses userpass authentication).

auth_password
string

Updated SIP password (used only when the trunk uses userpass authentication).

gateways
object[]

Replaces existing gateways when provided.

ip_identifiers
object[]

Replaces existing IP identifiers when provided.

allow
string

Comma-separated codecs to allow (e.g., "ulaw,alaw").

disallow
string

Comma-separated codecs to disallow (typically "all").

inbound_enabled
boolean

Enable or disable inbound calling on this trunk.

outbound_leading_plus_enabled
boolean

Whether to prepend a leading + to outbound dialed numbers.

is_active
boolean

Activate or deactivate the trunk. When false, calls will not be placed.

qualify_frequency
integer

SIP OPTIONS ping interval in seconds. Use 0 to disable.

transport
enum<string>

SIP transport protocol.

Available options:
transport-udp,
transport-tcp,
transport-tls
media_encryption
enum<string>

RTP encryption. "sdes" requires transport=transport-tls.

Available options:
no,
sdes
media_encryption_optimistic
boolean

When media_encryption=sdes, fall back to clear RTP if the carrier does not offer crypto in its SDP.

Response

Updated SIP trunk

SIP trunk object returned by the API.

id
string

Unique SIP trunk identifier.

name
string

Human-readable trunk name.

provider
string

SIP provider name (e.g., twilio, plivo, zadarma, telnyx, vonage, custom).

description
string

Optional trunk description for internal reference.

auth_type
enum<string>

Authentication method used for this trunk.

Available options:
userpass,
ip-based
auth_username
string

SIP username (present only for userpass trunks).

gateways
object[]

Ordered list of SIP gateways used for registration and call routing.

ip_identifiers
object[]

IP ranges associated with this trunk (used only for ip-based authentication).

phone_numbers
object[]

Phone numbers (DIDs) registered on this trunk.

allow
string

Comma-separated codecs to allow.

disallow
string

Comma-separated codecs to disallow.

transport
enum<string>

SIP transport used by the trunk.

Available options:
transport-udp,
transport-tcp,
transport-tls
direct_media
boolean

Whether RTP is routed directly between endpoints (typically false).

rtp_symmetric
boolean

Enables symmetric RTP to handle NAT.

force_rport
boolean

Forces responses to the source port to handle NAT.

media_encryption
enum<string>

RTP encryption mode. "no" for plain RTP, "sdes" for SRTP via SDES (TLS trunks only).

Available options:
no,
sdes
media_encryption_optimistic
boolean

When media_encryption=sdes, whether to fall back to clear RTP if the carrier does not offer crypto.

qualify_frequency
integer

SIP OPTIONS ping interval in seconds.

inbound_enabled
boolean

Whether inbound calling is enabled.

outbound_leading_plus_enabled
boolean

Whether to prepend a leading + to outbound dialed numbers.

is_active
boolean

Whether the trunk is active.

created_at
string<date-time>

ISO timestamp when the trunk was created.

updated_at
string<date-time>

ISO timestamp when the trunk was last updated.