IraCPA API
Make CPA Request
This API sends the CPA request, followed by the RTP data.
Request Body (json)
Use text mode in the websocket to send this json request. Keep listening to any replies asynchronously.
| Key | Description | Example | Default |
|---|---|---|---|
| tenant_id required | string | Name of the licensee | acme | None |
| config_name required | string | Unique name for the configuration | "my_setup" | None |
| sampling_rate optional | integer | Sampling rate of the audio | 16000 | 8000 |
| call_uuid optional | string | Call_uuid to be associated with the transaction(If used with IraVoice) | Generated | None |
| pod_id optional | string | Calling application instance | None | None |
Sample Request (json)
Code
This API request will initialize the CPA analyser. After the request is sent, the websocket mode should be changed to binary, and RTP data should be sent in 16 bit PCM format. Preferably send 4000 bytes every 250 milliseconds. The results will be coming back whenever the CPA analyser makes a detection.
Response Body (json)
| Field | Description |
|---|---|
resultstring | Results for EAMD analysisLV - Live VoiceAM - Answering MachineTO - Time out, total time exceededFX - FaxBP - BeepSL - SilenceRT - RingToneSIT - Special information tonesEAM - Extended Answering Machine (Triggered when an answering machine is detected after a ringtone.)IBP - Immediate Beep (Triggered when a beep is detected within the first 1.75 seconds.)Results for AMD analysis LV - Live VoiceAM - Answering MachineTO - Time out, total time exceededFX - FaxBP - BeepSL - SilenceSIT - Special information tonesThe result could also be a custom tone specified under tones. 01 - Mandatory fields are not specified03 - Specified CPA configuration not found04 - No license available for the tenant05 - Specified CPA analyzer not found06 - RTP data was sent without initializing the analyser |
reasonstring | Will provide the descriptive message about the result. |
breakbool | true / false - Tells the caller to stop sending RTP and disconnect the session. |
max_energyInteger | The maximum energy found in the voice data. |
patternstring | Energy pattern seen in the voice data. |
durationInteger | Duration of the data analyzed. |
request_countInteger | Count of the requests handled so far. |
real_timeInteger | It is the time taken to send the audio to IraCpa for Analysis. |
sampling_rateInteger | Specified sampling rate of the analysed audio file. |
voice_filenameInteger | Path to the raw file created |
freq_foundInteger | Detected frequency of the audio |
initial_silence_foundInteger | Duration of the silence found in ms |
initial_silence_ignoredInteger | Duration of the silence ignored in ms |
call_uuidInteger | UUID of the call(When CPA is used alongside IraVoice) |
Sample response
Code
Last modified on

