Recovering Metadata
Contents
The Recording Processor Script installation package provides an additional script that when run will recover recordings from Recording Processor's failed folder and repost the recordings to Web Services and SpeechMiner.
Before you start, you must have the following prerequisites:
- Recording Processor Script version 8.5.xxx.xx
- Python 2.7 or higher
- Admin username and password with read and writer permissions on the folder where the script resides.
Recovering the Failed Folder
After you have installed the Recording Processor Script, you can find the recover_failedfolder.py recovery script in the <RP_INSTALL_DIR>/scripts/ directory.
From the command line on the machine where the Recording Processor Script is installed and running, execute the following command:
python recover_meta_from_rp_failedfolder.py -failFolder "C:\<Installation Directory>\RP\failed" -htccUri http://<Web Services IP Address>:<Web Services Port> -opsUser <User Name> -opsPass <Password> -sleepMs 30
To return the details of the parameters used, run the following command:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -h
This command will return the following results:
usage: recover_failedfolder.py [-h] -failFolder FAILFOLDER [-htccUri HTCCURI]
[-sleepMs SLEEPMS]
[-rp.speechminer.uri SPEECHMINERURI]
[-deleteOnRecovered] [-defaultCCID DEFAULTCCID]
Recover RP failed folder
optional arguments:
-h, --help show this help message and exit
-failFolder FAILFOLDER
path to rp fail folder
-htccUri HTCCURI htcc prefix. e.g. http://gws-elb.genesyscloud.com
-sleepMs SLEEPMS miliseconds sleep after each recording is processed
-rp.speechminer.uri SPEECHMINERURI
speechMiner IR Uri, if provided, it will override
values in metadata
-deleteOnRecovered
-defaultCCID DEFAULTCCID
default CCID for recordings in folder unknownCCID
Examples
If the configuration is correct and Recording Process Script failed to post recordings because of network problems, the following example will recover the recordings:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -failFolder ..\failed -htccUri http://<Web Services URI> -opsUser <User Name> -opsPass <Password>
If Recording Processor Scripted failed to post recordings because the wrong SpeechMiner URI was provided, the following example will recover the recordings:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -failFolder ..\failed -htccUri http://<Web Services URI> -sleepMs 20 -rp.speechminer.uri http://<SpeechMiner URI>/interationreceiver -defaultCCID 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc Please enter htcc ops username: ops Please enter htcc ops password: ops Please enter rp.speechminer.auth (e.g. rp_user:123455): rpUser:123456 ...
If Recording Processor Script failed to post recordings because the CCID is invalid, the recordings are saved in the unknownCCID folder. Use the following script to recover those recordings in the unknownCCID folder:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -failFolder ..\failed -htccUri http://<Web Services URI> -sleepMs 20 -rp.speechminer.uri http://<SpeechMiner URI>/interationreceiver -defaultCCID 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc Please enter htcc ops username: ops Please enter htcc ops password: ops Please enter rp.speechminer.auth (e.g. rp_user:123455): rpUser:123456 ...
Command Line Parameters
The following table describes the command line parameters:
| Parameter Name | Mandatory | Accept Prompt Input | Description | Example |
|---|---|---|---|---|
| failedFolder | Y | No | The path to the failed folder. If the folder includes spaces in the name, put quotes around the folder name—for example, "failed folder". | C:\<Installation Directory>\RP\failed |
| startTime | N | No | The time, in UTC formate, of the earliest recording to be processed. | 1437057696000 |
| endTime | N | No | The time, in UTC formate, of the latest recording to be processed. | 1437057696000 |
| htccUri | N | No | The host and port of the Web Services Node. If this parameter is not defined, the recordings are not rePOSTed to Web Services. | http://<Web Services IP Address>:<Web Services Port> |
| oopsUser | Y | Y | The admin username for Web Services. | <User Name> |
| oopsPassword | Y | Y | The admin password for Web Services. | <Password> |
| defaultCCID | N | No | The Contact Center ID. If this parameter is not defined, the script will use "UnknownCCID". | |
| rp.speechminer.uri | N | Yes | The host and port of the SpeechMiner node. If this parameter is not provided, or if it is an invalid URI, the script will prompt to override the value. | http://<SpeechMiner IP Address>:<SpeechMiner Port> |
| rp.speechminer.auth | N | Yes | The username and password for SpeechMiner. | <SpeechMiner Username>:<SpeechMiner Password> |
| sleepsMs | N | No | The time, in milliseconds, to wait after processing each recording. If this parameter is not provided, the value defaults to 0. | 30 |
| pageLimit | N | No | [The number of pages to query on each process attempt. What does this mean?] | 10 |
| deleteOnRecovered | N | No | Determines whether to delete the recording after the recovered recording is rePOSTed to Web Services and SpeechMiner. If this parameter is not provided, the value deletes to false. | |
| defaultCCID | N | No | The default Contact Center ID. |
Logging
The script will provide audit log in recoverFailedFolder_<executiong-time>/results.log
