我开始玩Mobicents JSS7 - Sigtran ......我正在尝试启动一个sigtran协会。 我有: - 开始sctp - 开始m3ua
据我所知,一旦M3UA启动,sigtran协会应该开始服务器/客户端之间的协商,第一步是" INIT"和" INIT ACK"在SCTP / M3UA级别。 我可以看到客户端发送INIT,但选项参数不是我的预期:
因为比较我有权访问的另一个系统我可以看到INIT的INIT是:
正如您所看到的,我错过了发送" IPv4地址参数"在JSS7 INIT ......在这种情况下,你知道它是否可以配置,我在相同的代码中缺少配置?
欢迎任何帮助。
感谢。
这是我正在尝试的代码:
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);
}
}
答案 0 :(得分:1)
您是否正在运行SCTP服务器?
答案 1 :(得分:0)
从我在SIGTRAN通信中看到的情况来看,应该发送SCTP INIT,并且在你为M3UA发送ASP UP时应该连接SCTP层。
关于套接字的CLOSE状态的一个注释。 Linux SCTP驱动程序中似乎存在一个错误,它在CLOSE状态下挂起套接字。不幸的是,我发现只有两个解决方案。要么等到它超时并从操作系统中清除,要么重新启动操作系统本身。无论哪种更快,都要使用这种方法。