Skip to main content
PUT
/
trunks
/
{id}
Update a SIP trunk configuration
curl --request PUT \
  --url 'https://api.wavix.com/v1/trunks/{id}?appid=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "My trunk",
  "password": "4r=h;EaCB85QNtr2",
  "callerid": "13132847320",
  "ip_restrict": false,
  "didinfo_enabled": true,
  "call_restrict": true,
  "cost_limit": true,
  "channels_restrict": false,
  "rewrite_enabled": true,
  "transcription_enabled": true,
  "transcription_threshold": 10,
  "host_request": {
    "host": "127.0.0.1"
  },
  "multiple_numbers": true,
  "allowed_ips": [
    {
      "ip": "127.0.0.1"
    }
  ],
  "call_limit": 3600,
  "max_call_cost": 0.18,
  "max_channels": 2,
  "rewrite_prefix": "1",
  "rewrite_cond": "<string>",
  "call_recording_enabled": true,
  "machine_detection_enabled": true,
  "encrypted_media": true
}
'
{
  "id": 293,
  "name": "67758",
  "callerid": "12345678900",
  "label": "My trunk",
  "allowed_ips": [
    {
      "id": 6712,
      "ip": "127.0.0.1"
    }
  ],
  "created_at": "2023-05-16T17:13:25.000Z",
  "ip_restrict": false,
  "channels_restrict": false,
  "max_channels": 2,
  "cost_limit": true,
  "max_call_cost": "0.18",
  "call_restrict": false,
  "call_limit": 3600,
  "didinfo_enabled": true,
  "rewrite_enabled": true,
  "rewrite_prefix": "1",
  "rewrite_cond": "<string>",
  "call_recording_enabled": true,
  "machine_detection_enabled": true,
  "transcription_enabled": false,
  "transcription_threshold": 10,
  "host": "dynamic",
  "multiple_numbers": true,
  "encrypted_media": true,
  "access_token": "123easwqe321132"
}

Authorizations

appid
string
query
required

An API key to authorize your request

Path Parameters

id
integer<int32>
required

SIP trunk ID

Example:

3107

Body

application/json
label
string
required

User-defined name of the SIP trunk

Example:

"My trunk"

password
string
required

Password set for the SIP trunk. Use a strong password to help keep your SIP trunk secure.

Example:

"4r=h;EaCB85QNtr2"

callerid
string
required

Caller ID associated with the SIP trunk. Must be an active or verified number on your account.

Example:

"13132847320"

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.

Example:

false

didinfo_enabled
boolean
required

Indicates whether inbound calls include dialed number information in the To header of SIP INVITE requests

Example:

true

call_restrict
boolean
required

Indicates whether a maximum call duration limit is enforced for the SIP trunk

Example:

true

cost_limit
boolean
default:false
required

Indicates if the max cost limit for an outbound call limit is activated for the SIP trunk.

Example:

true

channels_restrict
boolean
required

Indicates whether a limit on the number of concurrent outbound calls is enforced for the SIP trunk

Example:

false

rewrite_enabled
boolean
required

Indicates whether a custom dial plan is activated for the SIP trunk

Example:

true

transcription_enabled
boolean
required

Indicates whether automatic call transcription is enabled for the SIP trunk. Available for Flex Pro customers only.

Example:

true

transcription_threshold
integer<int32>
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.

Example:

10

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.

multiple_numbers
boolean

Indicates whether any active or verified phone number in your account can be used as the Caller ID for the SIP trunk

allowed_ips
object[] | null

A list of public static IP addresses allowed to register with the SIP trunk

call_limit
integer<int32>

A maximum call duration for the SIP trunk, in seconds. Must not exceed the maximum duration set for your account. Ignored when call_restrict is false.

Example:

3600

max_call_cost
number<decimal>

Maximum cost for an outbound call, in USD

Example:

0.18

max_channels
integer<int32>

Maximum number of concurrent outbound calls for the SIP trunk. Must not exceed the outbound channel capacity set for your account. Ignored when channels_restrict is false.

Example:

2

rewrite_prefix
string

Digits to automatically prepend to each dialed phone number

Example:

"1"

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

Example:

true

machine_detection_enabled
boolean

Indicates whether automatic voicemail detection is enabled for the SIP trunk. Available for Flex Pro customers only.

Example:

true

encrypted_media
boolean
Example:

true

Response

id
integer<int32>
required

Unique identifier of the SIP trunk on the platform

Example:

293

name
string
required

System-generated login name of the SIP trunk

Example:

"67758"

callerid
string
required

Caller ID configured on the SIP trunk. In cases when multiple Caller IDs are allowed on the SIP trunk, contains an empty string.

Example:

"12345678900"

label
string
required

User-defined name of the SIP trunk

Example:

"My trunk"

allowed_ips
AllowedIPs · object[]
required
created_at
string<date-time>
required

Date and time the SIP trunk was created

Example:

"2023-05-16T17:13:25.000Z"

ip_restrict
boolean
default:false

Indicates whether IP restriction must be enabled on the SIP trunk

Example:

false

channels_restrict
boolean
default:false

Indicates if the max number of concurrent outbound calls limit is activated for the SIP trunk.

Example:

false

max_channels
integer<int32> | null

A maximum number of concurrent outbound calls placed via the SIP trunk. Cannot be higher than the outbound channel capacity configured on the account.

Example:

2

cost_limit
boolean
default:false

Indicates if the max cost limit for an outbound call limit is activated for the SIP trunk.

Example:

true

max_call_cost
string | null

A maximum cost of an outbound call, in USD.

Example:

"0.18"

call_restrict
boolean | null
default:false

Indicates if maximum call duration limit is activated for the SIP trunk.

Example:

false

call_limit
integer<int32> | null

A maximum call duration for the SIP trunk, in seconds. Cannot be higher than the max call duration set for the account.

Example:

3600

didinfo_enabled
boolean
default:true

Indicates if inbound calls carry dialed number information in the 'To' header of SIP Invites

Example:

true

rewrite_enabled
boolean
default:false

Indicates if a custom dial plan is activated for the SIP trunk.

Example:

true

rewrite_prefix
string

Leading digits to be added before the dialed phone numbers.

Example:

"1"

rewrite_cond
string

Leading digits to be deleted from the dialed phone numbers.

call_recording_enabled
boolean
default:false

Indicates if outbound call recording is enabled on the SIP trunk. Available for Flex Pro customers only.

Example:

true

machine_detection_enabled
boolean
default:false

Indicates if automatic voicemail detection is enabled on the SIP trunk. Available for Flex Pro customers only.

Example:

true

transcription_enabled
boolean
default:false

Indicates if automatic call transcription is enabled on the SIP trunk. Available for Flex Pro customers only.

Example:

false

transcription_threshold
integer<int32>
default:6

Transcriptions will be generated for calls that meet or exceed the specified minimal call duration threshold, in seconds

Example:

10

host
string

Host of siptrunk

Example:

"dynamic"

multiple_numbers
boolean

Multiple numbers

Example:

true

encrypted_media
boolean

Encrypted media

Example:

true

access_token
string
Example:

"123easwqe321132"