我开始玩Mobicents JSS7 - Sigtran...我正在尝试启动sigtran关联。我已经:-启动了sctp -启动了m3ua
据我所知,一旦M3UA启动,sigtran关联就应该启动服务器/客户端之间的协商,第一步是SCTP/M3UA级别的"INIT“和"INIT ACK”。我可以看到客户端发送INIT,但是选项参数不是我所期望的:
因为比较我访问的另一个系统的INIT,我可以看到INIT是:
正如您所看到的,我没有在JSS7初始化中发送"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);
}
}
发布于 2018-02-12 12:39:22
您是否正在运行SCTP服务器?
发布于 2018-03-22 04:43:09
根据我在SIGTRAN通信中所看到的,SCTP INIT应该被发送,并且SCTP层应该在您为M3UA发送ASP时被连接。
一个关于插座关闭状态的说明。Linux SCTP驱动程序中似乎存在一个错误,它会在关闭状态下挂起套接字。不幸的是,对于这个问题我只找到了两种解决方案。要么等到它超时并从操作系统中清除,要么重新启动操作系统本身。无论哪种方法更快,都可以使用该方法。
https://stackoverflow.com/questions/48697603
复制相似问题