(Page 11 of 12 in this chapter) Version
mgcSignalProcessed
Description
- Informs the MGCP service that the application has initiated the process of generating a signal.
Prototype
- DWORD mgcSignalProcessed (CTAHD ctahd,
int requestid,
char *epname,
int response_code,
char *comment)
- ctahd Context handle associated with the gateway application.
- requestid A signal identifier specified in the associated MGCEVN_SIGNAL_ON_REQUEST or MGCEVN_SIGNAL_OFF_REQUEST event.
- epname Pointer to the name of the endpoint on which the signal was processed. This name cannot include wild cards.
- response_code A response code returned to the call agent that requested the signal.
- comment Pointer to optional comment information to attach to the response. Setting this value to NULL indicates that there are no comments.
Return Values
Events
Details
- The MGCP service processes signals by either turning it on or turning it off, depending on what was requested in the MGCP event that provided the request identifier.
- The application receives the requestid identifier with the MGCEVN_SIGNAL_ON_REQUEST or MGCEVN_SIGNAL_OFF_REQUEST events. The MGCP service uses this identifier to deduce which signal was processed and which call agent requested the signal. After the signal is processed, the MGCP service sends an acknowledgement to the appropriate call agent that requested the signal.
- After receiving a MGCEVN_SIGNAL_OFF_REQUEST event, the MGCP service will only notify the call agent that the signal has been generated when the application invokes mgcSignalDone.
Example
char epName[20]; // endpoint name
int iResponseCode; // MGCP response code
char ResponseString[30]; // (optional) commentary
int rqstID; // request id from prior MGCEVN
CTAHD ctahd; // CTA handle from prior MGCEVN
strcpy(epName,"DS001");
iResponseCode = 200;
strcpy(ResponseString,"OK");
// From the MGCEVN_SIGNAL_ON_REQUEST event or
// MGCEVN_SIGNAL_OFF_REQUEST
// that preceeded this, we have
// EvtSgnlRequest = (MGC_EVENT_SIGNAL_REQUEST *)event.buffer;
// rqstID = EvtSgnlRequest->requestid;
// also
// ctahd = event.ctahd
ret = mgcSignalProcessed (ctahd, rqstID, epName, iResponseCode, ResponseString);
if (ret != SUCCESS)
{
printf("mgcSignalProcessed returned error 0x%x\n", ret);
return FAILURE;
}
See Also
- mgcDefinePackage, mgcSignalDone
(Page 11 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.