I am pretty new to Diameter and I need a test application to imitate HSS behavior and send some diameter requests to the MME on s6a interface.
I have checked out seagull tool but it has some problems as seagull assumes that the client always initiates the request. But in my case, there is a constraint that the MME always initiates the CER request.
I was checking for alternatives and I came across RestComm JDiameter but I have no clue on how to use it. The github repo doesnt provide any information on using it and I couldnt find out any information by googling either.
So kindly guide me on how to use Jdiameter for my application.
JDiameter as a very powerful framework, although quite complex to understand. You especially need to really read carefully through the diameter specs and how the messages and their value types are.
CER and CEA are diameter standard and will work out-of-the-box for JDiameter. So what you basically need to do is:
Setup your project and decide on a server to use for it. I chose wildfly, but had to give it access to some elsewise protected internal java classes (only required for SCTP). Secondly I doubt, that the JDiameter internal thread handling really matches the JEE standard, but at least it works.
include JDiameter as library. In maven terms, this looks like this:
<dependency>
<groupId>org.mobicents.diameter</groupId>
<artifactId>jdiameter-api</artifactId>
<version>1.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mobicents.diameter</groupId>
<artifactId>jdiameter-impl</artifactId>
<version>1.7.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.mobicents.protocols.sctp</groupId>
<artifactId>sctp-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mobicents.diameter</groupId>
<artifactId>mobicents-diameter-mux-jar</artifactId>
<version>1.7.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
Create a working jdiameter-something.xml file for the configuration. You can place it within the resources directory or external of your application, but it needs to be accessible.
If your application will run in an application server and not standalone, create a java class that will be instantiated at startup and initialize the JDiameter stack there. Initializing consists of reading the xml configuration using e.g.
stack = new StackImpl(); Configuration serverConfig = new org.jdiameter.server.impl.helpers.XMLConfiguration(serverConfigInputStream); factory = stack.init(serverConfig);
After that, register the NetWorkReqListeners for your custom messages as well as:
stack.start();
ISessionFactory isf = (ISessionFactory) factory;
isf.registerAppFacory(ServerS6aSession.class, new S6aSessionFactory(1000, factory));