Create an outbound SIP trunk

View as Markdown
Creates an outbound trunk: the resource calls are placed through. Requires an admin-role key. `numbers` are the caller IDs the trunk may present; a call or campaign chooses among them per call via `fromNumber` / `fromNumbers`. One trunk per carrier address per organization (`409` naming the existing trunk), and a caller ID can live on only one of your outbound trunks (`409` naming it). `address` and `transport` are immutable after creation: to change carriers, delete the trunk and create a new one.

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
addressstringRequired

Your carrier’s SIP termination host: a hostname or IP, optionally with a port. Full sip:/sips: URIs are normalized to the bare host.

numberslist of stringsRequired

Caller IDs this trunk may present, E.164 with leading +.

transportenumOptionalDefaults to auto
Allowed values:
mediaEncryptionenumOptionalDefaults to disable
Allowed values:
destinationCountrystringOptional=2 characters

ISO 3166-1 alpha-2 country code for region-pinned routing (optional).

cpsLimitintegerOptional1-50Defaults to 1
Calls per second placed through this carrier address. Shared by every trunk on the same address in your organization.
authUsernamestringOptional
authPasswordstringOptional

Response

Trunk created
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
409
Conflict Error