Open franzgranlund opened 1 day ago
Hi @franzgranlund The JDiameter stack is quite sensitive regarding its configuration and will silently ignore requests if not correctly configured.
You can start by increasing the "org. diameter" log level to TRACE and check if the requests are not rejected.
quarkus.log.category."org.jdiameter".level=WARN
Starting the stack is done automatically by the quarkus-jdiameter extension. Your application will listen on port 3868 if the stack is successfully started.
Thank you for your answer @eddiecarpenter .
So basically it should start, if I have the correct config, by just having the CdfDiameterService.java?
@DiameterService
@DiameterServiceOptions("test1")
public class CdfDiameterService implements ServerRfSessionListener {
@Override
public void doRfAccountingRequestEvent(ServerRfSession appSession, RfAccountingRequest request) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
Log.info("CdfDiameterService ---- doRfAccountingRequestEvent");
}
@Override
public void doOtherEvent(AppSession session, AppRequestEvent request, AppAnswerEvent answer) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
Log.info("CdfDiameterService ---- doOtherEvent");
}
}
Also, should I use
@DiameterServiceOption(config = "test1")
or
@DiameterServiceOptions("test1")
?
Hi @franzgranlund ,
The diameter service is registered by adding the @DiameterService annotation to the class. The interceptor behind the annotation will do all the work of registering the service, hooking it into the Quarkus shutdown service, and so on. The interface that you implement determines which diameter service you are implementing. In your case, you are implementing a RF Server. For example, if you want to implement a DCCA then you would implement the ServerCCASessionListener interface. There is a list of all the supported interfaces in the documentation.
The @DiameterServiceOption annotation is used to pass options to the interceptor, the most relative option being the configuration profile it should use. Note, that if used a default config (without the "test1." component, then you do not need to provide the @DiameterServiceOption annotation.
I see that the documentation was slightly outdated as I have changed the "config" attribute to "value". So, the correct format is
@DiameterServiceOptions("test1")
I have updated the documentation.
Hi,
So I'm quite new to both Quarkus and jdiameter so I'm sorry if there is something I'm totally missing.
My goal is to create the most simple Diameter Rf Server. I followed the Implementing Diameter Service and got both Quarkus and the dependencies working and compiling.
I created a class CdfDiameterService.java like this:
I added to application.properties:
Everything compiles but the diameter stack doesn't seem to start. Should it just work with only this?
I then tried creating a class CdfStack.java:
If I uncomment stack.start() and stack.stop() / stack.destroy() then the diameter stack seem to start according to logs. I can even connect to it with a diameter client. But then the CdfDiameterServices doesn't seem to listen/trigger.
What am I doing wrong? I appreciate all the help I can get.