Skip to main content
Version: /v2

Make Outbound SIP Call - API

Initiates an outbound SIP call to the provided to number using the specified SIP trunk and injects it into the specified meeting.

HTTP method and endpoint

POST

|

https://api.videosdk.live/v2/sip/outbound-call
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.

Body Parameters
REQUIRED
SIP URI or phone number to call (e.g., sip:+919099999999@sip.twilio.com, +919099999999).
OPTIONAL
Optional. Must be one of the allowed numbers[] in the SIP trunk. If not provided, the first number will be used.
REQUIRED
Display name for the SIP call participant.
REQUIRED
Meeting ID where the SIP call should be injected.
REQUIRED
Trunk ID associated with the outbound call.
Optional. Provide a custom participant ID. If not provided, a unique one will be generated.
Response Parameters
HTTP response status code.
Success or error message.
Generated or supplied participant ID for the SIP call.
POST
|
https://api.videosdk.live/v2/sip/outbound-call
import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "Bearer $YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"to" : "sip:+919099999999@sip.twilio.com",
"from" : "+11234567890",
"displayName" : "John Doe",
"meetingId" : "abcde12345",
"trunkId" : "trunk_987654321",
"participantId" : "custom_participant_123"
}),
};
const url= `https://api.videosdk.live/v2/sip/outbound-call`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"statusCode": 200,
"message": "Success",
"participantId": "dA45e3gb"
}

Got a Question? Ask us on discord