---
title: "Create a SIP trunk"
method: POST
path: "/v1/trunks"
tags: ["SIP trunks"]
---

# Create a SIP trunk

`POST /v1/trunks`

Creates a SIP trunk for routing inbound and outbound calls. Returns the trunk with its generated `access_token`.

## Request body

- SIPTrunkCreateRequest
  - `label` string, required — User-defined name of the SIP trunk
  - `password` string, required — Password set for the SIP trunk. A strong password helps keep the trunk secure.
  - `host_request` object — For SIP trunks with IP authentication, includes the SIP endpoint public static IP address and the status of the authentication request. Wavix authenticates all SIP traffic originating from this IP address.
    - `host` string, required — SIP endpoint public static IP address
  - `callerid` string, required — Caller ID associated with the SIP trunk. Must be an active or verified number on the account.
  - `multiple_numbers` boolean — Indicates whether any active or verified phone number on the account can be used as the Caller ID for the SIP trunk.
  - `ip_restrict` boolean, required — Indicates whether SIP trunk registration is allowed from only specific public static IP addresses. When set to `true`, the `allowed_ips` parameter must be provided.
  - `allowed_ips` object[], nullable — A list of public static IP addresses allowed to register with the SIP trunk
    - `ip` string, required — Public static IP address allowed to register with the SIP trunk.
  - `didinfo_enabled` boolean, required — Indicates whether inbound calls include dialed number information in the `To` header of SIP INVITE requests
  - `call_restrict` boolean, required — Indicates whether a maximum call duration limit is enforced for the SIP trunk
  - `call_limit` integer — Maximum call duration for the SIP trunk, in seconds. Must not exceed the maximum duration set for the account. Ignored when `call_restrict` is `false`.
  - `cost_limit` boolean, required — Indicates if the max cost limit for an outbound call limit is activated for the SIP trunk.
  - `max_call_cost` number — Maximum cost for an outbound call, in USD
  - `channels_restrict` boolean, required — Indicates whether a limit on the number of concurrent outbound calls is enforced for the SIP trunk
  - `max_channels` integer — Maximum number of concurrent outbound calls for the SIP trunk. Must not exceed the outbound channel capacity set for the account. Ignored when `channels_restrict` is `false`.
  - `rewrite_enabled` boolean, required — Indicates whether a custom dial plan is activated for the SIP trunk
  - `rewrite_prefix` string — Digits to automatically prepend to each dialed phone number
  - `rewrite_cond` string — Number of leading digits to automatically remove from each dialed phone number
  - `call_recording_enabled` boolean — Indicates whether outbound call recording is enabled for the SIP trunk
  - `transcription_enabled` boolean, required — Indicates whether automatic call transcription is enabled for the SIP trunk. Available for `Flex Pro` customers only.
  - `transcription_threshold` integer, required — Transcriptions will be generated for calls that meet or exceed the specified minimal call duration threshold, in seconds. Available for `Flex Pro` customers only.
  - `machine_detection_enabled` boolean — Indicates whether automatic voicemail detection is enabled for the SIP trunk. Available for `Flex Pro` customers only.
  - `encrypted_media` boolean — Indicates whether SRTP media encryption is enabled for the SIP trunk.

## Response `201`

Returns the created SIP trunk.

- SIPTrunkResponse
  - `id` integer, required — Unique identifier of the SIP trunk on the platform
  - `name` string, required — System-generated login name of the SIP trunk
  - `callerid` string, nullable, required — Caller ID configured on the SIP trunk. Contains `null` if no Caller ID is set, or an empty string if multiple Caller IDs are allowed.
  - `label` string, required — User-defined name of the SIP trunk
  - `ip_restrict` boolean — Indicates whether IP restriction must be enabled on the SIP trunk
  - `allowed_ips` object[], required
    - `id` integer, required — IP address ID.
    - `ip` string, required — Public static IP address.
  - `channels_restrict` boolean — Indicates if the max number of concurrent outbound calls limit is activated for the SIP trunk.
  - `max_channels` integer, nullable — A maximum number of concurrent outbound calls placed via the SIP trunk. Cannot be higher than the outbound channel capacity configured on the account.
  - `cost_limit` boolean — Indicates if the max cost limit for an outbound call limit is activated for the SIP trunk.
  - `max_call_cost` string, nullable — A maximum cost of an outbound call, in USD.
  - `call_restrict` boolean, nullable — Indicates if maximum call duration limit is activated for the SIP trunk.
  - `call_limit` integer, nullable — A maximum call duration for the SIP trunk, in seconds. Cannot be higher than the max call duration set for the account.
  - `didinfo_enabled` boolean — Indicates if inbound calls carry dialed number information in the 'To' header of SIP Invites
  - `rewrite_enabled` boolean — Indicates if a custom dial plan is activated for the SIP trunk.
  - `rewrite_prefix` string — Leading digits to be added before the dialed phone numbers.
  - `rewrite_cond` string — Leading digits to be deleted from the dialed phone numbers.
  - `call_recording_enabled` boolean — Indicates if outbound call recording is enabled on the SIP trunk. Available for `Flex Pro` customers only.
  - `machine_detection_enabled` boolean — Indicates if automatic voicemail detection is enabled on the SIP trunk. Available for `Flex Pro` customers only.
  - `transcription_enabled` boolean — Indicates if automatic call transcription is enabled on the SIP trunk. Available for `Flex Pro` customers only.
  - `transcription_threshold` integer — Transcriptions will be generated for calls that meet or exceed the specified minimal call duration threshold, in seconds
  - `created_at` string, date-time, required — Date and time the SIP trunk was created
  - `host` string — Registration host for the SIP trunk. `dynamic` for credential-based registration, or a public static IP address for IP authentication.
  - `multiple_numbers` boolean — Indicates whether any active or verified phone number on the account can be used as the Caller ID for the SIP trunk.
  - `encrypted_media` boolean — Indicates whether SRTP media encryption is enabled for the SIP trunk.
  - `passthrough` boolean — Indicates whether Caller ID passthrough is enabled.
  - `access_token` string, nullable — Static authentication token for the SIP trunk.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — Request failed. The feature is disabled for your account.
- `422` — Validation error

---

[API](https://skmtc.net/wavix/apis/wavix-apis.md) · [All operations](https://skmtc.net/wavix/apis/wavix-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wavix/wavix-apis/versions/b22f170488b6/schema)
