SIP Trunks

Create a SIP trunk

Creates a saved trunk. A trunk can be egress (outbound BYOC delivery to your SIP host), ingress (accept inbound calls from your PBX/SBC), or both — you must supply an egressHost and/or one or more allowedIps.

Requires a verified (KYC) account. Trunks beyond your plan's included count incur your plan's additional-trunk monthly fee: the first attempt returns 402 monthly_fee_confirmation_required; re-submit with confirmMonthlyFee: true to acknowledge the fee and create the trunk.

post/api/v1/trunks

Request

  • Base URL: https://api.callnode.io
  • URL: https://api.callnode.io/api/v1/trunks
  • Auth: API key in header X-Api-Key and API key in header X-Timestamp and API key in header X-Signature

Request body

namestring required
egressHoststring

Hostname or IP of your SIP endpoint. Setting it enables egress delivery. Must be a public host.

egressPortinteger

Defaults to 5060, or 5061 when egressTransport is tls.

egressTransport'udp' | 'tcp' | 'tls'
allowedIpsstring[]

Public IPv4 source IPs for ingress.

ingressEnabledboolean
registrationEnabledboolean

Create a registration trunk for a PBX with no static public IP: your PBX registers to CallNode over TLS instead of being allow-listed by address, and calls we place to you go to whatever contact it last registered from. The response carries sipPassword once.

defaultPhoneNumberIdstring

One of your numbers' ids — the default ingress agent.

outboundCliNumberIdstring

One of your numbers' ids — caller ID presented on termination calls when the From is not an owned number.

confirmMonthlyFeeboolean

Set true to acknowledge your plan's additional-trunk fee when you are beyond the included count.

Response

Trunk created.

idstring
namestring

1–64 characters. Unique across your active trunks.

status'active' | 'disabled'
egressEnabledboolean

Whether outbound (BYOC) delivery to egressHost is enabled.

egressHoststring nullable

Hostname or IP of your SIP endpoint for outbound delivery. Null for an ingress-only trunk.

egressPortinteger
egressTransport'udp' | 'tcp' | 'tls'
ingressEnabledboolean

Whether inbound calls from allowedIps are accepted.

allowedIpsstring[]

Public IPv4 addresses your PBX/SBC sends from — the accepted ingress source IPs.

defaultPhoneNumberIdstring nullable

The id of one of your numbers — the default agent for ingress calls that do not match one of your own DIDs.

outboundCliNumberIdstring nullable

The id of one of your numbers, presented as caller ID on outbound (termination) calls when the INVITE's From is not itself one of your numbers — the normal case for a registration trunk, whose From carries its auth username. A From that IS one of your live numbers always wins, so a multi-number PBX can still present per-call caller ID.

monthlyFeeAppliesboolean

True when this trunk is beyond your plan's included count and is billed the additional-trunk fee.

nextBillingDatestring date-time nullable
sipPasswordstring

Present ONLY on the response that mints it — creating a registration trunk, enabling registration, or rotating credentials. It cannot be retrieved afterwards; store it immediately.

sipPasswordNoticestring

Human-readable reminder that accompanies sipPassword.

createdAtstring date-time
updatedAtstring date-time

Example response

{
  "id": "cmb1xk2p40001abcd1234wxyz",
  "registration": {
    "username": "cnk4m8xq2z7pd",
    "domain": "sip.callnode.io",
    "server": "sip.callnode.io:5061"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.