Fusion MGCP Service Developer's Reference Manual (60014-12): Function Reference
(Page 12 of 12 in this chapter) Version
mgcUnregisterEndpoint
Description
- Removes an endpoint from the MGCP service registry.
Prototype
- DWORD mgcUnregisterEndpoint (CTAHD ctahd,
char *epname)
- ctahd Context handle associated with the gateway application.
- epname Pointer to an ASCII character string associated with a registered MGCP endpoint. Use the * wild card character to specify multiple endpoints.
Return Values
Events
Details
- This function removes an endpoint from the MGCP service registry. If a call agent then directs a request to this endpoint, the MGCP indicates that the endpoint does not exist.
- Any activity in progress for the endpoint when the application calls mgcUnregisterEndpoint (for example, an active call) is immediately interrupted. If the endpoint is in service at the time of the call, it also generates a RestartInProgress command to the call agent, informing the call agent that the endpoint was taken out of service.
- When specifying the epname argument, applications can use the * wild card to unregister multiple endpoints at a once.
- Whenever possible, explicitly take endpoints out of service with mgcSetEndpointServiceState before unregistering them
Example
char epName[20]; // endpoint name
strcpy(epName,"DS001");
// Unregister endpoint with MGCP Service
ret = mgcUnregisterEndpoint (GWctahd, epName);
// GWctahd = CTA Handle returned from ctaCreateContext
// for the application
if (ret != SUCCESS)
{
printf ("UnRegisterEndpoint %s returned error 0x%x\n", epName, ret);
}
// Now wait for done event
ctaWaitEvent( ctaquehd, &event, CTA_WAIT_FOREVER );
// Check the reason code
if ( event.id != MGCEVN_UNREGISTER_ENDPOINT_DONE ||
event.value != CTA_REASON_FINISHED)
{
printf("mgcUnregisterEndpoint() %s event failed, REASON=%x", epName, event.value);
return FAILURE;
}
See Also
- mgcRegisterEndpoint, mgcSetEndpointServiceState
(Page 12 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.