Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 111
Dialogic Corporation
IP-Specific Operations
SIP_maxUDPmsgLen
Sets a maximum size for UDP messages. If TCP is enabled and the application attempts to
send a message by UDP that exceeds the configured maximum size (default is 1300 as
suggested in RFC3261), TCP transport is automatically used rather than UDP. This size
checking may have an undesirable effect on system performance, and a parameter value is
defined which disables the feature.
E_SIP_DefaultTransport
Sets the default transport protocol for requests when there is no SIP outbound proxy. The
default value sets UDP as the default transport protocol. Setting this parameter to the TCP
value when TCP is not enabled causes a bad parameter error when gc_Start( ) is called. If
TCP is enabled, the application can override the default transport for a specific request by
explicitly setting a “transport= ” parameter in the Request-URI header field before sending the
request.
See the reference page for IP_VIRTBOARD on page 553, for full details on the data structure
fields and values.
4.1.2.1 Configuring TCP Transport
With five configuration items controlling TCP transport, the number of possible configuration
combinations is clearly very large. The tables in this section list the combinations of configuration
parameter settings that are used to achieve various system behaviors. Note that the tables include
entries for the outbound proxy configuration, since the transport configuration differs depending on
whether or not a proxy is enabled, and the SIP message information mask, which must be
configured to allow the application to set the transport for individual requests.
The following code snippet illustrates the general procedure for setting up the IP_VIRTBOARD
structure to enable TCP. This specific example sets up a SIP outbound proxy, enables TCP, and sets
TCP as the default transport protocol for the proxy for a single board. Note that all data structure
fields that are not explicitly set are assumed to contain their default values as configured by the
INIT_IP_VIRTBOARD( ) function.
#include "gclib.h"
..
..
#define BOARDS_NUM 1
..
..
/* initialize start parameters */
IPCCLIB_START_DATA cclibStartData;
memset(&cclibStartData,0,sizeof(IPCCLIB_START_DATA));
IP_VIRTBOARD virtBoards[BOARDS_NUM];
memset(virtBoards,0,sizeof(IP_VIRTBOARD)*BOARDS_NUM);
/* initialize start data */
INIT_IPCCLIB_START_DATA(&cclibStartData, BOARDS_NUM, virtBoards);
/* initialize virtual board */
INIT_IP_VIRTBOARD(&virtBoards[0]);
// Enable SIP Message Info to allow transport selection for individual requests
virtBoards[0].ip_sip_msginfo_mask = IP_SIP_MSGINFO_ENABLE;