Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 467
Dialogic Corporation
/* set GCLIB_ADDRESS_BLK with destination string & type*/
strcpy(gcmkbl.gclib->destination.address,pDestAddrBlk);
gcmkbl.gclib->destination.address_type = GCADDRTYPE_TRANSPARENT;
/* calling the function with the MAKECALL_BLK, and numberstr parameter=NULL
the INVITE dest address will be: 11223344@127.0.0.1 */
gc_MakeCall(ldev, &crn, NULL, &gcmkbl, MakeCallTimeout, EV_ASYNC);
Scenario 2 – Making a SIP call to a known IP address, where the complete address (user@host) is
formed by the combination of the destination address in the makecall block and the phone list
element:
char *pDestAddrBlk = "127.0.0.1"; /*host*/
char *IpPhoneList = "003227124311"; /*user*/
/* insert phone list */
gc_util_insert_parm_ref(&target_datap,
IPSET_CALLINFO,
IPPARM_PHONELIST,
(unsigned char)(strlen(IpPhoneList)+1),
IpPhoneList);
/* set GCLIB_ADDRESS_BLK with destination string & type*/
strcpy(gcmkbl.gclib->destination.address,pDestAddrBlk);
gcmkbl.gclib->destination.address_type = GCADDRTYPE_TRANSPARENT;
gclib_mkbl.ext_datap = target_datap;
/* calling the function with the MAKECALL_BLK, and numberstr parameter = NULL
the INVITE dest address will be: 003227124311@127.0.0.1 */
gc_MakeCall(ldev, &crn, NULL, &gcmkbl, MakeCallTimeout,EV_ASYNC);
Scenario 3 – Making a SIP call to a known IP address, where the complete address (user@host) is
formed by the combination of the destination address in the makecall block, a phone list element,
and optional parameter (user=phone):
char *pDestAddrBlk = "127.0.0.1"; /*host*/
char *IpPhoneList= "003227124311"; /*user*/
char *pDestAddrStr = "user=phone"; /*extra parameter*/
/* insert phone list */
gc_util_insert_parm_ref(&target_datap,
IPSET_CALLINFO,
IPPARM_PHONELIST,
(unsigned char)(strlen(IpPhoneList)+1),
IpPhoneList);
/* set GCLIB_ADDRESS_BLK with destination string & type*/
strcpy(gcmkbl.gclib->destination.address,pDestAddrBlk);
gcmkbl.gclib->destination.address_type = GCADDRTYPE_TRANSPARENT;
gclib_mkbl.ext_datap = target_datap;
/* calling the function with the MAKECALL_BLK, and numberstr parameter = NULL
the INVITE dest address will be: 003227124311@127.0.0.1;user=phone */
gc_MakeCall(ldev, &crn, pDestAddrStr, &gcmkbl, MakeCallTimeout,EV_ASYNC);