Dialogic Dialogic Global Call IP IP Phone User Manual


 
264
Dialogic Corporation
4.21.1 Alarm Source Object Name
In Dialogic
®
Global Call API, alarms are managed using the Dialogic
®
Global Call API Alarm
Management System (GCAMS). Each alarm source is represented by an Alarm Source Object
(ASO) that has an associated name. When using Dialogic
®
Global Call API with IP, the ASO name
is IPM QoS ASO. The ASO name is useful in many contexts, for example, when configuring a
device for alarm notification.
4.21.2 Retrieving the Media Device Handle
To retrieve the Dialogic
®
Global Call API line device corresponding to the media device, use the
gc_GetResourceH( ) function. See Section 8.3.12, “gc_GetResourceH( ) Variances for IP”, on
page 455 for more information.
The Dialogic
®
Global Call API line device corresponding to the media device is the device that
must be used with GCAMS functions to manage QoS alarms.
4.21.3 Setting QoS Threshold Values
To set QoS threshold values, use the gc_SetAlarmParm( ) function. See Section 8.3.24,
“gc_SetAlarmParm( ) Variances for IP”, on page 483 for more information.
The following code demonstrates how to set QoS threshold values.
Note: The following code uses the IPM_QOS_THRESHOLD_INFO structure from the IP Media Library
(IPML). See the Dialogic
®
IP Media Library API Library Reference and the Dialogic
®
IP Media
Library API Programming Guide for more information.
/*****************************************************************************
Routine: SetAlarmParm
Assumptions/Warnings: None.
Description: calls gc_SetAlarmParm()
Parameters: handle of the Media device
Returns: None
******************************************************************************/
void SetAlarmParm(int hMediaDevice)
{
ALARM_PARM_LIST alarm_parm_list;
IPM_QOS_THRESHOLD_INFO QoS_info;
alarm_parm_list.n_parms = 1;
QoS_info.unCount=1;
QoS_info.QoSThresholdData[0].eQoSType = QOSTYPE_JITTER;
QoS_info.QoSThresholdData[0].unTimeInterval = 1000;
QoS_info.QoSThresholdData[0].unDebounceOn = 5000;
QoS_info.QoSThresholdData[0].unDebounceOff = 15000;
QoS_info.QoSThresholdData[0].unFaultThreshold = 50;
QoS_info.QoSThresholdData[0].unPercentSuccessThreshold = 90;
QoS_info.QoSThresholdData[0].unPercentFailThreshold = 10;
alarm_parm_list.alarm_parm_fields[0].alarm_parm_data.pstruct =
(void *) &QoS_info;