Table of Contents Index NMS Glossary Previous Page Next Page (Page 8 of 12 in this chapter) Version


mgcReportEvent

Description

Informs the MGCP service that a particular event condition has occurred.

Prototype

DWORD mgcReportEvent (CTAHD ctahd,
char *epname,
char *event)

ctahd Context handle associated with the gateway application.

epname Pointer to an endpoint name associated with a registered MGCP endpoint. This name cannot include wild cards.

event Name of the returned event. The name of the event must be specified in the form package/event unless it is an event in the endpoint's default package. If the event is in the endpoint's default package, the event can be specified in the form event.

Return Values

Events

None.

Details

Applications use mgcReportEvent to inform the MGCP service that an event condition has been detected.

If the event is associated with additional data, use parenthesis to specify the data. For example, to indicate that the application has detected an adsi event (returned by the handset extension package) associated with a no caller id display string, the application would specify the following event argument:

H/adsi(no caller id)

Example

char   PkgEvt[80]; // package and event
char   epName[20]; // endpoint name

strcpy(epName,"DS001");
strcpy(PkgEvt,"x-Foobar/a3");

ret = mgcReportEvent(GWctahd, epName, PkgEvt);
// GWctahd = CTA Handle returned from ctaCreateContext
// for the application
if (ret != SUCCESS)
{
 printf("mgcReportEvent returned error 0x%x\n", ret);
 return FAILURE;
}

See Also

mgcDefinePackage, mgcEventDone, mgcEventProcessed



Table of Contents Index NMS Glossary Previous Page Next Page (Page 8 of 12 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, NMS Communications Corporation. All rights reserved.