Skip to main content
Version: /v2

Update SIP Trunk - API

This API allows you to update a SIP trunk by providing the trunk ID and updated fields.

HTTP method and endpoint

PUT

|

https://api.videosdk.live/v2/sip-trunk/:id
Headers Parameters

values : YOUR_TOKEN_WITHOUT_ANY_PREFIX

This will be a JWT token generate using VideoSDK ApiKey and Secret.

Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.

You can generate a new token by refering this Guide: Generate Auth token

REQUIRED

values : application/json

This is usefull for json body parameters, so that VideoSDK servers can understand that the incoming body parameter will be a JSON string.

Parameters
REQUIRED
trunkId of the SIP trunk.
Body Parameters
REQUIRED
  • auth: Object
    • username: string
    • password: string
REQUIRED
Name of the SIP Trunk.
REQUIRED
Domain of the SIP Trunk.
REQUIRED
Trunk direction — 'inbound' or 'outbound'.
REQUIRED
Array of phone numbers assigned to the trunk.
Response Parameters
Public-facing SIP trunk identifier.
Updated authentication details.
Updated name of the SIP trunk.
Updated SIP domain.
Updated trunk direction.
Updated phone number list.
PUT
|
https://api.videosdk.live/v2/sip-trunk/:id
import fetch from 'node-fetch';
const options = {
method: "PUT",
headers: {
"Authorization": "Bearer $YOUR_TOKEN",
"Content-Type": "application/json",
},
};
const url= `https://api.videosdk.live/v2/sip-trunk/:id`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"trunkId": "SqlZqn1U1ezvhWGRek6ow",
"auth": {
"username": "newUser",
"password": "newPassword"
},
"name": "updatedTwilio",
"domain": "updated.example.com",
"direction": "inbound",
"numbers": [
"+1987654321"
]
}

Got a Question? Ask us on discord