Dialogic Event Service API For Windows: Library Reference
Dialogic Event Service API For Windows: Library Reference
Windows®
Library Reference
March 2008
05-1905-006
Copyright © 2002-2008 Dialogic Corporation. All rights reserved. You may not reproduce this document in whole or in part without permission in
writing from Dialogic Corporation.
All contents of this document are furnished for informational use only and are subject to change without notice and do not represent a commitment on
the part of Dialogic Corporation or its subsidiaries (“Dialogic”). Reasonable effort is made to ensure the accuracy of the information contained in the
document. However, Dialogic does not warrant the accuracy of this information and cannot accept responsibility for errors, inaccuracies or omissions
that may be contained in this document.
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH DIALOGIC® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY
ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN A
SIGNED AGREEMENT BETWEEN YOU AND DIALOGIC, DIALOGIC ASSUMES NO LIABILITY WHATSOEVER, AND DIALOGIC DISCLAIMS ANY
EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF DIALOGIC PRODUCTS INCLUDING LIABILITY OR WARRANTIES
RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY INTELLECTUAL PROPERTY
RIGHT OF A THIRD PARTY.
Dialogic products are not intended for use in medical, life saving, life sustaining, critical control or safety systems, or in nuclear facility applications.
It is possible that the use or implementation of any one of the concepts, applications, or ideas described in this document, in marketing collateral
produced by or on web pages maintained by Dialogic may infringe one or more patents or other intellectual property rights owned by third parties.
Dialogic does not provide any intellectual property licenses with the sale of Dialogic products other than a license to use such product in accordance
with intellectual property owned or validly licensed by Dialogic and no such licenses are provided except pursuant to a signed agreement with
Dialogic. More detailed information about such intellectual property is available from Dialogic’s legal department at 9800 Cavendish Blvd., 5th Floor,
Montreal, Quebec, Canada H4M 2V9. Dialogic encourages all users of its products to procure all necessary intellectual property licenses
required to implement any concepts or applications and does not condone or encourage any intellectual property infringement and
disclaims any responsibility related thereto. These intellectual property licenses may differ from country to country and it is the
responsibility of those who develop the concepts or applications to be aware of and comply with different national license requirements.
Dialogic, Dialogic Pro, Brooktrout, Cantata, SnowShore, Eicon, Eicon Networks, Eiconcard, Diva, SIPcontrol, Diva ISDN, TruFax, Realblocs,
Realcomm 100, NetAccess, Instant ISDN, TRXStream, Exnet, Exnet Connect, EXS, ExchangePlus VSE, Switchkit, N20, Powering The Service-
Ready Network, Vantage, Connecting People to Information, Connecting to Growth. and Shiva, among others as well as related logos, are either
registered trademarks or trademarks of Dialogic. Dialogic's trademarks may be used publicly only with permission from Dialogic. Such permission may
only be granted by Dialogic’s legal department at 9800 Cavendish Blvd., 5th Floor, Montreal, Quebec, Canada H4M 2V9. Any authorized use of
Dialogic's trademarks will be subject to full respect of the trademark guidelines published by Dialogic from time to time and any use of Dialogic’s
trademarks requires proper acknowledgement. Windows is a registered trademark of Microsoft Corporation in the United States and/or other
countries. Other names of actual companies and products mentioned herein are the trademarks of their respective owners.
Dialogic® Event Service API for Windows® Library Reference – March 2008
Dialogic Corporation
Contents
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5 Data Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
ClockingFaultMsg – payload format of CLOCK_EVENT_CHANNEL events . . . . . . . . . . . . . . . . 40
DevAdminEventMsg – payload format of ADMIN_CHANNEL events . . . . . . . . . . . . . . . . . . . . . 41
DevBridgingEventMsgT – payload format of BRIDGING_CHANNEL events . . . . . . . . . . . . . . . 42
DlgEventMsgType – generic event message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
NetworkEventMsg – payload format of NETWORK_ALARM_CHANNEL events . . . . . . . . . . . . 45
ProcessorFaultMsg – payload format of FAULT_CHANNEL events . . . . . . . . . . . . . . . . . . . . . . 46
6 Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Dialogic® Event Service API for Windows® Library Reference – March 2008 3
Dialogic Corporation
Contents
4 Dialogic® Event Service API for Windows® Library Reference – March 2008
Dialogic Corporation
Revision History
This revision history summarizes the changes made in each published version of this document.
05-1905-006 March 2008 Made global changes to reflect Dialogic brand and changed title to “Dialogic® Event
Service API for Windows® Library Reference.”
05-1905-004 October 2005 NetworkEventMsg section: Added note to the auid data structure field about the
channel returning invalid AUIDs.
Events chapter : Noted that Bridging events are only supported for Dialogic® Host
Media Processing release.
DevBridgingEventMsgT section: Noted that this data structure is only supported for
Dialogic® Host Media Processing release.
05-1905-003-01 September 2005 Events chapter : :Added bridging device events for Dialogic®Host Media Processing
release.
DebBridgingEventMsgT section: Added bridging device event data structure for
Dialogic® Host Media Processing release.
Dialogic® Event Service API for Windows® Library Reference — March 2008 5
Dialogic Corporation
Revision History
6 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
About This Publication
The following topics provide information about this Dialogic® Event Service API for Windows®
Library Reference:
• Purpose
• Applicability
• Intended Audience
• How to Use This Publication
• Related Information
Purpose
This publication provides a reference to the classes, functions, data structures, and events in the
Event Service library for Dialogic® products.
This publication is a companion document to the Dialogic® Event Service API Programming
Guide, which provides guidelines for designing applications that are capable of receiving system
administrative events via the event notification framework.
Applicability
This document version (05-1905-006) is published for Dialogic® Host Media Processing Software
Release 3.0WIN.
This document may also be applicable to other software releases (including service updates) on
Windows® operating systems. Check the Release Guide for your software release to determine
whether this document is supported.
Intended Audience
Dialogic® Event Service API for Windows® Library Reference — March 2008 7
Dialogic Corporation
About This Publication
Refer to this publication after you have installed the Dialogic® hardware and system software
release, which includes the Dialogic® Event Service API library.
This publication assumes that you are familiar with the Windows® operating system and the C++
programming language.
Related Information
8 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Function Summary by Category
1. 1
The Dialogic® Event Service API library functions are grouped into the following categories:
• DlgAdminConsumer Class Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
• CEventHandlerAdaptor Class Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Note: Each category corresponds to a C++ class. The DlgAdminConsumer class is defined in the
dlgadminconsumer.h file. The CEventHandlerAdaptor class is defined in the dlgadminmsg.h file.
Dialogic® Event Service API for Windows® Library Reference — March 2008 9
Dialogic Corporation
Function Summary by Category
10 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Function Information
2. 2
This chapter provides a reference to the functions in the Dialogic® Event Service API library.
Functions are listed according to C++ class membership.
where:
return_type
indicates the data type of the return type or return field
function_name
represents the function name
parameter1
refers to the first parameter
parameterN
refers to the last parameter
Dialogic® Event Service API for Windows® Library Reference — March 2008 11
Dialogic Corporation
DlgAdminConsumer::DisableFilters( )
DlgAdminConsumer::DisableFilters( )
Description
Parameter Description
pfilters points to the array of filters that will be disabled
iCount indicates the number of elements in the filter array that will be disabled
Cautions
The DisableFilters( ) function only applies to the filters that were passed to the
DlgAdminConsumer object during instantiation.
Errors
None
Example
12 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::DisableFilters( )
#include <stdio.h>
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
/*user defined header file that extends the CEventHandlerAdaptor class class and provides an
implementation of CEventHandlerAdaptor::HandleEvent function*/
#include "clockhandler.h"
//function prototypes
DlgEventService::DlgAdminConsumer * MonitorClock (ClockHandler *pHandler);
ClockHandler clockHandler;
DlgEventService::DlgAdminConsumer *pClockConsumer;
//sync C/C++ Input/Output
ios::sync_with_stdio();
cout <<"Monitoring Clock Channel for events:" <<endl;
pClockConsumer = MonitorClock(&clockHandler);
while (1)
{
sleep(200);
}
return 0;
DlgEventService::DlgAdminConsumer *pConsumer;
myFilterCallBackId[0].callback=pHandler;
myFilterCallBackId[0].clientData= (void*)0;
myFilterCallBackId[0].filter=DLGC_EVT_CT_A_LINESBAD;
myFilterCallBackId[0].enable=DlgEvent_ENABLE; /*this field can be set to DlgEvent_DISABLE
to disable an individual event filter*/
myFilterCallBackId[1].callback=pHandler;
myFilterCallBackId[1].clientData= (void*)0;
myFilterCallBackId[1].filter=DLGC_EVT_CT_B_LINESBAD;
myFilterCallBackId[1].enable=DlgEvent_ENABLE;
myFilterCallBackId[2].callback=pHandler;
Dialogic® Event Service API for Windows® Library Reference — March 2008 13
Dialogic Corporation
DlgAdminConsumer::DisableFilters( )
return pConsumer;
See Also
• DlgAdminConsumer::DlgAdminConsumer( )
• DlgAdminConsumer::EnableFilters( )
• DlgAdminConsumer::getChannelName( )
• DlgAdminConsumer::getConsumerName( )
• DlgAdminConsumer::StartListening( )
14 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::DlgAdminConsumer( )
DlgAdminConsumer::DlgAdminConsumer( )
Description
Parameter Description
szChannelName determines which event notification channel the consumer object registers
with and monitors for events.
szConsumerName indicates the unique name of the consumer object
pFilters points to an array of filter to event handler object associations.
iFilterCnt indicates the number of elements in the filter to event handler object
association array
Cautions
None
Errors
None
Example
The following example program instantiates a DlgAdminConsumer object that monitors the
CLOCK_EVENT_CHANNEL for incoming events. The DlgAdminConsumer object is named
Dialogic® Event Service API for Windows® Library Reference — March 2008 15
Dialogic Corporation
DlgAdminConsumer::DlgAdminConsumer( )
“ClockMonitor” and contains a pointer to an array of seven event filters (one for each event that is
carried on the CLOCK_EVENT_CHANNEL):
#include <stdio.h>
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
//function prototypes
DlgEventService::DlgAdminConsumer * MonitorClock (ClockHandler *pHandler);
int main ()
{
ClockHandler clockHandler;
DlgEventService::DlgAdminConsumer *pClockConsumer;
while (1)
{
sleep(200);
}
return 0;
}
myFilters[1].callback=pHandler;
myFilters[1].clientData= (void*)0;
myFilters[1].filter=DLGC_EVT_CT_B_LINESBAD;
myFilters[1].enable=DlgEvent_ENABLE;
myFilters[2].callback=pHandler;
myFilters[2].clientData= (void*)0;
myFilters[2].filter=DLGC_EVT_SCBUS_COMPAT_LINESBAD;
myFilters[2].enable=DlgEvent_ENABLE;
myFilters[3].callback=pHandler;
myFilters[3].clientData= (void*)0;
myFilters[3].filter=DLGC_EVT_MVIP_COMPAT_LINESBAD;
myFilters[3].enable=DlgEvent_ENABLE;
16 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::DlgAdminConsumer( )
myFilters[4].callback=pHandler;
myFilters[4].clientData= (void*)0;
myFilters[4].filter=DLGC_EVT_NETREF1_LINEBAD;
myFilters[4].enable=DlgEvent_ENABLE;
myFilters[5].callback=pHandler;
myFilters[5].clientData= (void*)0;
myFilters[5].filter=DLGC_EVT_NETREF2_LINEBAD;
myFilters[5].enable=DlgEvent_ENABLE;
myFilters[6].callback=pHandler;
myFilters[6].clientData= (void*)0;
myFilters[6].filter=DLGC_EVT_LOSS_MASTER_SOURCE_INVALID;
myFilters[6].enable=DlgEvent_ENABLE;
return pConsumer;
}
See Also
• DlgAdminConsumer::DisableFilters( )
• DlgAdminConsumer::EnableFilters( )
• DlgAdminConsumer::getChannelName( )
• DlgAdminConsumer::getConsumerName( )
• DlgAdminConsumer::StartListening( )
Dialogic® Event Service API for Windows® Library Reference — March 2008 17
Dialogic Corporation
DlgAdminConsumer::EnableFilters( )
DlgAdminConsumer::EnableFilters( )
Description
Parameter Description
pFilters points to the array of filters that will be enabled
iCount indicates the size of the filter array that will be enabled
Cautions
The EnableFilters( ) function only applies to filters that were passed to the consumer object during
instantiation.
Errors
None
Example
#include <stdio.h>
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
/*user defined header file that extends the CEventHandlerAdaptor class class and provides an
implementation of CEventHandlerAdaptor::HandleEvent function*/
#include "clockhandler.h"
//function prototypes
DlgEventService::DlgAdminConsumer * MonitorClock (ClockHandler *pHandler);
18 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::EnableFilters( )
ClockHandler clockHandler;
DlgEventService::DlgAdminConsumer *pClockConsumer;
//sync C/C++ Input/Output
ios::sync_with_stdio();
cout <<"Monitoring Clock Channel for events:" <<endl;
pClockConsumer = MonitorClock(&clockHandler);
while (1)
{
sleep(200);
}
return 0;
DlgEventService::DlgAdminConsumer *pConsumer;
myFilterCallBackId[0].callback=pHandler;
myFilterCallBackId[0].clientData= (void*)0;
myFilterCallBackId[0].filter=DLGC_EVT_CT_A_LINESBAD;
myFilterCallBackId[0].enable=DlgEvent_ENABLE; /*this field can be set to DlgEvent_DISABLE
to disable an individual event filter*/
myFilterCallBackId[1].callback=pHandler;
myFilterCallBackId[1].clientData= (void*)0;
myFilterCallBackId[1].filter=DLGC_EVT_CT_B_LINESBAD;
myFilterCallBackId[1].enable=DlgEvent_ENABLE;
myFilterCallBackId[2].callback=pHandler;
return pConsumer;
See Also
• DlgAdminConsumer::DisableFilters( )
• DlgAdminConsumer::DlgAdminConsumer( )
Dialogic® Event Service API for Windows® Library Reference — March 2008 19
Dialogic Corporation
DlgAdminConsumer::EnableFilters( )
• DlgAdminConsumer::getChannelName( )
• DlgAdminConsumer::getConsumerName( )
• DlgAdminConsumer::StartListening( )
20 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::getChannelName( )
DlgAdminConsumer::getChannelName( )
Description
The getChannelName( ) function returns the channel name that a DlgAdminConsumer object
monitors for incoming events. The DlgAdminConsumer object’s associated channel name is
determined by the szChannelName parameter when the object is instantiated
(DlgAdminConsumer::DlgAdminConsumer( ) function).
Refer to Chapter 3, “Events” for a complete list of event notification framework channels.
Cautions
None
Errors
None
Example
#include <stdio.h>
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
//function prototypes
DlgEventService::DlgAdminConsumer * MonitorClock (ClockHandler *pHandler);
Dialogic® Event Service API for Windows® Library Reference — March 2008 21
Dialogic Corporation
DlgAdminConsumer::getChannelName( )
while (1)
{
sleep(200);
}
return 0;
}
myFilters[0].callback=pHandler;
myFilters[0].clientData= (void*)0;
myFilters[0].filter=DLGC_EVT_CT_A_LINESBAD;
myFilters[0].enable=DlgEvent_ENABLE;
myFilters[1].callback=pHandler;
myFilters[1].clientData= (void*)0;
myFilters[1].filter=DLGC_EVT_CT_B_LINESBAD;
myFilters[1].enable=DlgEvent_ENABLE;
myFilters[2].callback=pHandler;
myFilters[2].clientData= (void*)0;
myFilters[2].filter=DLGC_EVT_SCBUS_COMPAT_LINESBAD;
myFilters[2].enable=DlgEvent_ENABLE;
myFilters[3].callback=pHandler;
myFilters[3].clientData= (void*)0;
myFilters[3].filter=DLGC_EVT_MVIP_COMPAT_LINESBAD;
myFilters[3].enable=DlgEvent_ENABLE;
myFilters[4].callback=pHandler;
myFilters[4].clientData= (void*)0;
myFilters[4].filter=DLGC_EVT_NETREF1_LINEBAD;
myFilters[4].enable=DlgEvent_ENABLE;
myFilters[5].callback=pHandler;
myFilters[5].clientData= (void*)0;
myFilters[5].filter=DLGC_EVT_NETREF2_LINEBAD;
myFilters[5].enable=DlgEvent_ENABLE;
myFilters[6].callback=pHandler;
myFilters[6].clientData= (void*)0;
myFilters[6].filter=DLGC_EVT_LOSS_MASTER_SOURCE_INVALID;
myFilters[6].enable=DlgEvent_ENABLE;
return pConsumer;
}
22 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::getChannelName( )
See Also
• DlgAdminConsumer::DisableFilters( )
• DlgAdminConsumer::DlgAdminConsumer( )
• DlgAdminConsumer::EnableFilters( )
• DlgAdminConsumer::getConsumerName( )
• DlgAdminConsumer::StartListening( )
Dialogic® Event Service API for Windows® Library Reference — March 2008 23
Dialogic Corporation
DlgAdminConsumer::getConsumerName( )
DlgAdminConsumer::getConsumerName( )
Description
The getConsumerlName( ) function returns the name of the DlgAdminConsumer object. The
DlgAdminConsumer object name is determined by the szConsumerName parameter when
theDlgAdminConsumer object is instantiated (DlgAdminConsumer::DlgAdminConsumer( )
function).
Cautions
None
Errors
None
Example
#include <stdio.h>
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
//function prototypes
DlgEventService::DlgAdminConsumer * MonitorClock (ClockHandler *pHandler);
24 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::getConsumerName( )
while (1)
{
sleep(200);
}
return 0;
}
myFilters[0].callback=pHandler;
myFilters[0].clientData= (void*)0;
myFilters[0].filter=DLGC_EVT_CT_A_LINESBAD;
myFilters[0].enable=DlgEvent_ENABLE;
myFilters[1].callback=pHandler;
myFilters[1].clientData= (void*)0;
myFilters[1].filter=DLGC_EVT_CT_B_LINESBAD;
myFilters[1].enable=DlgEvent_ENABLE;
myFilters[2].callback=pHandler;
myFilters[2].clientData= (void*)0;
myFilters[2].filter=DLGC_EVT_SCBUS_COMPAT_LINESBAD;
myFilters[2].enable=DlgEvent_ENABLE;
myFilters[3].callback=pHandler;
myFilters[3].clientData= (void*)0;
myFilters[3].filter=DLGC_EVT_MVIP_COMPAT_LINESBAD;
myFilters[3].enable=DlgEvent_ENABLE;
myFilters[4].callback=pHandler;
myFilters[4].clientData= (void*)0;
myFilters[4].filter=DLGC_EVT_NETREF1_LINEBAD;
myFilters[4].enable=DlgEvent_ENABLE;
myFilters[5].callback=pHandler;
myFilters[5].clientData= (void*)0;
myFilters[5].filter=DLGC_EVT_NETREF2_LINEBAD;
myFilters[5].enable=DlgEvent_ENABLE;
myFilters[6].callback=pHandler;
myFilters[6].clientData= (void*)0;
myFilters[6].filter=DLGC_EVT_LOSS_MASTER_SOURCE_INVALID;
myFilters[6].enable=DlgEvent_ENABLE;
return pConsumer;
}
Dialogic® Event Service API for Windows® Library Reference — March 2008 25
Dialogic Corporation
DlgAdminConsumer::getConsumerName( )
See Also
• DlgAdminConsumer::DisableFilters( )
• DlgAdminConsumer::DlgAdminConsumer( )
• DlgAdminConsumer::EnableFilters( )
• DlgAdminConsumer::getChannelName( )
• DlgAdminConsumer::StartListening( )
26 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::StartListening( )
DlgAdminConsumer::StartListening( )
Description
The StartListening( ) function allows the DlgAdminConsumer object to begin monitoring its
associated event notification channel for incoming events. The DlgAdminConsumer object’s
associated event notification channel is determined when the object is instantiated
(DlgAdminConsumer::DlgAdminConsumer( ) function).
Cautions
None
Errors
None
Example
#include <stdio.h>
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
//function prototypes
DlgEventService::DlgAdminConsumer * MonitorClock (ClockHandler *pHandler);
Dialogic® Event Service API for Windows® Library Reference — March 2008 27
Dialogic Corporation
DlgAdminConsumer::StartListening( )
while (1)
{
sleep(200);
}
return 0;
}
myFilters[0].callback=pHandler;
myFilters[0].clientData= (void*)0;
myFilters[0].filter=DLGC_EVT_CT_A_LINESBAD;
myFilters[0].enable=DlgEvent_ENABLE;
myFilters[1].callback=pHandler;
myFilters[1].clientData= (void*)0;
myFilters[1].filter=DLGC_EVT_CT_B_LINESBAD;
myFilters[1].enable=DlgEvent_ENABLE;
myFilters[2].callback=pHandler;
myFilters[2].clientData= (void*)0;
myFilters[2].filter=DLGC_EVT_SCBUS_COMPAT_LINESBAD;
myFilters[2].enable=DlgEvent_ENABLE;
myFilters[3].callback=pHandler;
myFilters[3].clientData= (void*)0;
myFilters[3].filter=DLGC_EVT_MVIP_COMPAT_LINESBAD;
myFilters[3].enable=DlgEvent_ENABLE;
myFilters[4].callback=pHandler;
myFilters[4].clientData= (void*)0;
myFilters[4].filter=DLGC_EVT_NETREF1_LINEBAD;
myFilters[4].enable=DlgEvent_ENABLE;
myFilters[5].callback=pHandler;
myFilters[5].clientData= (void*)0;
myFilters[5].filter=DLGC_EVT_NETREF2_LINEBAD;
myFilters[5].enable=DlgEvent_ENABLE;
myFilters[6].callback=pHandler;
myFilters[6].clientData= (void*)0;
myFilters[6].filter=DLGC_EVT_LOSS_MASTER_SOURCE_INVALID;
myFilters[6].enable=DlgEvent_ENABLE;
return pConsumer;
}
See Also
• DlgAdminConsumer::DisableFilters( )
28 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
DlgAdminConsumer::StartListening( )
• DlgAdminConsumer::DlgAdminConsumer( )
• DlgAdminConsumer::EnableFilters( )
• DlgAdminConsumer::getChannelName( )
• DlgAdminConsumer::getConsumerName( )
Dialogic® Event Service API for Windows® Library Reference — March 2008 29
Dialogic Corporation
CEventHandlerAdaptor::HandleEvent( )
CEventHandlerAdaptor::HandleEvent( )
Description
The application must provide an implementation of the HandleEvent( ) virtual function in order to
receive events from the event notification framework. The HandleEvent( ) function is invoked
when a DlgAdminConsumer object receives an event.
Parameter Description
evMsg points to the actual event (DlgEventMsgType data structure) that is sent
by the supplier object
clientData points to a value that is returned back to the application when the event
handler is invoked
Cautions
None
Errors
Refer to Chapter 6, “Error Codes” for a list of error codes that can be returned by the
HandleEvent( ) function.
Example
The following example provides an implementation of the HandleEvent( ) function for events
received on the CLOCK_EVENT_CHANNEL:
#include <stdio.h>
#ifndef DLG_WIN32_OS
#include <unistd.h>
#include <wchar.h>
#endif
30 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
CEventHandlerAdaptor::HandleEvent( )
#include "dlgeventproxydef.h"
#include "dlgcevents.h"
#include "dlgadminconsumer.h"
#include "dlgadminmsg.h"
cout << " Received Supplier IP = " << pMsg->node << endl;
cout << " Received Event Id = " << pMsg->msgId << endl ;
cout << " Received Msg Size = " << pMsg->payLoadLen << endl;
// Handled
return 0;
}
See Also
None
Dialogic® Event Service API for Windows® Library Reference — March 2008 31
Dialogic Corporation
CEventHandlerAdaptor::HandleEvent( )
32 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Events
3. 3
This chapter provides information about events that are transmitted via the various channels of the
event notification framework. Topics include:
• ADMIN_CHANNEL Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
• BRIDGING_CHANNEL Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
• CLOCK_EVENT_CHANNEL Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
• FAULT_CHANNEL Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
• NETWORK_ALARM_CHANNEL Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Notes: 1. Refer to Chapter 5, “Data Structures” for information about the data structures and payload
formats used by the events.
2. Refer to the Dialogic® Event Service API Programming Guide for information about enabling
applications to receive and handle events.
Dialogic® Event Service API for Windows® Library Reference — March 2008 33
Dialogic Corporation
Events
DLGC_EVT_BLADE_STARTED
Generated immediately after an individual board has been successfully started. The board start
start can be initiated through DCM’s Device > Start Device option or programmatically with
the NCM_StartBoard( ) function.
DLGC_EVT_BLADE_STOPPED
Generated immediately after an individual board has been successfully stopped. The board
stop can be initiated through DCM’s Device > Stop Device option or programmatically with
the NCM_StopBoard( ) function.
DLGC_EVT_SYSTEM_ABOUTTOSTART
Occurs when a Dialogic system start command has been issued (either through the DCM’s
System > Start System option or programmatically with the NCM_StartDlgSrv( ) function).
DLGC_EVT_SYSTEM_ABOUTTOSTOP
Occurs when a Dialogic system stop command has been issued (either through the DCM’s
System > Stop System option or programmatically with the NCM_StopDlgSrv( ) function).
DLGC_EVT_SYSTEM_STARTED
Generated immediately after the Dialogic system has been successfully started. The system
start can be initiated through DCM’s System > Start System option or programmatically with
the NCM_StartDlgSrv( ) function.
DLGC_EVT_SYSTEM_STOPPED
Generated immediately after the Dialogic system has been successfully stopped. The system
stop can be initiated through DCM’s System > Stop System option or programmatically with
the NCM_StopDlgSrv( ) function.
34 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Events
Dialogic® Event Service API for Windows® Library Reference — March 2008 35
Dialogic Corporation
Events
DLGC_EVT_NETREF1_LINEBAD
Indicates that the signal on the CT Bus NetRef1 line has failed.
DLGC_EVT_SCBUS_COMPAT_LINESBAD
Occurs if the SCbus compatibility line fails.
36 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Data Types
4. 4
This chapter contains reference information about the various data types used by the Dialogic®
Event Service API.
The following list contains data types that are defined in the Event Service API:
AUID
Long integer data type that indicates the Addressable Unit Identifier of a system component.
The Dialogic® system software release assigns a unique AUID to each system component with
which communications can be initiated.
ClientDataType
A void* data type that is determined when a DlgAdminConsumer object’s filter array is set.
This value is sent to the event handler when an event is received and returned back to the client
in the callback object.
DlgFilterType
Unsigned long integer data type that identifies the event name for events that are carried on the
event notification framework.
IpAddressStringType
A string (char* data type) that contains the node IP Address of the supplier object.
PayloadDataType
Unsigned character data type for the serialized message that is encoded by the supplier object
and must be decoded by the consumer object via typecasting.
SupplierNameType
A string (wchar_t* data type) that contains the name of the supplier object that generated the
event.
Note: The SupplierNameType data type is for informational purposes only and is subject to
change in future Dialogic system software releases.
Dialogic® Event Service API for Windows® Library Reference — March 2008 37
Dialogic Corporation
Data Types
38 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Data Structures
5. 5
This chapter includes reference information about the data structures that are used by the Dialogic®
Event Service API. Information is provided for the following data structures:
• ClockingFaultMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
• DevAdminEventMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
• DevBridgingEventMsgT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
• DlgEventMsgType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
• NetworkEventMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
• ProcessorFaultMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Dialogic® Event Service API for Windows® Library Reference — March 2008 39
Dialogic Corporation
ClockingFaultMsg — payload format of CLOCK_EVENT_CHANNEL events
ClockingFaultMsg
payload format of CLOCK_EVENT_CHANNEL events
typedef struct ClockingFaultMsgT
{
AUID auid;
short nPhysicalBusNumber;
char szDescription[MAX_EVENT_DESCRIPTION];
} ClockingFaultMsg, *ClockingFaultMsgPtr;
Description
The ClockingFaultMsg data structure defines the payload format of events that are carried on the
CLOCK_EVENT_CHANNEL.
Field Descriptions
40 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
payload format of ADMIN_CHANNEL events — DevAdminEventMsg
DevAdminEventMsg
payload format of ADMIN_CHANNEL events
typedef struct DevAdminEventMsgT
{
AUID auid;
char szDescription[MAX_EVENT_DESCRIPTION];
} DevAdminEventMsg, *DevAdminEventMsgPtr;
Description
The DevAdminEventMsg data structure defines the payload format for events that are carried on
the ADMIN_CHANNEL.
Field Descriptions
Dialogic® Event Service API for Windows® Library Reference — March 2008 41
Dialogic Corporation
DevBridgingEventMsgT — payload format of BRIDGING_CHANNEL events
DevBridgingEventMsgT
payload format of BRIDGING_CHANNEL events
typedef struct DevBridgingEventMsgT
{
AUID auid;
char szDescription[MAX_EVENT_DESCRIPTION]; /*Comment foe second field */
} DevBridgingEventMsg, *DevBridgingEventMsgPtr;
Description
The DevBridgingEventMsgT data structure defines the payload format for events that are carried
on the BRIDGING_CHANNEL.
Note: The DevBridgingEventMsgT data structure is only supported on Dialogic® Host Media Processing
(HMP) Software releases.
Field Descriptions
DlgEventMsgType
generic event message
typedef struct AdminCallbackMsg
{
unsigned long msgId;
wchar_t* supplierName;
char* node;
int payLoadLen;
unsigned char* pPayLoad;
int conversion;
char* description;
char* date;
char* time;
} AdminCallbackMsgType;
Description
Field Descriptions
Dialogic® Event Service API for Windows® Library Reference — March 2008 43
Dialogic Corporation
DlgEventMsgType — generic event message
pPayLoad
pointer to the messages payload data structure. The payload format for events varies according to
the event notification channel that carries the event. Refer to the Dialogic® Event Service API for
Windows Programming Guide for complete information about event notification channels.
conversion
used to indicate if conversion is needed
description
provides a description of the event
date
provides the date the event was sent
time
provides the time the event was sent
44 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
payload format of NETWORK_ALARM_CHANNEL events — NetworkEventMsg
NetworkEventMsg
payload format of NETWORK_ALARM_CHANNEL events
typedef struct NetworkEventMsgT
{
AUID auid;
int externalRef;
short nPhysicalBusNumber;
char szDescription[MAX_EVENT_DESCRIPTION];
} NetworkEventMsg, *NetworkEventMsgPtr;
Description
The NetworkEventMsg data structure defines the payload format for events that are carried on the
NETWORK_ALARM_EVENT channel.
Field Descriptions
Dialogic® Event Service API for Windows® Library Reference — March 2008 45
Dialogic Corporation
ProcessorFaultMsg — payload format of FAULT_CHANNEL events
ProcessorFaultMsg
payload format of FAULT_CHANNEL events
typedef struct ProcessorFaultMsgT
{
AUID auid;
short nProcessorNumber;
char szDescription[MAX_EVENT_DESCRIPTION]
} ProcessorFaultMsg, *ProcessorFaultMsgPtr;
Description
The ProcessorFaultMsg data structure defines the payload format for events that are carried on the
FAULT_CHANNEL.
Field Descriptions
46 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Error Codes
6. 6
This chapter describes the error codes that can be returned by the
CEventHandlerAdaptor::HandleEvent( ) function.
The CEventHandlerAdaptor::HandleEvent( ) can return any one of several integer values. Each
returned integer value is associated with a defined error message. Returned integer values and their
associated error messages are listed and described below:
5000
Equivalent to the DlgEvent_READY message. This message indicates that the consumer
object is ready to receive incoming events.
5001
Equivalent to the DlgEvent_ERROR_INIT message. This message indicates that an error
occurred during initialization of the consumer object.
5002
Equivalent to the DlgEvent_NOT_READY message. This message indicates that the
consumer object has been instantiated but not initialized.
5003
Equivalent to the DlgEvent_CHANNEL_ERROR message. This message indicates that an
error occurred within the consumer object’s associated event channel. Refer to Chapter 3,
“Events” for a list of event channels.
Dialogic® Event Service API for Windows® Library Reference — March 2008 47
Dialogic Corporation
Error Codes
48 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation
Index
A DLGC_EVT_BRIDGE_DEVICE_STOPPED 35
DLGC_EVT_BRIDGE_DEVICE_STOPPING 35
ADMIN_CHANNEL 33
DLGC_EVT_CP_FAILURE 36
array of filters 12, 15
DLGC_EVT_CT_A_LINESBAD 35
AUID 37, 40, 41
DLGC_EVT_CT_B_LINESBAD 35
DLGC_EVT_EXTERNAL_ALARM_RED 36
B DLGC_EVT_EXTERNAL_ALARM_RED_CLEAR 36
bridge device 42 DLGC_EVT_EXTERNAL_ALARM_YELLOW 36
BRIDGING_CHANNEL 35, 42 DLGC_EVT_EXTERNAL_ALARM_YELLOW_CLEAR
36
DLGC_EVT_EXTERNAL_LOSS_OF_SIGNAL 36
C DLGC_EVT_EXTERNAL_LOSS_OF_SIGNAL_CLEAR
CEventHandlerAdaptor 9 36
channel name 21 DLGC_EVT_LOSS_MASTER_SOURCE_INVALID 35
ClientDataType 37 DLGC_EVT_MVIP_COMPAT_LINESBAD 35
CLOCK_EVENT_CHANNEL 35 DLGC_EVT_NETREF1_LINEBAD 36
ClockingFaultMsg 40 DLGC_EVT_SCBUS_COMPAT_LINESBAD 36
DLGC_EVT_SP_FAILURE 36
DLGC_EVT_SYSTEM_ABOUTTOSTART 34
D DLGC_EVT_SYSTEM_ABOUTTOSTOP 34
DevAdminEventMsg 41
DLGC_EVT_SYSTEM_STARTED 34
DevBridgingEventMsgT 42
DLGC_EVT_SYSTEM_STOPPED 34
disable an individual filter 12
DlgEvent_CHANNEL_ERROR 47
DlgAdminConsumer 9
DlgEvent_ERROR_INIT 47
DlgAdminConsumer( ) 15
DlgEvent_NOT_READY 47
dlgadminconsumer.h 9
DlgEvent_READY 47
dlgadminmsg.h 9
DlgEventMsgType 43
DLGC_EVT_BLADE_ABOUT_TO_REMOVE 33
dlgeventproxydef.h 47
DLGC_EVT_BLADE_ABOUT_TOSTART 33
DlgEventService 9
DLGC_EVT_BLADE_ABOUT_TOSTOP 33
DlgFilterType 37
DLGC_EVT_BLADE_DETECTED 33
DLGC_EVT_BLADE_REMOVED 33
DLGC_EVT_BLADE_START_FAILED 33 E
DLGC_EVT_BLADE_STARTED 34 EnableFilters( ) 18
DLGC_EVT_BLADE_STOPPED 34 event handler 15, 30
DLGC_EVT_BRIDGE_DEVICE_DETECTED 35 event payload
DLGC_EVT_BRIDGE_DEVICE_FAILED 35 administrative events 41
DLGC_EVT_BRIDGE_DEVICE_HMP_CLOCK_MASTE clocking events 40
R 35 network alarm events 45
processor fault events 46
DLGC_EVT_BRIDGE_DEVICE_REMOVED 35
DLGC_EVT_BRIDGE_DEVICE_STARTED 35
DLGC_EVT_BRIDGE_DEVICE_STARTING 35
Dialogic® Event Service API for Windows® Library Reference — March 2008 49
Dialogic Corporation
F
FAULT_CHANNEL 36
filter array 12, 15
G
getChannelName( ) 21
getConsumerlName( ) 24
H
HandleEvent( ) 30
I
IpAddressStringType 37
L
listening for events 27
M
monitoring a channel 27
N
namespace 9, 10
NETWORK_ALARM_CHANNEL 36
NetworkEventMsg 45
P
PayloadDataType 37
ProcessorFaultMsg 46
S
StartListening( ) 27
SupplierNameType 37
50 Dialogic® Event Service API for Windows® Library Reference — March 2008
Dialogic Corporation