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.
Parameters
-
script: recordings.php
-
domain: domain to connect to (username.mixpbx.net)
-
username: sip username
-
password: manager password (found in Configuration on your MIXvoip webinterface)
-
action: index | download | delete
-
id: used if action=get or action=delete. Points to a file.
-
calluid: enables downloading/deleting a call by its calluid (returned for example by this API)
Return values
-
action=index
Returns a JSON encoded array of IDs that point to available recordings.
-
action=download
Returns the read state of the file passed through the ID.
-
action=delete
Deletes the file passed through the ID on the server side. If it fails, it returns an error message.
Examples without calluid
There are 3 files on the domain xyz
for user somebody
:
-
example1.wav
-
example2.wav
-
example3.wav
-
Get the IDs of the 3 files
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.
-
Download ex_2 and ex_3
On failure: If any problem occured, an error message will be returned.
-
Delete ex_2 from server
On failure: If any problem occured, an error message will be returned.
Examples with calluid
Let’s say the calluid is.
-
Download recording for this calluid
-
Delete recording for this calluid
On failure: If any problem occured, an error message will be returned.