function telecoms.callrec.delete

See also:

Deletes a call recording.

Arguments:

argrequired?syntaxinfo
custIDNposintcustID of account that owns the recording (default is the account you're logged in to)
callIDY (unless uniqueID is supplied)TelNumidentifies the call whose recording to delete
uniqueIDY (unless callID is supplied)stringidentifies the call whose recording to delete
purge_after_daysNfloatNumber of days to keep the deleted recording (during which it can be resurrected by request)
strictNbooleanwhether to run in strict mode (default false)

Further argument information

purge_after_days

This argument defines the number of days after which the recording will be permanently deleted and therefore unrecoverable. If you want to make the recording immediately unrecoverable, set this argument to 0.

See the days_to_keep_callrecs parameter returned from the telecoms.cust.settings.get function to determine the default value for this argument.

strict

In strict mode, if you try to delete a recording that has already been deleted, the API will return an error.

if strict mode is off (this is the default) then the API result will indicate whether the recording was deleted this time or had previously been deleted; no error will be returned if the recording had already been deleted.

Returned Values

In non-strict mode, a successful response indicates that the recording has successfully been deleted, either by this API call or previously.

In strict mode, a successful response indicates that the recording has been deleted by this API call. If the recording had previously been deleted, then an error will be returned with errornum set to 5.2.48.

Any errors (other than 5.2.48) indicate a failure to delete the recording. See the returned error for more detaul.

Example 1

Deleting a recording that had not previously been deleted.

JSON example request:

POST https://live.apicontrol.co.uk/1/json
{
   "auth" : {
      "username" : "YOURUSERNAME",
      "password" : "YOURPASSWORD"
   },
   "func" : "telecoms.callrec.delete",
   "args" : {
      "callID" : 1122334455
   }
}

JSON example response:

{
   "results" : {
      "deleted" : 1,
      "previously_deleted" : 0,
      "purge_due_at" : 1764756867
   },
   "success" : 1
}

Example 2

Deleting a recording (with strict mode off) that has previously been deleted.

JSON example request:

POST https://live.apicontrol.co.uk/1/json
{
   "auth" : {
      "username" : "YOURUSERNAME",
      "password" : "YOURPASSWORD"
   },
   "func" : "telecoms.callrec.delete",
   "args" : {
      "callID" : 1122334455
   }
}

JSON example response:

{
   "results" : {
      "deleted" : 0,
      "previously_deleted" : 1
   },
   "success" : 1
}