SIP Trunks

Last updated September 4, 2026

Outbound SIP trunks (REGISTER or static peering)

# GET /sip/trunks

List configured SIP trunks

Responses

200 List of trunks
FieldTypeDescription
trunksarray[object]required
# POST /sip/trunks

Create an outbound SIP trunk (REGISTER or static peering)

Creates a typed SIP trunk. For type: "sip_register", VoiceBlender begins REGISTERing to the supplied registrar URI with digest auth, refreshes before expiry, and routes inbound INVITEs that arrive on that peer's socket plus outbound INVITEs whose from matches the AOR through the trunk. Set sip_register.outbound_proxy to send both the REGISTER and those INVITEs via a next-hop proxy instead of straight at the registrar; the Request-URI and digest authentication still target registrar_uri. It defaults to SIP_OUTBOUND_PROXY and is resolved at creation time, so the trunk snapshot reports the hop actually in effect. For type: "ip_ip", returns 501 (reserved, not yet implemented).

Request Body

FieldTypeDescription
typeenumrequiredTrunk type discriminator. Only `sip_register` is implemented today; `ip_ip` is reserved and returns 501.
Values: sip_register, ip_ip
app_idstringoptionalApplication identifier carried through to every event emitted by this trunk.
sip_registerobjectoptionalRequired when type == "sip_register". Configures the outbound REGISTER (registrar URI, AOR, digest credentials, expiry).
registrar_uristringrequiredUpstream registrar SIP URI (e.g. "sip:pbx.example.com:5060" or "sips:pbx.example.com:5061"). Transport is taken from the URI: a "sips:" scheme or a ";transport=tls" parameter selects TLS, ";transport=tcp" selects TCP, otherwise UDP. Note that "transport" is a URI parameter (";"), not a URI header ("?") — RFC 3261 section 19.1.
outbound_proxystringoptionalNext-hop SIP proxy for this trunk's REGISTER and for outbound INVITEs placed from its AOR, attached as a loose `Route` header (the Request-URI is left unchanged, and digest auth still targets `registrar_uri`). E.g. "sip:edge.example.com:5060;transport=tcp". Defaults to `SIP_OUTBOUND_PROXY`; when neither is set, requests go straight to `registrar_uri`.
aorstringrequiredAddress-of-record this trunk REGISTERs (e.g. "sip:alice@pbx.example.com"). Becomes the From URI on outbound REGISTER, and the From / P-Asserted-Identity host on outbound INVITEs placed `from` this AOR.
usernamestringoptionalDigest auth username. Defaults to the AOR user-part when empty.
passwordstringrequiredDigest auth password. Required. Never returned in any response.
contact_userstringoptionalOverride the user-part of the Contact header sent in REGISTER. Defaults to the AOR user-part.
expires_secondsintegeroptionalRequested registration lifetime in seconds. Clamped to [SIP_OUTBOUND_REGISTRATION_MIN_EXPIRES_SECONDS, SIP_OUTBOUND_REGISTRATION_MAX_EXPIRES_SECONDS]. Default: SIP_OUTBOUND_REGISTRATION_DEFAULT_EXPIRES_SECONDS (3600).
tls_insecure_skip_verifybooleanoptionalAccept this trunk's next-hop certificate without verifying it, for a `sips:` / `;transport=tls` registrar or outbound proxy whose certificate is self-signed, privately signed, or carries no SAN (`x509: certificate relies on legacy Common Name field`). Scoped to that peer's hostname — every other TLS peer is still verified in full, unlike the server-wide `SIP_TLS_INSECURE_SKIP_VERIFY`. Ignored (with a logged warning) when the next hop is not TLS, or when it is named by IP literal: such a dial sends no SNI and cannot be told apart from any other, so use `SIP_TLS_CA_FILE` or `SIP_TLS_INSECURE_SKIP_VERIFY` there. Prefer `SIP_TLS_CA_FILE` when the peer's CA can simply be trusted.
ip_ipobjectoptionalReserved for static-IP peering (no REGISTER). Not yet implemented; supplying this returns 501.
peer_uristringoptionalStatic peer SIP URI for IP-IP peering. Reserved; not yet implemented.

Responses

202 Trunk accepted; REGISTER runs asynchronously
FieldTypeDescription
idstringrequired
typestringrequired
statusstringrequired
400 Invalid JSON, missing required field, or unknown type
FieldTypeDescription
instance_idstringoptionalInstance identifier
errorstringrequiredError message
501 Trunk type reserved but not yet implemented (e.g. ip_ip)
FieldTypeDescription
instance_idstringoptionalInstance identifier
errorstringrequiredError message
# GET /sip/trunks/{id}

Get a single SIP trunk

Parameters

NameInTypeDescription
idpathstringrequiredLeg ID

Responses

200 Trunk view
FieldTypeDescription
idstringrequired
typestringrequired
app_idstringoptional
statusstringrequired
last_errorstringoptional
created_atstringrequired
sip_registerobjectoptional
registrar_uristringrequired
outbound_proxystringoptional
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
tls_insecure_skip_verifybooleanoptional
ip_ipobjectoptional
peer_uristringoptional
404 Trunk not found
FieldTypeDescription
instance_idstringoptionalInstance identifier
errorstringrequiredError message
# DELETE /sip/trunks/{id}

Unregister and remove a SIP trunk

Returns 202 Accepted; the unregister (REGISTER with Expires: 0) and final removal run asynchronously.

Parameters

NameInTypeDescription
idpathstringrequiredLeg ID

Responses

202 Trunk accepted for teardown
404 Trunk not found
FieldTypeDescription
instance_idstringoptionalInstance identifier
errorstringrequiredError message

Schemas

Objects used by the SIP Trunks endpoints above.

CreateTrunkRequest

FieldTypeDescription
typeenumrequiredTrunk type discriminator. Only `sip_register` is implemented today; `ip_ip` is reserved and returns 501.
Values: sip_register, ip_ip
app_idstringoptionalApplication identifier carried through to every event emitted by this trunk.
sip_registerobjectoptionalRequired when type == "sip_register". Configures the outbound REGISTER (registrar URI, AOR, digest credentials, expiry).
registrar_uristringrequiredUpstream registrar SIP URI (e.g. "sip:pbx.example.com:5060" or "sips:pbx.example.com:5061"). Transport is taken from the URI: a "sips:" scheme or a ";transport=tls" parameter selects TLS, ";transport=tcp" selects TCP, otherwise UDP. Note that "transport" is a URI parameter (";"), not a URI header ("?") — RFC 3261 section 19.1.
outbound_proxystringoptionalNext-hop SIP proxy for this trunk's REGISTER and for outbound INVITEs placed from its AOR, attached as a loose `Route` header (the Request-URI is left unchanged, and digest auth still targets `registrar_uri`). E.g. "sip:edge.example.com:5060;transport=tcp". Defaults to `SIP_OUTBOUND_PROXY`; when neither is set, requests go straight to `registrar_uri`.
aorstringrequiredAddress-of-record this trunk REGISTERs (e.g. "sip:alice@pbx.example.com"). Becomes the From URI on outbound REGISTER, and the From / P-Asserted-Identity host on outbound INVITEs placed `from` this AOR.
usernamestringoptionalDigest auth username. Defaults to the AOR user-part when empty.
passwordstringrequiredDigest auth password. Required. Never returned in any response.
contact_userstringoptionalOverride the user-part of the Contact header sent in REGISTER. Defaults to the AOR user-part.
expires_secondsintegeroptionalRequested registration lifetime in seconds. Clamped to [SIP_OUTBOUND_REGISTRATION_MIN_EXPIRES_SECONDS, SIP_OUTBOUND_REGISTRATION_MAX_EXPIRES_SECONDS]. Default: SIP_OUTBOUND_REGISTRATION_DEFAULT_EXPIRES_SECONDS (3600).
tls_insecure_skip_verifybooleanoptionalAccept this trunk's next-hop certificate without verifying it, for a `sips:` / `;transport=tls` registrar or outbound proxy whose certificate is self-signed, privately signed, or carries no SAN (`x509: certificate relies on legacy Common Name field`). Scoped to that peer's hostname — every other TLS peer is still verified in full, unlike the server-wide `SIP_TLS_INSECURE_SKIP_VERIFY`. Ignored (with a logged warning) when the next hop is not TLS, or when it is named by IP literal: such a dial sends no SNI and cannot be told apart from any other, so use `SIP_TLS_CA_FILE` or `SIP_TLS_INSECURE_SKIP_VERIFY` there. Prefer `SIP_TLS_CA_FILE` when the peer's CA can simply be trusted.
ip_ipobjectoptionalReserved for static-IP peering (no REGISTER). Not yet implemented; supplying this returns 501.
peer_uristringoptionalStatic peer SIP URI for IP-IP peering. Reserved; not yet implemented.

CreateTrunkResponse

FieldTypeDescription
idstringrequired
typestringrequired
statusstringrequired

Error

FieldTypeDescription
instance_idstringoptionalInstance identifier
errorstringrequiredError message

IPIPTrunkSpec

FieldTypeDescription
peer_uristringoptionalStatic peer SIP URI for IP-IP peering. Reserved; not yet implemented.

IPIPTrunkView

FieldTypeDescription
peer_uristringoptional

SIPRegisterTrunkSpec

FieldTypeDescription
registrar_uristringrequiredUpstream registrar SIP URI (e.g. "sip:pbx.example.com:5060" or "sips:pbx.example.com:5061"). Transport is taken from the URI: a "sips:" scheme or a ";transport=tls" parameter selects TLS, ";transport=tcp" selects TCP, otherwise UDP. Note that "transport" is a URI parameter (";"), not a URI header ("?") — RFC 3261 section 19.1.
outbound_proxystringoptionalNext-hop SIP proxy for this trunk's REGISTER and for outbound INVITEs placed from its AOR, attached as a loose `Route` header (the Request-URI is left unchanged, and digest auth still targets `registrar_uri`). E.g. "sip:edge.example.com:5060;transport=tcp". Defaults to `SIP_OUTBOUND_PROXY`; when neither is set, requests go straight to `registrar_uri`.
aorstringrequiredAddress-of-record this trunk REGISTERs (e.g. "sip:alice@pbx.example.com"). Becomes the From URI on outbound REGISTER, and the From / P-Asserted-Identity host on outbound INVITEs placed `from` this AOR.
usernamestringoptionalDigest auth username. Defaults to the AOR user-part when empty.
passwordstringrequiredDigest auth password. Required. Never returned in any response.
contact_userstringoptionalOverride the user-part of the Contact header sent in REGISTER. Defaults to the AOR user-part.
expires_secondsintegeroptionalRequested registration lifetime in seconds. Clamped to [SIP_OUTBOUND_REGISTRATION_MIN_EXPIRES_SECONDS, SIP_OUTBOUND_REGISTRATION_MAX_EXPIRES_SECONDS]. Default: SIP_OUTBOUND_REGISTRATION_DEFAULT_EXPIRES_SECONDS (3600).
tls_insecure_skip_verifybooleanoptionalAccept this trunk's next-hop certificate without verifying it, for a `sips:` / `;transport=tls` registrar or outbound proxy whose certificate is self-signed, privately signed, or carries no SAN (`x509: certificate relies on legacy Common Name field`). Scoped to that peer's hostname — every other TLS peer is still verified in full, unlike the server-wide `SIP_TLS_INSECURE_SKIP_VERIFY`. Ignored (with a logged warning) when the next hop is not TLS, or when it is named by IP literal: such a dial sends no SNI and cannot be told apart from any other, so use `SIP_TLS_CA_FILE` or `SIP_TLS_INSECURE_SKIP_VERIFY` there. Prefer `SIP_TLS_CA_FILE` when the peer's CA can simply be trusted.

SIPRegisterTrunkView

FieldTypeDescription
registrar_uristringrequired
outbound_proxystringoptional
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
tls_insecure_skip_verifybooleanoptional

TrunkView

FieldTypeDescription
idstringrequired
typestringrequired
app_idstringoptional
statusstringrequired
last_errorstringoptional
created_atstringrequired
sip_registerobjectoptional
registrar_uristringrequired
outbound_proxystringoptional
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
tls_insecure_skip_verifybooleanoptional
ip_ipobjectoptional
peer_uristringoptional

TrunksListResponse

FieldTypeDescription
trunksarray[object]required