| CONTACT | DEVELOPER CENTER | PARTNERS | SITEMAP
GO
Useful Links
  • Search Helpweb
    
    

Dialogic Support Helpweb

Dialogic® Host Media Processing (HMP) Software

How to set the correct parameters for gc_Start( ) with Dialogic® Host Media Processing (HMP) Software

Key Task: 
If you choose to run applications on Dialogic® Host Media Processing (HMP) Software using the Dialogic® IP stack (either SIP or H.323) where IP resources will be used through the Dialogic® Global Call API, then gc_Start( ) should be called with the correct parameter values for the number of IP channels and the protocol (SIP or H.323).

Reason For Usage:
Applications running on Dialogic HMP Software using the Dialogic IP stack (SIP, H323) and the Dialogic Global Call (GC) layer must call gc_Start( ) to load the call control libraries.  In its basic implementation, gc_Start( ) can be called with the parameter NULL; however, if this is done, the following assumptions are made by the Global Call layer:

1. The Dialogic call control libraries that can be loaded up are loaded. 
    --  Generally, this is unnecessary.

2. Only 120 IP channels (IPT channel devices) are enabled. 
    --  This creates a potential issue if the user has a license with an IP resource count greater than 120: gc_OpenEx( ) will succeed on devices from iptB1T1 to iptB1T120 but will fail on iptB1T121 upwards.

3.  IP traffic uses the default Ethernet NIC in the system.
    -- the user may wish to specify the NIC that is used.

4.  Both SIP and H323 stacks are loaded up.
    --  Generally, users will be using either SIP or H.323, but not both, so resources are allocated that will not be used.

Solution:
Override the defaults so that the proper channel count is loaded up, the right settings are initialized, such that unnecessary overhead is avoided by calling gc_Start( ) with a properly initialized instance of GC_START_STRUCT. 

Below is a code snippet of how gc_Start( ) could be called in an application that used the default values:
/* Start GlobalCall */ if (gc_Start(NULL) != GC_SUCCESS) { 
    printf("gc_Start(startp = NULL) Failed"); 
    /* process error */
}
else {
    printf("gc_Start(startp = NULL) Succeeded");
}

The first step in changing this is to create the  data structure instances and variables required:
 
IPCCLIB_START_DATA cclibData;
IP_VIRTBOARD virtBoard;
GC_START_STRUCT gcLibStart;
CCLIB_START_STRUCT ccLibStart[] =
{ 
    {"GC_IPM_LIB",NULL} ,
    {"GC_H3R_LIB",&cclibData},
    {"GC_DM3CC_LIB",NULL} 
};

Then, initialize the instance of the IP_VIRTBOARD structure created above with the default values:
INIT_IP_VIRTBOARD(&virtBoard);
Next, you can set the variables of the data structure instances created above.


1. Set the required maximum number of IP channels for each call control stack: 
virtBoard.total_max_calls = 192;
virtBoard.h323_max_calls = 0;
virtBoard.sip_max_calls = 192;
 
In the settings above, 192 SIP channels and 0 (zero) H323 channels are specified.  By default, the three values above would each be set to 120.


2.  To specify the Ethernet NIC to be used along with its IP address set the following:
virtBoard.localIP.ip_ver = IPVER4; 
virtBoard.localIP.u_ipaddr.ipv4 = 0x1014A8C0;  /*IP_CFG_DEFAULT*/ 

The two values above are for accessing an instance of IP_ADDR structure that is contained within the instance of IP_VIRTBOARD.  For the variable ip_ver only IPVER4 is an option.  IP addressing via IPV6 is not supported.  u_ipaddr is a union of either ipv4 or ipv6.  Since IPV4 is the only one supported, the value given for u_ipaddr.ipv4 gives the system the IP address of the Ethernet NIC being used.  If this is set to IP_CFG_DEFAULT then it will use the first logical NIC available in the system.  If not then this value can be set using the network byte order (big endian) format.  

The setting above of 0x1014A8C0 correlates to the IP address: 192.168.20.16  as follows:
10 = Decimal 16
14 = Decimal 20
A8 = Decimal 168
C0 = Decimal 192


3.  Set the SIP or H323 ports used:
virtBoard.h323_signaling_port = 1720; /* if H323 */
virtBoard.sip_signaling_port = 5060;  /* if SIP */

4. Initialize the IPCCLIB_START_DATA instance:
INIT_IPCCLIB_START_DATA(&cclibData, 1, &virtBoard);

5. Finally, set up the GC_START_STRUCT instance to know how many libraries to load along with the data we specified above:
gcLibStart.cclib_list = ccLibStart;
gcLibStart.num_cclibs = 3;

Now gc_Start( ) can be called:
if(gc_Start(&gcLibStart) == -1)
{
    printf("gc_Start() failed\n");
    /* process error */
}
else
{
    printf("gc_Start() failed\n");    
}
In the above example, the IPM, DM3CC, and GC_H3R libraries have been initialized with 192 SIP channels, using the NIC with IP address = 192.168.20.16, and using SIP port 5060.

Glossary of Acronyms/Terms:

NIC -- Network Interface Card
IPM -- IP Media
DM3CC -- Dialogic® DM3 Call Control Library
GC_H3R -- Dialogic® IP Call Control Library and Stack
SIP -- Session Initiation Protocol
H323 -- Q.931 IP Based Call Control Protocol
IP -- Internet Protocol
IPT -- Dialogic® HMP IP Call Control Devices


Product List: 
Dialogic® Host Media Processing (HMP) Software 




Feedback

Please rate the usefulness of this page:  

0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page: