I am trying to send an SCCP Connection Request using SIGTRAN protocol stack. I am configuring the SCCP layer for connection oriented SCCP using s7_play and the following script file:

M-I0000-t7740-i0000-fef-d33-s00-r8000-p018381063322efef00000001011000ef001c000a0000000000000000000000000000000000000000000000000005000a00000

M-I0000-t5754-i0000-fef-d33-s00-r0000-p000000030000000700000003

M-I0000-t7741-i0001-fef-d33-s00-r8000-p000100000000000200ef000000000000000000000000000000000000000000000000000000000000

M-I0000-t7741-i0002-fef-d33-s00-r8000-p00030d000000000008ef000000000000000000000000000000000000000000000000000000000000

M-I0000-t7741-i0003-fef-d33-s00-r8000-p000200000000000208ef000000000000000000000000000000000000000000000000000000000000

M-I0000-tc744-i0008-fef-d33-s00-r8000-p0101000000000000

With the following values:

000a - num_uc

 

0000 - base_id

0005 - top_id

0000 - min_id

000a - max_id

 

The config files on the sender side are as the following:

config.txt:

 

CNSYS:IPADDR=192.168.100.49,PER=0;

SNSLI:SNLINK=1,IPADDR=192.168.100.140,SNEND=S,SNTYPE=M2PA,M2PA=1,PPORT=3565;

MTP_CONFIG  0  0  0x00000000

MTP_LINKSET  0  2  1  0x0000 1 0x08

MTP_LINK  0  0  0  0  0  1  0  0  0x80000006

MTP_ROUTE  2  0  0x0008

MTP_USER_PART 0x03 0x33

 

system.txt:

 

LOCAL           0x00            * Timer Task

LOCAL           0xef            * s7_log - logs messages

LOCAL           0xcf            * s7_mgt - Management/config task

LOCAL           0xd0            * SCTPD module

LOCAL           0xd1            * SCTP module

LOCAL           0xc1            * M2PA module

LOCAL           0x22            * MTP3 module

LOCAL           0x33            * SCCP module

LOCAL 0x0d * our module

LOCAL 0x5d * s7_play

 

REDIRECT 0x14 0x0d

NUM_MSGS 500                  * Number of standard size messages

*VERIFY

FORK_PROCESS    ./tim

FORK_PROCESS    ./tick

FORK_PROCESS    ./s7_mgt -d

FORK_PROCESS    ./s7_log -fss7.log

FORK_PROCESS    ./sctpd

FORK_PROCESS    ./sctp

FORK_PROCESS    ./m2pa -t

FORK_PROCESS    ./mtp3 -t

FORK_PROCESS    ./sccp -t

 

The connection request I am sending contains only the mandatory calling and called party address parameters. The output trace log is:

 

S7L:I0000 T 00000000 M tc744 i00fc f0d d33 s00 p0101000000000000

S7L:I0000 T 00000000 M tc740 i0000 f0d d33 s00 p040504430200ee04044301000a00

 

And here is the code with which I am trying to send the CR message:

/////////////////////////

 

void sendConnectionReq(u16 modid)

{

    MSF *m;             /* Pointer to message structure */

    u8 *pptr, *p0;      /* Pointer to parameter area of message structure */

 

    int paramlen = 21;

 

    u8 cda[] = {SCPPN_CALLED_ADDR, /*param name*/

                4, /*param len*/

                0x43, /*adr ind*/

                2, /*PC LSB*/

                0, /*PC MSB*/

                0xEE /*SSN*/};

    u8 cga[] = {SCPPN_CALLING_ADDR, /*param name*/

                4, /*param len*/

                0x43, /*adr ind*/

                1, /*PC LSB*/

                0, /*PC MSB*/

                0xA /*SSN*/};

 

    if ((m = getm(SCP_MSG_TX_REQ, 0, 0, paramlen)) != 0) {

        m->hdr.src = (u8) modid;

        m->hdr.dst = SCP_TASK_ID;

        //m->hdr.id = 3; Should I need to set the id here?

        pptr = get_param(m);

        p0 = pptr;

 

        memset((void *) pptr, 0, paramlen);

 

        // Parameter Area 

        // Offset       Size            Name

        //    0         1               Primitive type octet.

        //    1         len - 2         Parameters in Name-Length-Data format.

        // len - 1      1               Set to zero indicating end of message

 

        *pptr++ = SCPPT_N_CONNECT_REQ; //primitive type octet 

        // parameters (page 31 of SCCP-PM)

        memcpy(pptr, cda, sizeof (cda)); // parameter 1, called addr

        pptr += sizeof (cda);

        memcpy(pptr, cga, sizeof (cga)); // parameter 2, calling addr

        pptr += sizeof (cga);        

        *pptr++ = 0; //end of parameters

        m->len = pptr - p0; // Number of bytes of user data (page 29 of SCCP-PM)

        SSM_send_msg(m);

    }

}

 

/////////////////////////

 

I don't know why the SCCP layer is not passing the CR message to the MTP3 layer. Any advice would be appreciated!