Delete a call (legacy path)
const url = 'https://api.siprtc.io/v1/Account/AC000000000000000000/Call/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/Account/AC000000000000000000/Call/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. The same operation as DELETE /Accounts/{auth_id}/Calls/{call_sid} (deleteCall), served at the older path: it forgets the call’s media route and answers 204 without hanging the call up.
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}