Dialogic Dialogic Global Call IP IP Phone User Manual


 
136 Dialogic
®
Global Call IP Technology Guide — November 2007
Dialogic Corporation
IP-Specific Operations
4.4.4 SIP Redirection (3xx) Response Messages
RFC 3261 defines the 3xx range of responses as redirection messages, which can be used by the
called party’s server to push alternative routing information back to the originator of an INVITE
request. This allows the server to provide information that is useful in locating the target of the
request while also taking itself out of the loop for further messaging for the transaction. When the
originator of the INVITE request receives a 3xx response, it cancels the original request and issues
one or more new requests based on the URI(s) and transport parameters contained in the response.
The supported redirection status codes include:
301 (Moved Permanently)
302 (Moved Temporarily)
305 (Use Proxy)
4.4.4.1 Redirecting an Incoming Call
To redirect an incoming call, the application first prepares a CG_PARM_BLK that contains the
alternative contact information to be sent to the originator in the Contact header, then calls
gc_SetUserInfo( ) to set the parameters for the next message. After the parameters are set the
application calls gc_DropCall( ) for the CRN to send the 3xx response; the specific response code
that is used is specified via the cause parameter using the IPEC_SIPReasonStatus3xx values that
are defined in gcip_defs.h.
When preparing the parameter block for a redirection response, the application inserts one or more
of the following parameter elements into a GC_PARM_BLK:
IPSET_SIP_MSGINFO
IPPARM_SIP_HDR
value = complete Contact header string, starting with “Contact:”
Note: The use of the deprecated IPSET_SIP_MSGINFO / IPPARM_CONTACT_URI parameter ID pair
is not recommended because this ID pair only provides access to the URI portion of the Contact
header (i.e., without the display string and any parameters), and can only set a single URI. If the
GC_PARM_BLK contains one or more IPSET_SIP_MSGINFO / IPPARM_SIP_HDR parameter
elements, any element using IPSET_SIP_MSGINFO / IPPARM_CONTACT_URI will be ignored.
If any specific Contact string being set by the application is longer than 255 bytes, the application
must use the extended gc_util_insert_parm_ref_ex( ) function; if the data is less than 255 bytes in
length, either gc_util_insert_parm_ref( ) or gc_util_insert_parm_ref_ex( ) can be used.
If the application sets more than one Contact header parameter element in the GC_PARM_BLK,
the call control library automatically combines then into a single Contact header in a comma-
separated value list that reflects the order in which the application specified the separate Contact
headers.
RFC 3261 provides detailed information about rules and restrictions for Contact header fields in
redirection responses, but a few basic rules are presented here for convenience:
The Contact header field contains URIs that specify new locations, new user names, or
additional transport parameters.