Dialogic DSI SS7MD Network Card User Manual


 
37
Dialogic
®
DSI SS7MD Programmer’s Manual Issue 3
4.8.2 Static Initialization
Static initialization is handled by the s7_mgt protocol configuration utility. For each T1/E1/J1 Line Interface
Unit (LIU), the user should include an LIU_SC_DRIVE command in the config.txt protocol configuration file.
The LIU_SC_DRIVE command has several parameters. The board_id and liu_id parameters together uniquely
identify the affected LIU. The sc_channel parameter is the channel number of the first channel on the switch
that is to be used for timeslots from the specified LIU. The ts_mask parameter is a mask identifying which
timeslots on the T1/E1/J1 interface are carrying voice circuits (as opposed to signaling) and therefore need
to be connected to the switch. The least significant bit of ts_mask should be 0 when driving from a T1/E1/J1
interface.
As an example, consider a two board system where the first board has four E1 ports and the second board
has four T1 ports (timeslots are numbered on a per board basis).
LIU_SC_DRIVE 0 0 0 0xfffefffe * 30 E1 voice ccts on ts 1..15 & 17..31
LIU_SC_DRIVE 0 1 30 0xfffefffe * 30 E1 voice ccts on ts 1..15 & 17..31
LIU_SC_DRIVE 0 2 60 0xfffefffe * 30 E1 voice ccts on ts 1..15 & 17..31
LIU_SC_DRIVE 0 3 90 0xfffefffe * 30 E1 voice ccts on ts 1..15 & 17..31
LIU_SC_DRIVE 1 0 23 0x00fffffe * 23 T1 voice ccts on timeslots 1..23
LIU_SC_DRIVE 1 1 46 0x00fffffe * 23 T1 voice ccts on timeslots 1..23
LIU_SC_DRIVE 1 2 69 0x00fffffe * 23 T1 voice ccts on timeslots 1..23
LIU_SC_DRIVE 1 3 72 0x00fffffe * 23 T1 voice ccts on timeslots 1..23
4.8.3 Dynamic Operation
The application controls dynamic changes to switching by sending the MVD_MSG_SC_LISTEN message to
the board. This message contains the liu_id (in the range 0 to one less than the number of LIUs), the
timeslot number on the T1/E1/J1 interface and the switch channel number (sc_channel) to which the
timeslot should listen. The message is directed to the correct board by calling the GCT_set_instance( )
function prior to calling the GCT_send( ) function.
When a new call arrives, the application will need to issue two listen commands (although they will not
necessarily both apply to the SS7 board). One connects the voice circuit in the forward direction and the
other connects voice circuit in the backward direction. See Figure 1 on page 36.
4.8.4 Example Code for Building and Sending MVD_MSG_SC_LISTEN Message
The following code demonstrates how to build and send an MVD_MSG_SC_LISTEN message to DSI SS7MD
Board to listen to a switch timeslot.
/*
* Example function for building and sending an MVD_MSG_SC_LISTEN
* message to an SS7 signaling card.
*
* The only change that the user needs to make is to fill in the
* OUR_MOD_ID definition below so that it is equal to the module_id
* of the application module.
*/
#define OUR_MOD_ID (0xef)
#include "system.h" /* Definitions of u8, u16 etc */
#include "msg.h" /* Definitions of HDR, MSG etc */
#include "libc.h" /* Used only for memset prototype */
#include "sysgct.h" /* Prototypes for GCT_xxx */
#include "pack.h" /* Prototypes for rpackbytes */
#include "ss7_inc.h" /* Message & module definitions */
/*
* Macro to generate the value for use in the rsp_req field of the
* message header in order to request a confirmation message:
*/
#define RESPONSE(module) (((unsigned short) 1) << ((module) & 0x0f))
/*
* Function to drive an SCbus / CT Bus timeslot
* onto a timeslot on a PCM port:
*/
int listen_to_scbus(board_id, liu_id, timeslot, sc_channel)
int board_id; /* board_id (0, 1, 2 ...) */
int liu_id; /* PCM port id (0 .. one less than no. of LIUs) */
int timeslot; /* Timeslot on the PCM port (1 .. 31) */
int sc_channel; /* SCbus / CT Bus channel number */
{