This function can be used to move recorded calls from server to a local machine. The function establishes a connection to the given server with the username and password provided. The username and password are checked for authentication. On success, the function will return several results according to the action.
Returns a JSON encoded array of IDs that point to available recordings.
Returns the read state of the file passed through the ID.
Deletes the file passed through the ID on the server side. If it fails, it returns an error message.
There are 3 files on the domain xyz
for user somebody
:
xyz
/recordings.php?username=somebody
&password=password
&action=index
Returns a JSON encoded array with IDs to those 3 files. For this example, we'll call those IDs ex_1, ex_2 and ex_3.
xyz
/recordings.php?username=somebody
&password=password
&action=download&id=ex_2
Returns readfile() value of ex_2.
xyz
/recordings.php?username=somebody
&password=password
&action=download&id=ex_3
Returns readfile() value of ex_3.
On failure: If any problem occured, an error message will be returned.
xyz
/recordings.php?username=somebody
&password=password
&action=delete&id=ex_2
Deletes the file that ex_2 points to, in this example, example2.wav would be deleted.
On failure: If any problem occured, an error message will be returned.
Let's say the calluid is.
xyz
/recordings.php?username=somebody
&password=password
&action=download&calluid=
Downloads the file corresponding to calluid.
xyz
/recordings.php?username=somebody
&password=password
&action=delete&calluid=
Deletes the file corresponding to calluid.
On failure: If any problem occured, an error message will be returned.