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

Example:

"13132847320"

ip_restrict
boolean
required

Indicates whether IP restriction is required for the SIP trunk

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 on the SIP trunk. Available for Flex Pro customers only.

Example:

true

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.

Example:

10

host_request
object
multiple_numbers
boolean

Indicates whether the Caller ID passthrough feature is enabled for the SIP trunk

allowed_ips
object[] | null

SIP trunk registration is allowed only from public static IP addresses listed here. The parameter is required when ip_restrict is true.

call_limit
integer

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

Maximum cost for an outbound call, in USD

Example:

0.18

max_channels
integer

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

Leading digits to prepend to dialed phone numbers

Example:

"1"

rewrite_cond
string

Leading digits to remove from dialed phone numbers.

call_recording_enabled
boolean

Indicates whether outbound call recording is enabled on the SIP trunk

Example:

true

machine_detection_enabled
boolean

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

Example:

true

encrypted_media
boolean
Example:

true

Response

id
integer
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 | 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 | 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
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"

I