Delete a call
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Calls/0c9b8a7d-6e5f-4a3b-9c1d-2e3f4a5b6c7d';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Calls/0c9b8a7d-6e5f-4a3b-9c1d-2e3f4a5b6c7d \ --header 'Authorization: Basic <credentials>'Deprecated: to hang up a call, use POST /Accounts/{auth_id}/Calls/{call_sid} with Status=completed. This route forgets the call’s media route and answers 204, but the media server no longer accepts the hang-up it sends, so the call is not hung up. A call with no live media route answers 409 with code 20009, whose message ("still in progress") is misleading. A suffix after a dot in the SID (e.g. .json) is ignored. The same operation is served, deprecated, at DELETE /Account/{auth_id}/Call/{call_sid}.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your account Auth ID, or the Auth ID of a sub-account you own
Example
AC000000000000000000Call SID (a UUID)
Example
0c9b8a7d-6e5f-4a3b-9c1d-2e3f4a5b6c7dResponses
Section titled “ Responses ”Accepted; the call’s route was forgotten
Authentication failed: missing or invalid credentials (JSON string from the API gateway)
Example generated
exampleNo live call with this SID (code 20009)
object
Error code, e.g. 21201 (no To), 21213 (no From), 21205 (no Url), 21211 (invalid To), 21210 (From not verified, or unreadable request), 21219 (To not verified on a trial account), 10001 (account not active), 20001 (invalid parameter), 20009 (no live call to delete). The insufficient-balance error carries 258.
Human-readable explanation.
A link for more information: https:// followed by the host the request was sent to, without its api. prefix.
The HTTP status of the response.
Example
{ "code": 21201, "message": "No 'To' number is specified", "more_info": "https://siprtc.io", "status": 400}