Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 135
Dialogic Corporation
IP-Specific Operations
4.4.3.1 Retrieving Status-Code for 18x Provisional Responses
When using SIP, each GCEV_ALERTING event will have an associated GC_PARM_BLK that
contains the specific status code for the 18x provisional response message in a parameter element
of the following type:
IPSET_SIP_RESPOSNSE_CODE
IPPARM_RECEIVED_RESPONSE_STATUS_CODE
value = 3-digit integer retrieved as Status-Code from Status-Line of the received
provisional message
4.4.3.2 Retrieving Reason-Phrase from 182 and 183 Provisional Responses
The mechanism provided for retrieving the Reason-Phrase for 182 and 183 provisional response
messages is an extension of the generic mechanism for accessing SIP header fields, as described in
Section 4.9, “Setting and Retrieving SIP Message Header Fields”, even though the Reason-Phrase
is not technically a header field.
Applications must first register to receive the Reason-Phrase, using the same technique that is
detailed in Section 4.9.2, “Enabling Access to SIP Header Information”, on page 179. This
registration only needs to be performed once for a board device, and may be performed at any time
during the life of an application.
To register to receive the Reason-Phrase, the application first constructs a GC_PARM_BLK that
contains the following element:
IPSET_CONFIG
IPPARM_REGISTER_SIP_HEADER
value = "Reason-Phrase"
The application then calls gc_SetConfigData( ) with this GC_PARM_BLK to register for
reception of all the header fields that are identified in the parameter block.
When the Dialogic
®
Global Call API library receives a 182 or 183 provisional response, it
generates a a GCEV_ALERTING event that has an associated GC_PARM_BLK to contain extra
data about the event. If the application has previously registered to receive the Reason-Phrase, this
GC_PARM_BLK will contain a parameter element as follows:
IPSET_MSG_INFO
IPPARM_SIP_HDR
value = NULL-terminated string which begins with the string “Reason-Phrase:”
Note: Depending on the list of header fields that the application has registered to receive, the
GC_PARM_BLK associated with the GCEV_ALERTING event may contain multiple parameter
elements that use the IPSET_SIP_MSG_INFO / IPPARM_SIP_HDR ID pair. It is the application’s
responsibility to parse the value strings of these parameter elements to identify the one that begins
with the “Reason-Phrase:” string.