3.8 CallQuery

Use this Knowledge Script to search for call detail records (CDRs) retrieved from Communication Manager and stored in the Avaya CM supplemental database. The search is based on query filters you select. This script raises an event if no CDRs are found or if the number of CDRs found exceeds the threshold you set. In addition, this script generates a data stream for the number of records found.

When you start the CallQuery Knowledge Script job, the managed object begins collecting CDRs to store in the Avaya CM supplemental database. After the CallQuery job stops, the managed object continues to collect CDRs. CDR collection stops within a time period equal to two intervals of the job, but never less than 4 minutes after the CallQuery job stops.

The purpose of this script is twofold:

  • Monitoring. In monitoring mode, this script checks the CDR tables at each specified interval for new records that match your query. In the first iteration of the job, this script finds the last record in the CDR table and checks back one interval from there. In subsequent iterations, this script checks for new records that match the query in each interval.

  • Troubleshooting. In troubleshooting mode, this script runs once and checks the CDR tables for calls that disconnected within the range you select in the Select call disconnect time range parameter. Select Run once on the Schedule tab to run this script in troubleshooting mode. However, the managed object does not collect CDRs unless this script is running, which could pose a problem should you want to troubleshoot a call that occurred 5 minutes ago, for example. Therefore, to perform troubleshooting as needed, run this script as a separate job with data collection and events disabled, and set the schedule to run every n minutes. By doing so, the Avaya CM supplemental database will always contain data you can use for troubleshooting.

3.8.1 Prerequisite

Run SetupSupplementalDB to create the Avaya CM supplemental database.

3.8.2 Resource Object

AvayaCM Active SPE object

3.8.3 Default Schedule

By default, this script runs every 5 minutes.

3.8.4 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

General Settings

Job Failure Notification

Event severity when job fails

Set the event severity level, from 1 to 40, to indicate the importance of the failure of the CallQuery job. The default is 5.

Include call details?

Select Yes to include call details in the events raised by this script. Leave this parameter unselected to suppress the following call details:

  • Condition Code

  • Calling Number

  • Called Number

  • Connect Time

  • Disconnect Time

  • Duration (seconds)

Raise event if no records found?

Select Yes to raise an event if there are no CDRs to monitor. This does not mean there are no CDRs with call quality data. It means there are no CDRs at all. The default is unselected.

Event severity when no records found

Set the event severity level, from 1 to 40, to indicate the importance of an event in which no CDRs were found. The default is 25.

Query Filters

No matter how many calls match the filters you select, an event displays only the first 50 calls.

Maximum table size

Specify the maximum number of detail rows to include in an event message. The default is 50 rows.

Minimum duration

Set this parameter to filter out records whose call duration is less than the specified value. Accept the default of 0 to ignore the filter for minimum call duration.

Maximum duration

Set this parameter to filter out records whose call duration is greater than or equal to the specified value. Accept the default of 0 to ignore the filter for maximum call duration.

Calling phone number

Specify the number of the calling phone you want to find in the CDRs. Wildcard characters are acceptable. Leave this parameter blank to search for any calling phone number.

NOTE:If you configured Communication Manager to use Agent ID numbers, an event will identify the Agent ID or gateway associated with the Calling phone number you enter here.

Phone number connector

Set this parameter only if you specify both a Calling phone number and a Called phone number. Your selection indicates how the script will connect the two parameters: AND or OR. The default is AND.

Called phone number

Specify the number of the called phone you want to find in the CDRs. Wildcard characters are acceptable. Leave this parameter blank to search for any called phone number.

NOTE:If you configured Communication Manager to use Agent ID numbers, an event will identify the Agent ID or gateway associated with the Called phone number you enter here.

Troubleshooting

Call disconnect time range

Select a Specific or Sliding date/time range for which the query should search for data. The default time range is fixed at 24 hours.

NOTE:This parameter is valid only when you select Run once on the Schedule tab.

Monitor Records Found

Event Notification

Raise event if number of records exceeds threshold?

Select Yes to raise an event if the number of CDRs found exceeds the threshold. The default is Yes.

Threshold - Maximum number of records

Specify the maximum number of CDRs that can be found before an event is raised. The default is 0 CDRs.

Event severity when number of records exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of CDRs found exceeds the threshold. The default is 15.

Data Collection

Collect data for number of records?

Select Yes to collect data for charts and reports. If enabled, data collection returns the number of CDRs found during the monitoring period.