Create an inbound SIP trunk

View as Markdown
Creates an inbound trunk: the resource that receives calls from your carrier. Requires an admin-role key. An inbound trunk needs at least one phone number or one allowed peer address; the trunk gets its own credentials, media-encryption policy, Krisp toggle, and ringing timeout. Phone numbers are unique across the platform: a number already answering elsewhere returns `409` ("Already in use and cannot be added to this trunk: ..."). Wildcard peer addresses (`0.0.0.0`, `::`, `*`, any `/0`) are refused, since the allow-list is the security boundary.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Request

This endpoint expects an object.
namestringRequired<=120 characters
Display name for the trunk
numberslist of stringsOptional

E.164 numbers (with leading +) this trunk answers. Deduplicated.

allowedAddresseslist of stringsOptional
Hostnames, IPs, or CIDR ranges allowed to send calls to this trunk. Wildcards refused.
allowedNumberslist of stringsOptional

Restrict accepted caller numbers to this list (optional). If set, the trunk is dedicated even without numbers.

mediaEncryptionenumOptional

Defaults to allow.

Allowed values:
krispEnabledbooleanOptional

Noise cancellation for callers arriving on this trunk. Defaults to true.

ringingTimeoutSecondsintegerOptional1-600
authUsernamestringOptional
SIP digest username. Provide both credentials or neither.
authPasswordstringOptional
SIP digest password. Stored with the SIP infrastructure, never returned.

Response

Trunk created
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
409
Conflict Error