【发布时间】:2018-07-19 17:43:03
【问题描述】:
我开始使用 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);
}
}
【问题讨论】:
-
大家好......我已经更新了问题文本描述,其中包含更多详细信息以及以某种方式工作的代码,但它并没有给我我对 Sigtran/SCTP "INIT" 的期望" 和 "INIT ACK" 启动程序。欢迎就此事提供任何帮助。
标签: java restcomm sctp mobicents