Hang up a leg (asynchronous)
Validates the leg exists and queues a hangup. The HTTP call returns 202 as soon as the leg is found; the SIP work and cleanup run in the background, and the eventual disconnection is observed via the leg.disconnected event.
Without a request body the legacy behavior is preserved: SIP BYE on connected legs (cdr.reason: "api_hangup"), or dialog cancel on unanswered inbound legs (cdr.reason: "caller_cancel").
With {"reason": "<value>"} and an unanswered SIP inbound leg (state ringing or early_media), VoiceBlender sends a final non-2xx response instead of BYE/cancel: busy→486, declined/rejected→603, unavailable→480, not_found→404, forbidden→403, server_error→500. The reason value is passed through to leg.disconnected's cdr.reason.
For connected legs the request body is ignored.
Request body
Response
Hangup queued
Changes
Changed in 2 of the 67 revisions of this API.35
- ▲
removed the success response with the status
200response-success-status-removed
- ○
added optional request body
request-body-added-optional
- ○
added the non-success response with the status
400response-non-success-status-added
- ○
added the success response with the status
202response-success-status-added
- ▲
- ▲
removed the request body
request-body-removed
- ▲
removed the success response with the status
202response-success-status-removed
- ○
removed the non-success response with the status
400response-non-success-status-removed
- ○
added the success response with the status
200response-success-status-added
This revision also has 40 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲