1

我开始玩 Mobicents JSS7 - Sigtran ...我正在尝试启动一个 sigtran 协会。我有: - 启动 sctp - 启动 m3ua

据我所知,一旦 M3UA 启动,sigtran 关联应该开始服务器/客户端之间的协商,第一步是 SCTP/M3UA 级别的“INIT”和“INIT ACK”。我可以看到客户端发送 INIT,但选项参数不是我所期望的:

在此处输入图像描述

因为比较我可以访问的另一个系统的 INIT,我可以看到 INIT 是:

在此处输入图像描述

如您所见,我缺少在 JSS7 INIT 中发送“IPv4 地址参数”...这里?

欢迎任何帮助。

谢谢。

这是我正在尝试的代码:

import org.mobicents.protocols.api.IpChannelType;
import org.mobicents.protocols.sctp.ManagementImpl;
import org.mobicents.protocols.ss7.m3ua.ExchangeType;
import org.mobicents.protocols.ss7.m3ua.Functionality;
import org.mobicents.protocols.ss7.m3ua.IPSPType;
import org.mobicents.protocols.ss7.m3ua.impl.AspImpl;
import org.mobicents.protocols.ss7.m3ua.impl.M3UAManagementImpl;
import org.mobicents.protocols.ss7.m3ua.impl.parameter.ParameterFactoryImpl;
import org.mobicents.protocols.ss7.m3ua.parameter.RoutingContext;
import org.mobicents.protocols.ss7.m3ua.parameter.TrafficModeType;

public class ClientSCTPM3UA2 {

        static String SERVER_NAME = "testserver";
        static String SERVER_IP = "192.168.1.127";
        static int SERVER_PORT = 2906;

        static String CLIENT_IP = "192.168.1.128";
        static int CLIENT_PORT = 2906;

        protected final static int CLIENT_SPC = 1;
        protected final static int SERVET_SPC = 2;

        static String SERVER_ASSOCIATION_NAME = "serverAssociation";
        protected final static String CLIENT_ASSOCIATION_NAME = "clientAsscoiation";

        private static M3UAManagementImpl clientM3UAMgmt;

        public static void main(String[] args) throws Exception {

                IpChannelType ipChannelType = IpChannelType.SCTP;

                ManagementImpl sctpManagement = new ManagementImpl("Client");
                sctpManagement.setSingleThread(true);
                sctpManagement.start();
                sctpManagement.removeAllResourses();
                sctpManagement.setConnectDelay(5000);


                // 1. Create SCTP Association
                sctpManagement.addAssociation(CLIENT_IP, CLIENT_PORT, SERVER_IP, SERVER_PORT, CLIENT_ASSOCIATION_NAME,
                                ipChannelType, null);

                System.out.println("Starting SCTP stack...");

                // mtp3UserPartListener = new Mtp3UserPartBaseImpl();


                clientM3UAMgmt = new M3UAManagementImpl("Client", null);
                //m3uaMgmt.setPersistDir("/tmp");
                clientM3UAMgmt.setTransportManagement(sctpManagement);
                clientM3UAMgmt.setDeliveryMessageThreadCount(2);
                clientM3UAMgmt.start();
                clientM3UAMgmt.removeAllResourses();

                ParameterFactoryImpl factory = new ParameterFactoryImpl();

                RoutingContext rc = factory.createRoutingContext(new long[] { 100l });
                TrafficModeType trafficModeType = factory.createTrafficModeType(TrafficModeType.Loadshare);

                clientM3UAMgmt.createAs("AS1", Functionality.AS, ExchangeType.SE, IPSPType.CLIENT, rc, trafficModeType, 0, null);


                clientM3UAMgmt.createAspFactory("ASP1", CLIENT_ASSOCIATION_NAME);

                AspImpl asp = clientM3UAMgmt.assignAspToAs("AS1", "ASP1");

                clientM3UAMgmt.addRoute(SERVET_SPC, -1, -1, "AS1");

                clientM3UAMgmt.startAsp("ASP1");

                Thread.sleep(60000);

        }

}
4

2 回答 2

1

您是否正在运行 SCTP 服务器?

于 2018-02-12T12:39:21.727 回答
0

从我在 SIGTRAN 通信中看到的情况来看,应该发送 SCTP INIT 并且应该在您为 M3UA 发送 ASP UP 时连接 SCTP 层。

关于套接字的 CLOSE 状态的一个注释。Linux SCTP 驱动程序中似乎存在一个错误,该错误会在关闭状态下挂起套接字。不幸的是,我只找到了两个解决该问题的方法。要么等到它超时并从操作系统中清除,要么重新启动操作系统本身。无论哪个更快,都使用该方法。

于 2018-03-22T04:43:09.040 回答