Global Call API for HMP on Windows Programming Guide — August 2006 129
Handling Service Requests
10.3 Service Request Data
All information transmitted and received using the Service Request feature is done using the
generic GC_PARM_BLK data structure. Three parameter IDs, under the GCSET_SERVREQ set
ID, are used for all requests and responses:
PARM_SERVICEID (unsigned long)
the service identification number. This is a number assigned by the call control library to
distinguish between requests and is used as follows:
When making a request (gc_ReqService()), ignore this field.
When generating a response (gc_RespService()), this value needs to be set to the same
ID as the ID of the received request (through GCEV_SERVREQ).
When receiving a response (through GCEV_SERVRESP), this field should match the ID
assigned when the request was first made.
PARM _RE QT YPE (in t)
the type of request made. Refer to the appropriate Global Call Technology Guide for the actual
values.
PARM_ACK (short)
the acknowledgement field with the following usage:
When used for a service request, a value of GC_ACK indicates that a response is required,
and a value of GC_NACK indicates that no response is necessary.
When used for a service response, a value of GC_ACK indicates a confirmation, and a
value of GC_NACK indicates a rejection.
Depending on the call control library used, additional parameters may also be used. Refer to the
Global Call API Library Reference for more information about the GC_PARM_BLK data
structure. Before the Service Request feature can be used, a GC_PARM_BLK data structure must
be set up to handle the data associated with the service request. Each request or response is
assigned a Service ID by the call control library and should be used by the application when
generating responses as well as to distinguish among different request and responses. See the
GC_PARM_BLK data structure and utility functions (gc_util_xxx) in the Global Call API Library
Reference for more information on setting up the data structure for the Service Request feature.
Notes: 1. When using the gc_ReqService( ) function, PARM_REQTYPE and PARM_ACK are
mandatory parameters of the GC_PARM_BLK pointed to by the reqdatap function parameter.
2. When using the gc_RespService() function, PARM_SERVICEID is a mandatory parameter of
the GC_PARM_BLK pointed to by the datap function parameter.
10.4 General Service Request Scenario
Figure 33 is a general scenario of how the Service Request feature operates in asynchronous mode.
Since the Service Request feature is generic, the nature of each request and response depends on
the underlying call control library. Refer to the appropriate Global Call Technology Guide for more
information.