SIP Webhooks in VideoSDK
Webhooks allow you to receive real-time notifications about important call events in your SIP integration with VideoSDK. You can configure webhooks either via the VideoSDK dashboard or programmatically using the API.
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. |
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.
POST
|
https://api.videosdk.live/v2/sip/webhooks
NodeJS
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

