Skip to main content

Prerequisites

Before creating a trunk in Bolna, configure the following on your SIP trunk provider’s portal.

1. Whitelist Bolna’s IP Address

Bolna’s SIP media server IP is:
13.200.45.61
You must whitelist this IP on your SIP trunk so that Bolna’s outbound SIP INVITE and RTP packets are accepted. In most provider portals this is called an IP whitelist, allowed IP, trusted IP, or ACL. If you are using ip-based authentication, this is the IP you will add as your identifier — Bolna will be recognized solely by its source IP.

2. Set the Origination URL (for inbound calls)

If you want calls to your DID numbers to ring through to Bolna, point your SIP trunk’s origination URI to:
sip:13.200.45.61:5060
In your provider portal this is usually labeled as:
  • Origination URI or Origination URL
  • Inbound SIP URI
  • SIP Termination Point
  • Route to / Forward to
Set this for every DID number (or for the trunk as a whole, depending on your provider) that you intend to route to Bolna.
If your provider uses a domain-based origination URI rather than an IP, contact Bolna support for an alternative hostname.

3. Codec Configuration

Bolna’s SIP layer uses G.711 u-law (ulaw) audio by default. Ensure your trunk allows ulaw, or at minimum alaw, in its codec preferences. G.729 and other compressed codecs are not recommended.

4. Disable SRTP

SRTP (Secure RTP) is not currently supported by Bolna. Media is transmitted over standard (unencrypted) RTP. If your provider has SRTP enabled by default or as a mandatory setting, disable it before connecting the trunk to Bolna.

Create a SIP Trunk

Use the Create SIP Trunk API to register your trunk with Bolna.

Example — Username/Password Authentication

curl -X POST https://api.bolna.ai/sip-trunks/trunks \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Zadarma Production",
    "provider": "zadarma",
    "description": "Main Zadarma trunk for outbound sales",
    "auth_type": "userpass",
    "auth_username": "<your-sip-username>",
    "auth_password": "<your-sip-password>",
    "gateways": [
      {
        "gateway_address": "sip.zadarma.com",
        "port": 5060,
        "priority": 1
      }
    ],
    "allow": "ulaw,alaw",
    "disallow": "all",
    "inbound_enabled": true,
    "outbound_leading_plus_enabled": true
  }'

Example — IP-Based Authentication (e.g. Plivo Elastic SIP)

curl -X POST https://api.bolna.ai/sip-trunks/trunks \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Plivo Elastic Trunk",
    "provider": "plivo",
    "auth_type": "ip-based",
    "gateways": [
      {
        "gateway_address": "21467306465797919.zt.plivo.com",
        "port": 5060,
        "priority": 1
      }
    ],
    "ip_identifiers": [
      { "ip_address": "15.207.90.192/31" },
      { "ip_address": "204.89.151.128/27" },
      { "ip_address": "13.52.9.0/25" }
    ],
    "inbound_enabled": true
  }'
Save the id field from the response — this is your trunk ID used in all subsequent API requests.

Add Phone Numbers to Your Trunk

After creating a trunk, add your DID phone numbers using the Add Phone Number API.
curl -X POST https://api.bolna.ai/sip-trunks/trunks/01HQXYZ123ABC456DEF/numbers \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "919876543210",
    "name": "Mumbai Support Line"
  }'
Save the id field — this is the phone number ID used when setting up inbound call routing or making outbound calls.
Phone number format: Bolna stores the number exactly as provided. When matching inbound calls, the platform performs a flexible lookup that checks both the number with and without a + prefix. Use a consistent format across your trunk and inbound DID configuration.

Create Trunk field reference

FieldTypeRequiredDefaultDescription
namestringYesHuman-readable label. Must be unique per account.
providerstringYesSIP provider name (e.g. "twilio", "plivo", "zadarma", "telnyx", "vonage", "custom").
descriptionstringNonullOptional description for internal reference.
auth_typestringYes"userpass" or "ip-based".
auth_usernamestringConditionalnullRequired when auth_type is "userpass".
auth_passwordstringConditionalnullRequired when auth_type is "userpass".
gatewaysarrayYesAt least one gateway. Each has gateway_address (required), port (default 5060), priority (default 1).
ip_identifiersarrayConditional[]Required when auth_type is "ip-based". List of { "ip_address": "..." } objects.
allowstringNo"ulaw,alaw"Comma-separated codecs to allow. Always include ulaw.
disallowstringNo"all"Comma-separated codecs to disallow.
inbound_enabledbooleanNofalseSet true to receive inbound calls.
outbound_leading_plus_enabledbooleanNotruePrepend + to outbound dialed numbers.
transportstringNo"transport-udp"SIP transport protocol.
direct_mediabooleanNofalseSet up RTP directly between caller and callee. Keep false.
rtp_symmetricbooleanNotrueSymmetric RTP. Required for NAT.
force_rportbooleanNotrueForce responses to source port. Required for NAT.
ice_supportbooleanNotrueICE for media negotiation.
qualify_frequencyintegerNo60SIP OPTIONS ping interval in seconds. 0 to disable.
phone_numbersarrayNo[]Optional phone numbers to add at creation time.

Next steps