Call status
CallStatusChangedWebhook is sent to the URL set up with /webhooks endpoint for webhook type
CallStatusChanged when a Call status is changed.
Authorization
basic Basic Authorization header using the BASIC scheme. Use a pair companySid:token to access the API.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Call status changed event.
Response Body
curl -X POST "https://example.com/v1/Webhooks/CallStatusChangedWebhook" \ -H "Content-Type: application/json" \ -d '{ "type": "CallStatusChanged", "sid": "WH08df051c8bba28aff56a3855f151cff51ad92c8274ad1cd2", "payload": { "callSid": "CAXXXXXXXX", "legSid": "CLXXXXXXXX", "callDirection": "Inbound", "legDirection": "Inbound", "legStatus": "Completed", "legDuration": "00:01:30", "from": "+13234567890", "to": "+19876543210", "eventDate": "2023-03-22T16:44:55.123Z" } }'Inbound Call POST
`InboundCallReceivedWebhook` is sent to the URL set up with the `/webhooks` endpoint for webhook type `InboundCallReceived` when an Inbound Call is received. In order to proceed with the Inbound Call, you need to respond to this webhook with a Call Script. Examples of the Call Scripts: - Forward the Inbound Call to the specific Phone Number: `<Response><Dial>+1234567890</Dial></Response>` - Or forward to the specific SIP URI: `<Response><Dial>sip:username@server.com</Dial></Response>` Examples of valid SIP URI: - `sip:user@server.com:5060` - `sip:user@server.com;transport=TLS` - `sip:user@server.com?header1=value1&header2=value2` - `sip:user@server.com:5060;transport=TCP?header=value` ⚠️ **To use SIP destinations with Static Forwarding**, the receiving system must be configured to accept SIP traffic from the IP addresses below: - `137.192.78.201` - `137.192.80.201` These IPs should be added to the receiving system’s allowlist or firewall rules to ensure successful call delivery. - Read the specified text and hangup: `<Response><Hangup>Hello voice</Hangup></Response>` - Hangup: `<Response><Hangup/></Response>` or any other response
Call recording POST
`CallRecordingCompletedWebhook` is sent to the URL set up with `/webhooks` endpoint for webhook type `CallRecordingCompleted` when a Call recording is completed and available for download.