Voice API
Voice API
Endpoint
Method: POST
URL: https://<host>/contacts/voice
Attributes
In batch processing, voice contacts have the following attributes:
Audio Files Folder Path (absolute or relative)
Audio Files Type (Mono/Stereo)
Non Speech Metadata (single CSV file for all audio files or JSON file per audio file)
Below attributes are present in the payload:
Client Call Identifier
Agent Identifier
Caller Identifier
Timestamp
Journey Identifier (Optional)
Call Recording Date
Agent Channel
In stream processing, voice contacts have the following attributes:
Mandatory Attributes
Name | Description | Data Type | Length | Comments |
---|---|---|---|---|
| Name of the Client | String | 128 | |
| Name of the Organization | String | 128 | |
| Name of Category | String | 128 | |
| Audio Folder NFS Path | String | 256 | Relative. The only supported audio file formats are WAV, MP3, OGG and FLAC. |
| Call id of voice file | String | 256 | |
| Agent’s CRM Id | String | ||
| Customer’s CRM Id | String | ||
| Agent’s channel (Mono value is 0; Stereo values will be either 1 or 2) | Long | ||
| Call created date | String | 256 | Date format has to match with format defined in file collection in system properties. |
Optional Attributes
Name | Description | Data Type | Length | Comments |
---|---|---|---|---|
| Non speech data of audio file | JSON Object | A maximum of 50 non-Speech metadata keys per category. Refer Restricted Metadata Field List. | |
| Journey id is a unique identifier | String | 256 |
Request
curl --location --request POST 'https://host/contacts/voice' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 1234567890' \ --data-raw '{ "metadata" : { "tenantName": "dev_213", "orgName": "TEST_DATA1", "catName": "mono_sd_on", "metadataMap": { "Call_audioType": "OUT", "Connected_Duration": "54", "Agent_Hangup_Status": "FALSE" } }, "data" : { "callId": "CallId0329", "agentCRM": "Agent004", "customerCRM": "Client00120", "agentChannel": 0, "journeyId": "982xsdf-az3c-15ea-b97", "callRecordingDate":"2021-03-10 11:33:12", "audioFilePath": "dev_213/TEST_DATA1/mono_sd_on/Autotest1_2010335_Client1_10-05-2020-00-00-00.wav" } }'Response: Success Http Status : 202 { "status": 202 "message": "accepted" }
Error response
Http Status : can be one of 400, 401, 403, 404, 500, 503 { "status": 400, "errors": [ { "type": "/errors/contact-payload", "title": "entity-identifier", "detail": "tenant/org/cat not found!" } ] }
Note
To process a file collection prior to U-Analyze 2.14 version, you need to downgrade the CPR, CGA and VAD components to 2.14.1.0. The remaining U-Analyze components can be in 2.15.0.0 version.