Previous PageTable Of ContentsHomeIndexNext Page



5.2.  Shared Voice Resources

Applications requiring voice resources for a limited portion of the call, typically during call setup, may share voice resources among the available network time slots. For example, using a D/320SC voice board and two DTI/300SC (E-1 interface) network boards, 32 voice channels may be able to handle the audio portions of the call control for 60 network interface time slots. This savings in hardware requires more complexity in writing the application, which must manage both the voice and network resources, and places limits on your call throughput. The number of calls that can be established simultaneously is limited to the number of voice resources in the system.

For voice resource sharing configurations, you need only specify the network time slot and protocol in the gc_OpenEx( ) function. This function uses the Global Call library to open the network time slot device. Your application must also open the voice device and then route and attach the necessary resources before these resources are needed for signaling. You must explicitly open the voice device by issuing a dx_open( ) function to open the voice device selected. For routing these devices, use the native time slot routing functions or the CT Bus nr_scroute( ) and nr_scunroute( ) functions provided for the voice and network devices. For example, route the devices using the routing functions provided by the network and voice libraries, and then use the gc_Attach( ) and gc_Detach( ) functions to associate or disassociate a voice channel and a Global Call line device and therefore a network time slot. When the above sequence of operations completes, use the gc_MakeCall( ) or gc_WaitCall( ) function, as appropriate.

After a call is answered, the voice resource can be detached from the network time slot using the gc_Detach( ) function and routed to another network time slot using the nr_scunroute( ) and nr_scroute( ) functions.

The following example illustrates the function calls that apply when using shared voice resources.

    1 ---->
       
    if (gc_OpenEx(&linedev, ":N_dtiB1T1:P_br_r2_o, 0,   
       (void*)&port[port_index]) == GC_SUCCESS) {  
                 /* process error */
    
      
    }
   
2 ---->
       
    if (gc_GetNetworkH(linedev, &networkh) != GC_SUCCESS)  
    {  
                 /* process error */
      
    }
   
3 ---->
       
    if ((voiceh = dx_open("dxxxB1C1", 0)) == -1)   
    {  
                /* process error */
      
    }
   
4 ---->
       
    printf("******* %d: Calling Attach %d\n", index, voiceh);  
    if (gc_Attach(linedev, voiceh, EV_SYNC) != GC_SUCCESS)   
    {  
                 /* process error */
      
    }
   
5 ---->
       
    if (nr_scroute(networkh, SC_DTI, voiceh, SC_VOX,  
           SC_FULLDUP) == -1)   
        {  
                   /* process error */
      
        }
 
      /* Wait for GCEV_UNBLOCKED event */
   
6 ---->
       
    if (gc_MakeCall(linedev, &crn, "123456", NULL, 0, EV_ASYNC)   
              != GC_SUCCESS)   
        {  
                  /* process error */  
        }  
    .  
    .  
    /*  
     * Wait for GCEV_CONNECTED event. Voice resource may be detached  
     * if necessary after receiving this event.
      
     */
   
7 ---->
       
    if (gc_Detach(linedev, voiceh, EV_SYNC) != GC_SUCCESS)   
        {  
                 /* process error */
      
        }
   
8 ---->
       
    if (nr_scunroute(networkh, SC_DTI, voiceh, SC_VOX, SC_FULLDUP) == -1)  
    {  
                 /* process error */
      
    }
   

Legend:

1

The gc_OpenEx( ) function:

  • opens a Global Call line device using time slot 1 of dtiB1 using outbound Brazilian R2 protocol
  • opens the network board device automatically, if not already opened
  • sets the user attribute, usrattr, (void*)&port[port_index] into the channel information structure

The specified network time slot device is opened. This function need only be called once for a time slot.

2

The gc_GetNetworkH( ) function retrieves network device handle.

3

The dx_open( ) function opens voice device and gets voice device handle.

4

The gc_Attach( ) function logically connects voice and network resources.

5

The nr_scroute( ) function routes voice and network resources together.

6

The gc_MakeCall( ) function is invoked each time a call is to be made.

7

The gc_Detach( ) function disassociates the voice resource from the Global Call line device.

8

The nr_scunroute( ) function unroutes the voice and network resources.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated February, 2003