Dialogic Dialogic Global Call IP IP Phone User Manual


 
466 Dialogic
®
Global Call IP Technology Guide — November 2007
Dialogic Corporation
Variance for SIP
The format of the destination address for a SIP call is:
user@host; param=value
with the elements representing:
user
a user name or phone number
host
a domain name or an IP address
param=value
an optional additional parameter
When making a SIP call, the destination address is formed according to the following rules in the
order of precedence shown:
1. If Phone List (as described in Table 35, “Configurable Call Parameters When Using SIP”, on
page 464 and identified by IPSET_CALLINFO, IPPARM_PHONELIST) exists, it is taken to
construct the global destination-address-string.
2. If the destination address field (of type GCLIB_ADDRESS_BLK in
GCLIB_MAKECALL_BLK) exists, it is taken to construct the global destination-address-
string. The address_type in GCLIB_ADDRESS_BLK is ignored. If the global destination-
address-string is not empty before setting the parameter, an “@” delimiter is used to separate
the two parts.
3. If the numberstr parameter from the gc_MakeCall( ) function exists, it is taken to
destination-address-string. If the global destination-address-string is not empty before setting
the parameter, a “;” delimiter is used to separate the two parts.
Note: To observe the logic described above, the application may use only one of the APIs to send a string
that is a valid SIP address.
The following code examples demonstrate the recommended ways of forming the destination
string when making a SIP call. Prerequisite code for setting up the GC_MAKECALL_BLK in all
the scenarios described in this section is as follows:
GC_MAKECALL_BLK gcmkbl;
GCLIB_MAKECALL_BLK gclib_mkbl = {0};
gcmkbl.cclib = NULL;
gcmkbl.gclib = &gclib_mkbl;
GC_PARM_BLK *target_datap = NULL;
gc_util_insert_parm_val(&target_datap,
IPSET_PROTOCOL,
IPPARM_PROTOCOL_BITMASK,
sizeof(char),
IP_PROTOCOL_SIP);
Scenario 1 – Making a SIP call to a known IP address, where the complete address (user@host) is
specified in the makecall block:
char *pDestAddrBlk = "11223344@127.0.0.1"; /* where "11223344" is the
phone number of the user
and "127.0.0.1" is the
IP address of the host */