Sending CDRs to remote server

You can enable VoiceAI Connect to send CDRs on a remote server. You can send CDRs for all bots or per bot. The CDRs are by default stored in the VoiceAI Connect's database and can be viewed by AudioCodes Administrator in the VoiceAI Connect's Web-based management tool.

This feature is applicable only to VoiceAI Connect Enterprise (Version 3.14 and later).


How to use it?

Provider configuration

Configure a provider with cdrURL as the target to send the CDR reports:

Parameter

Type

Description

cdrURL

String

Defines the URL of the remote server that VoiceAI Connect will send the CDR report.

token

String

Defines the authentication token value (if using token, then you do not need to use oauthTokenUrl).

oauthTokenUrl

String

Defines the URL to get the token (if using oauthTokenUrl, then you do not need to use token).

cdrAuthTokenType

String

Defines the authentication token type (optional).

Default value: “Bearer”

cdrRetries

Number

Number of retries or sending CDRs via rest APIs.

Default value: 0 for no retries.

This parameter is applicable only to VoiceAI Connect Enterprise Version 3.18 and later.

cdrTimeoutMS

Number

Timeout for CDR requests in milliseconds.

Default value: 5000 (5 seconds).

Set to 0 for no timeout.

This parameter is applicable only to VoiceAI Connect Enterprise Version 3.18 and later.

cdrAllowSelfSignedCert

Boolean

Determines whether self-signed certificates are permitted for communication with the CDR server.

  • true: Self-signed certificates are accepted for CDR server connections. This allows the system to connect to CDR servers that use self-signed certificates, which may be useful in development or testing environments where certificate authority (CA) signed certificates are not available.

  • false: (Default) Only certificates signed by a recognized certificate authority (CA) are accepted for CDR server connections. This enhances security by ensuring that the CDR server is authenticated using a trusted certificate.

This parameter is applicable only to VoiceAI Connect Enterprise Version 3.20.5 and later.

Provider example:

{
  "name": "CDR Storage Server",
  "type": "audiocodes",
  "cdrURL": "{URLtoServer}",
  "cdrAuthTokenType", "Splunk" 
  "credentials": {
    "token": ""
    "oauthTokenUrl": "" }
}

Bot configuration

This feature can be configured by the VoiceAI Connect bot using the following bot parameters:

Parameter

Type

Description

cdrReportProviders

Array

Defines the reference for one or more providers..

cdrReportProvider can be configured in the global settings by an administrator to affect all the bots, or in a specific bot as shown below.

If cdrReportProvider is configured both as a global parameter and for a specific bot VoiceAI Connect will send the CDR report to both targets.

Bot example :

{
    "name": "EdinburghTube",
    "providerBotName": "myBot",
    "provider": "my_aws",
    "sttProvider": "my_azure",
    "cdrReportProviders": ["CDR Storage Server"]
}

Report Information

Schema

CDR schema that is sent to a remote server:

{
  "botDisplayName": "string",
  "botName": "string",
  "calledHost": "string",
  "calledNumber": "string",
  "callingHost": "string",
  "callingNumber": "string",
  "clientId": "string",
  "conf": {
    "languages": {
      "bot": "string",
      "tts": "string",
      "stt": "string"
    },
    "ttsVoiceId": "string",
    "params": {}
  },
  "globalSessionId": "string",
  "lastUpdateTime": "string",
  "providers": {
    "bot": {
      "name": "string",
      "providerType": "string",
      "region": "string"
    },
    "tts": {
      "name": "string",
      "providerType": "string",
      "region": "string"
    },
    "stt": {
      "name": "string",
      "providerType": "string",
      "region": "string"
    }
  },
  "sbcSessionId": "string",
  "sessionManagerId": "string",
  "startTime": "string",
  "status": "enum",
  "duration": "number",
  "endTime": "string",
  "failureCode": "enum",
  "stats": {
    "tts": {
      "requests": "number",
      "cachedCharacterCount": "number",
      "cachedRequests": "number",
      "characterCount": "number",
      "avgDelayMs": "number",
      "maxDelayMs": "number"
    },
    "playUrl": {
      "requests": "number",
      "cachedRequests": "number",
      "avgDelayMs": "number",
      "maxDelayMs": "number"
    },
    "stt": {
      "requests": "number",
      "rawTime": "number",
      "billingTime": "number",
      "supposedRawTime": "number",
      "supposedBillingTime": "number"
    },
    "bot": {
      "incomingMessages": "number",
      "outgoingMessages": "number"
    }
  }
}
Example
{
  "botDisplayName": "Copilot",
  "botName": "DemoCopilot",
  "calledHost": "audiocodes.com",
  "calledNumber": "DemoCopilot",
  "callingHost": "audiocodes.com",
  "callingNumber": "John Doe",
  "clientId": "192.168.1.200",
  "conf": {
    "languages": {
      "bot": "en-US",
      "tts": "en-US",
      "stt": "en-US"
    },
    "ttsVoiceId": "en-US-BenjaminRUS",
    "params": {
      "playUrlMediaFormat": "wav/lpcm16",
      "sendDTMFAsText": true,
      "speakerVerificationType": "text-independent",
      "sttProvider": "my_azure",
      "ttsProvider": "my_azure",
      "voiceName": "en-US-BenjaminRUS"
    }
  },
  "globalSessionId": "5eda8d2d70cd433d",
  "lastUpdateTime": "2023-05-04T09:24:13.342Z",
  "providers": {
    "bot": {
      "name": "my_copilot",
      "providerType": "azure-copilot",
      "region": "westus2"
    },
    "tts": {
      "name": "my_azure",
      "providerType": "azure",
      "region": "westus2"
    },
    "stt": {
      "name": "my_azure",
      "providerType": "azure",
      "region": "westus2"
    }
  },
  "sbcSessionId": "73aad9:239:2-2",
  "sessionManagerId": "172.0.0.1",
  "startTime": "2023-05-04T09:23:50.702Z",
  "status": "Success",
  "duration": 22.637,
  "endTime": "2023-05-04T09:24:13.339Z",
  "failureCode": "None",
  "stats": {
    "tts": {
      "requests": 4,
      "cachedCharacterCount": 0,
      "cachedRequests": 0,
      "characterCount": 229,
      "avgDelayMs": 291.25,
      "maxDelayMs": 377
    },
    "playUrl": {
      "requests": 0,
      "cachedRequests": 0,
      "avgDelayMs": 0,
      "maxDelayMs": 0
    },
    "stt": {
      "requests": 1,
      "rawTime": 2.015,
      "billingTime": 3,
      "supposedRawTime": 2.015,
      "supposedBillingTime": 3
    },
    "bot": {
      "incomingMessages": 5,
      "outgoingMessages": 1
    }
  }
}

CDR fields

The following table details CDR fields:

CDR Field

Type

Description

botDisplayName

string

Describes the bot display name.

botName

string

Describes the bot name.

botOperationResult

string

The value of the botOperationResult parameter that was set by the bot.

botOperationData

string

The value of the botOperationData parameter that was set by the bot.

calledHost

string

Describes the host Name that was called.

calledNumber

string

Describes the host Phone number that was called.

callingHost

string

Describes the host name making the call.

callingNumber

string

Describes the host phone number making the call.

clientId

string

Describes the SBC client identifier.

conf.languages.bot

string

Describes the language used by the bot.

conf.languages.tts

string

Describes the language used by the text‑to‑speech Engine.

conf.languages.stt

string

Describes the language used by the speech ‑to‑text engine.

conf.ttsVoiceId

string

Describes the voice ID used by text‑to‑speech engine.

conf.param

string

Describes the bot starting parameters that configure the bot.

globalSessionId

string

Describes the call global session ID.

lastUpdateTime

string

Describes the internal call update .

providers.bot.name

string

Describes the bot provider name.

providers.bot.providerType

string

Describes the bot provider type (e.g., Amazon, Azure, etc.).

providers.bot.region

string

Describes the bot provider region.

providers.tts.name

string

Describes the bot provider text‑to‑speech engine name.

providers.tts.providerType

string

Describes the bot provider text‑to‑speech engine type.

providers.tts.region

string

Describes the bot provider text‑to‑speech engine region .

providers.stt.name

string

Describes the bot provider speech‑to‑text engine name .

providers.stt.providerType

string

Describes the bot provider speech‑to‑text provider type.

providers.stt.region

string

Describes the bot provider speech‑to‑text region.

sbcSessionId

string

Describes the call SBC session ID.

sessionManagerId

string

Describes the VoiceAI Connect Call ID.

startTime

string

Describes the time call started.

status

enum

Describes the call status (i.e., Success or failure).

duration

number

Describes the call duration (seconds).

endTime

string

Describes the time call ended (iso date).

failureCode

enum

If the call fails, this describes the failure code:

- SecretResolutionFailed

- DialoutNoAnswer

- DialoutBusy

- DialoutDeclined

- DialoutError

- DialoutMessageQueueError

- SBCError

- DialoutMachineDetected

- MediaConnectFailure

- TTSProviderStartFailure

- TTSSayFailure

- TTSError

- STTProviderStartFailure

- STTError

- BotControllerStartFailure

- BotNotFound

- BotTerminated

- BotInitializationError

- BotStartMessageFailure

- BotTransferNoTarget

- UserInactivity

- SBCKeepAliveFailure

- SBCConnectionClosed

- SBCPlaybackError

- PlayUrlFailure

- DBCleanup

- SMBusy

- CallMaxDurationExpired

stats.tts.requests

number

Describes the number of sent text‑to‑speech requests.

stats.tts.cachedCharacterCount

number

Describes the character count saved by using cache instead of requests to text‑to‑speech.

stats.tts.characterCount

number

Describes the character count used in requests to text‑to‑speech for billing purposes.

stats.tts.cachedRequests

number

Describes the number of cached text‑to‑speech requests (i.e., not requiring repeat request to text‑to‑speech provider).

stats.tts.avgDelayMs

number

Describes the average text‑to‑speech response delay.

stats.tts.maxDelayMs

number

Describes the maximum text‑to‑speech response delay.

stats.playUrl.requests

number

Describes the number of playUrl requests.

stats.playUrl.cachedRequests

number

Describes the number of cached playUrl requests (i.e., not requiring repeat request).

stats.playUrl.avgDelayMs

number

Describes the average playUrl response delay.

stats.playUrl.maxDelayMs

number

Describes the maximum playUrl response delay.

stats.stt.requests

number

Describes the number of sent speech‑to‑text requests.

stats.stt.rawTime

number

Describes the number of seconds sent to speech‑to‑text engine.

stats.stt.billingTime

number

Describes the speech‑to‑text engine billing time (i.e., rounded according to provider billing requirements).

stats.stt.supposedRawTime

number

Describes the number of seconds that would be sent to speech‑to‑text engine without VoiceAI Connect mechanisms to reduce the cost of speech services (for more information, see Reducing speech service costs).

stats.stt.supposedBillingTime

number

Describes the speech‑to‑text engine billing time without using VoiceAI Connect mechanisms to reduce the cost of speech services.

stats.bot.incomingMessages

number

Describes the number of incoming messages from the bot.

stats.bot.outgoingMessages

number

Describes the number of outgoing messages to the bot.