\Aculab\WebServicesWrapperMonitorRecordingWebService

Monitor Recording Web Service.

Summary

Methods
Properties
Constants
setWebServicesServer()
setCryptoMethod()
setProxy()
__construct()
listFiles()
getFileContent()
getFileToFile()
No public properties found
VERSION
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

VERSION

VERSION

The wrapper version.

The wrapper version number.

Methods

setWebServicesServer()

setWebServicesServer(string  $wsserver) 

Set the web services server address.

This allows the web service requests to be directed to a specific server. The default is https://ws-<cloud_id>.aculabcloud.net

Parameters

string $wsserver

The base URL of the web services server.

setCryptoMethod()

setCryptoMethod(integer  $method) 

Set the crypto method used when connectiing to the web services server.

This allows a specific crypto method to be used when connecting to the web service server. The values should be one of the STREAM_CRYPTO_METHOD_TLSv1_N_CLIENT constants. The default is STREAM_CRYPTO_METHOD_ANY_CLIENT.

Parameters

integer $method

The crypto method to use.

setProxy()

setProxy(string  $proxy, boolean  $request_fulluri) 

Configures the proxy server to use when making Web Service requests.

Parameters

string $proxy

URI specifying address of proxy server. (e.g. tcp://proxy.example.com:5100).

boolean $request_fulluri

When set to TRUE, the entire URI will be used when constructing the request. While this is a non-standard request format, some proxy servers require it.

__construct()

__construct(string  $cloud_id, string  $username, string  $access_key) 

Create a MonitorRecordingWebService object.

Parameters

string $cloud_id

The cloud identifier, such as "1-2-0".

string $username

The cloud account username.

string $access_key

The access key for the cloud account.

listFiles()

listFiles(string  $application_id) : array

List monitor recording files.

This lists the filenames of monitor recordings created for the given application instance id. There will be one file for each outbound call placed by the application for which any media was received. Please note that these files are kept for approximately two weeks before being deleted.

Parameters

string $application_id

An application instance id.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

array —

Returns an array of FileDetails objects.

getFileContent()

getFileContent(string  $filename) : string

Get the monitor file contents.

This fetches the specified monitor recording file, using a filename discovered by use of \Aculab\WebServicesWrapper\MonitorRecordingWebService::listFiles() and returns the contents.

Parameters

string $filename

A monitor recording filename as returned by listFiles().

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

string —

The file contents.

getFileToFile()

getFileToFile(string  $filename, string  $local_filename) : integer

Get the file contents to a local file.

This fetches the specified monitor recording file, using a filename discovered by use of \Aculab\WebServicesWrapper\MonitorRecordingWebService::listFiles() and stores is as a local file.

Parameters

string $filename

A monitor recording filename as returned by listFiles().

string $local_filename

The local file to write to.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

integer —

The amount of data written to the local file.