SIP Connect - Android
SIP Connect allows you to connect any SIP-compatible device or softphone to a VideoSDK room. This guide explains how to configure SIP for your VideoSDK account and connect a SIP user to an existing meeting.
Architecture
The following diagram illustrates how SIP Connect works. A SIP user connects to the VideoSDK SIP Gateway, which then bridges the call to the VideoSDK Room.

Steps
In this guide, we are using Twilio as the SIP provider, but you can choose from other providers like Plivo, Exotel, Telnyx, Ozontel, etc. The configuration process is similar across most providers.
1. Create VideoSDK Meeting
Ensure you have a VideoSDK meeting setup. If you don't have one, follow the Quick Start Guide to create a basic video calling app.
You can connect a SIP user to any active VideoSDK meeting. If you already have a meeting ID, you can proceed to the next step.
2. Create Inbound Gateway
An Inbound Gateway is required to receive calls from a SIP provider (like Twilio, Vonage, Telnyx) and route them to VideoSDK.
- Via Twilio
- Via Vonage
- Via Telnyx
- Via API
- Go to the VideoSDK Dashboard.
- Navigate to Telephony > Inbound Gateways.
- Click Add Inbound Gateway.
- Enter a name and the phone number you purchased from your SIP provider.
- Click Create.
- Copy the Inbound Gateway SIP URI (e.g.,
sip:orgId.sip.videosdk.live). - Configure this URI as the Origination SIP URI in your SIP provider's dashboard (e.g., Twilio, Vonage, Telnyx).
- Go to the VideoSDK Dashboard.
- Navigate to Telephony > Inbound Gateways.
- Click Add Inbound Gateway.
- Enter a name and the phone number you purchased from Vonage.
- Click Create.
- Copy the Inbound Gateway SIP URI (e.g.,
sip:orgId.sip.videosdk.live). - In your Vonage Console, go to your SIP Trunk settings.
- Under Inbound Calls, select your region.
- In the URI section, paste the Inbound Gateway SIP URI you copied.
- Link the phone number you purchased to this trunk.
- Go to the VideoSDK Dashboard.
- Navigate to Telephony > Inbound Gateways.
- Click Add Inbound Gateway.
- Enter a name and the phone number you purchased from Telnyx.
- Click Create.
- Copy the Inbound Gateway SIP URI (e.g.,
sip:orgId.sip.videosdk.live). - In your Telnyx Console, go to Connections and create a new SIP Connection.
- Set the type as FQDN.
- Under FQDN, add the VideoSDK Inbound Gateway SIP URI you copied.
- Assign the phone number you purchased to this connection.
You can create an inbound gateway programmatically using the API.
curl --request POST \
--url https://api.videosdk.live/v2/sip/inbound-gateways \
--header 'Authorization: YOUR_VIDEOSDK_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Inbound Gateway",
"numbers": ["+1234567890"]
}'
API Reference: Create Inbound Gateway
3. Create Outbound Gateway
An Outbound Gateway is used if you want to dial out to a SIP user from a VideoSDK meeting.
- Via Twilio
- Via Vonage
- Via Telnyx
- Via API
- Go to the VideoSDK Dashboard.
- Navigate to Telephony > Outbound Gateways.
- Click Add Outbound Gateway.
- Enter a name.
- Enter the Termination SIP URI provided by your SIP provider.
- Enter the Username and Password for your SIP provider.
- Click Create.
- Go to the VideoSDK Dashboard.
- Navigate to Telephony > Outbound Gateways.
- Click Add Outbound Gateway.
- Enter a name.
- Enter the Domain you set up in your Vonage SIP Trunk settings.
- Enter the Username and Password you configured in Vonage under Outbound Calls.
- Click Create.
- Note: For outbound gateway numbers, do not use the
+sign—just use the country code and number.
- Go to the VideoSDK Dashboard.
- Navigate to Telephony > Outbound Gateways.
- Click Add Outbound Gateway.
- Enter a name.
- Enter the SIP Domain you configured in your Telnyx SIP Connection.
- Enter the Username and Password you set up in Telnyx under Outbound Authentication.
- Click Create.
curl --request POST \
--url https://api.videosdk.live/v2/sip/outbound-gateways \
--header 'Authorization: YOUR_VIDEOSDK_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Outbound Gateway",
"numbers": ["+1234567890"],
"address": "sip.provider.com",
"auth": {
"username": "sip_username",
"password": "sip_password"
}
}'
API Reference: Create Outbound Gateway
4. Create Routing Rules
Routing rules determine how calls are handled.
Inbound Routing
For inbound calls, you need to route the call to a specific meeting room.
- Go to Telephony > Routing Rules.
- Click Add Routing Rule.
- Select your Inbound Gateway.
- Select the Phone Number.
- Under Dispatch, select Room.
- Choose Dynamic (creates a new room) or Static (connects to a specific room ID).
- Click Create.
Outbound Routing
For outbound calls, the routing rule selects which Outbound Gateway to use based on the dialed number.
- Go to Telephony > Routing Rules.
- Click Add Routing Rule.
- Select your Outbound Gateway.
- Enter the Phone Number pattern (e.g.,
+1*). - Click Create.
Connect SIP User
Inbound Call
Now that everything is configured, a SIP user can join the meeting by simply dialing the phone number configured in the Inbound Gateway.
- The call reaches your SIP provider.
- The provider forwards it to VideoSDK.
- VideoSDK checks the Routing Rule.
- The user is connected to the VideoSDK Room.
Outbound Call
To dial a SIP user from the meeting, you can use the dispatch API or the SDK method if available.
curl --request POST \
--url https://api.videosdk.live/v2/sip/call \
--header 'Authorization: YOUR_VIDEOSDK_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"gatewayId": "outbound-gateway-id",
"sipCallTo": "+1234567890",
"destinationRoomId": "room-id"
}'
API Reference: Make Outbound Call
Webhooks
You can configure webhooks to receive real-time updates about SIP calls.
Available Webhook Events
Below is the list of all supported webhook events:
| Event Name | Description |
|---|---|
call-started | Triggered when a new outbound or inbound call is initiated. |
call-answered | Triggered when the call is answered by the recipient. |
call-hangup | Triggered when the call is completed or hung up by either party. |
call-transferred | Call transferred to another destination. |
call-missed | Triggered when the call is not answered or missed by the recipient. |
call-update | Triggered when there is an update in the call status. |
call-ringing | Triggered when the call is ringing at the destination endpoint. |
call-transfer-initiated | Call transfer has been initiated. |
call-transfer-accepted | Call transfer has been accepted by the target. |
call-transferring | Call is being transferred to another destination. |
call-transfer-ringing | Call is ringing at the transfer target. |
call-transfer-failed | Call transfer failed. |
You can configure these in the Telephony > Webhooks section of the dashboard.
Configuring Webhooks
You can set up webhooks using:
- Dashboard: Navigate to the SIP section and add a webhook by specifying your target URL and selecting the events you want to subscribe to.
- API: Use the
POST /v2/sip/webhooksendpoint to register a webhook.
import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url" : "https://example.com/webhook",
"events" : ["call-started","call-answered"]
}),
};
const url= `https://api.videosdk.live/v2/sip/webhooks`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
API Reference
Got a Question? Ask us on discord

