Skip to main content
POST
Create an inbound SIP trunk

Authorizations

Authorization
string
header
required

Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.

Path Parameters

projectId
string
required

Project id

Body

application/json

Fields not listed here are ignored. Phone numbers are not set here: bind a number to the trunk with the number's sip_trunk_id.

name
string
required

Unique within the project.

Required string length: 1 - 120
whitelist_cidrs
string[]
required

The IP ranges the trunk accepts calls from, in CIDR notation with a prefix length (203.0.113.10/32, 2001:db8::/32). A catch-all range (0.0.0.0/0, ::/0) is refused.

Minimum array length: 1
secure_media
enum<string>
default:disabled

Media encryption (SRTP). enabled offers it with a fallback; required refuses calls without it.

Available options:
disabled,
enabled,
required
sip_headers
object[]

The SIP headers the trunk passes to the agent as sip.* call variables. On update, the list you send replaces the stored one.

Maximum array length: 10

Response

The trunk was created, inactive.

sip_trunk
object
required

An inbound SIP trunk: calls from your SIP infrastructure, from the IP ranges it allows, to the phone numbers bound to it, are answered by Clarity agents.