SIP Trunks

Update a trunk

Updates any subset of a trunk's fields. Send egressHost as null or "" to clear it and make the trunk ingress-only. The same validation codes as create apply; a request with no recognized fields returns 400 no_fields.

patch/api/v1/trunks/{id}

Request

  • Base URL: https://api.callnode.io
  • URL: https://api.callnode.io/api/v1/trunks/{id}
  • 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
egressHoststring nullable

Null or empty string clears egress delivery.

egressPortinteger
egressTransport'udp' | 'tcp' | 'tls'
status'active' | 'disabled'
egressEnabledboolean
allowedIpsstring[]
ingressEnabledboolean
registrationEnabledboolean

Turning this on for the first time mints credentials and returns sipPassword once in the response. Turning it off keeps the credentials on file so re-enabling does not disturb a configured PBX.

defaultPhoneNumberIdstring nullable
outboundCliNumberIdstring nullable

Null clears the trunk-level outbound caller ID.

Response

The updated trunk.

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.