Class / File For Trigerring UDR Sending

54 views
Skip to first unread message

Yessica Marianata Susanto

unread,
Mar 13, 2014, 1:40:45 AM3/13/14
to mobicent...@googlegroups.com
Hello all,

I have implemented diameter-openims example in mobicent-jainslee 2.7.0.
I saw that only SNR, SNA, PNR and PNA worked in this example.
SNR and SNA worked when Jboss started
then PNR PNA worked when there is call from alice to bob

So, If I want to send UDR from AS to HSS,
What event that UDR will be sent to HSS?  and
What class or file that will be a triger for this action, because for now I just learn that, only SNA,PNR, UDA, PUA have registered on sbb-jar.xml and event-jar.xml.


Best Regard

Yessica Marianata

Alexandre Mendonça

unread,
Mar 13, 2014, 11:53:44 PM3/13/14
to Mobicents Public
Hi Yessica,

Have a look at http://docs.jboss.org/mobicents/jain-slee/2.7.0.FINAL/resources/diameter-sh-client/user-guide/en-US/html_single/#ratype_sbb_code_examples it has an example. Try to go through docs, there are many things which are explained there ;)

Regards,


--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yessica Marianata Susanto

unread,
Mar 17, 2014, 6:14:12 AM3/17/14
to mobicent...@googlegroups.com
Hi, Alex,
When I tried the example doSimpleTestsSendUDR, appeared this error because of failed casting:

       INFO  [DiameterShClientResourceAdaptor] (pool-29-thread-1) Activity started [Diameter Session ID[mobicents.open-ims.test;324;3480042490]]
       INFO  [DiameterOpenIMSExampleSbb] (pool-29-thread-1)  On TimerEvent: ACI created for basicClientActivity

       ERROR [DiameterOpenIMSExampleSbb] (pool-29-thread-1) Failure trying to create/send UDR.
                    java.lang.ClassCastException: org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl cannot be cast to 
         net.java.slee.resource.diameter.sh.client.ShClientMessageFactory
         at org.mobicents.slee.examples.diameter.openims.DiameterOpenIMSExampleSbb.doSimpleTestsSendUDR(DiameterOpenIMSExampleSbb.java:605)
         at org.mobicents.slee.examples.diameter.openims.DiameterOpenIMSExampleSbb.onTimerEvent(DiameterOpenIMSExampleSbb.java:337)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityImpl.java:481)
         at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQueuedEvent(EventRoutingTaskImpl.java:379)
         at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(EventRoutingTaskImpl.java:126)
         at org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl$EventRoutingTaskStatsCollector.run(EventRouterExecutorImpl.java:73)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:744)


So,  I changed 
       UserDataRequest udr  = ((ShClientMessageFactory)basicClientActivity.getDiameterMessageFactory()).createUserDataRequest();

into
       UserDataRequest udr = ((ShClientMessageFactory)basicClientActivity.getClientMessageFactory()).createUserDataRequest();


But, appeared another error
       INFO  [DiameterShClientResourceAdaptor] (pool-23-thread-1) Activity started [Diameter Session ID[mobicents.open-ims.test;324;3480965648]]
       INFO  [DiameterOpenIMSExampleSbb] (pool-23-thread-1)  On TimerEvent: ACI created for basicClientActivity

       ERROR [DiameterOpenIMSExampleSbb] (pool-23-thread-1) Failure trying to create/send UDR.
       java.io.IOException: Failed to send message, due to: org.jdiameter.api.InternalException: org.jdiameter.api.InternalException: org.jdiameter.api.RouteException: Unable to find valid connection to peer[aaa://127.0.0.1:3868] in realm[open-ims.test]
            at org.mobicents.slee.resource.diameter.sh.client.ShClientActivityImpl.sendUserDataRequest(ShClientActivityImpl.java:120)
            at org.mobicents.slee.examples.diameter.openims.DiameterOpenIMSExampleSbb.doSimpleTestsSendUDR(DiameterOpenIMSExampleSbb.java:624)
            at org.mobicents.slee.examples.diameter.openims.DiameterOpenIMSExampleSbb.onTimerEvent(DiameterOpenIMSExampleSbb.java:337)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityImpl.java:481)
            at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQueuedEvent(EventRoutingTaskImpl.java:379)
            at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(EventRoutingTaskImpl.java:126)
            at org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl$EventRoutingTaskStatsCollector.run(EventRouterExecutorImpl.java:73)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:744)

Best Regard,

Yessica Marianata


DiameterOpenIMSExampleSbb.java

Yessica Marianata Susanto

unread,
Mar 17, 2014, 7:09:15 AM3/17/14
to mobicent...@googlegroups.com
I found it,
the problem is because,
          avps.add(avpFactory.getBaseFactory().createAvp(Avp.DESTINATION_HOST, ("aaa://" +  destinationIP + ":" + destinationPort).getBytes() ));
          avps.add(avpFactory.getBaseFactory().createAvp(Avp.DESTINATION_REALM, destinationRealm.getBytes()));

that result :
            DESTINATION_HOST : aaa://127.0.0.1:3868
            DESTINATION_REALM : open-ims.test

and the correct one is :
avps.add(shAvpFactory.getBaseFactory().createAvp(Avp.DESTINATION_HOST, (destinationHost != null ? destinationHost.getBytes() : ("aaa://" + this.destinationIP + ":" + this.destinationPort).getBytes())));
avps.add(shAvpFactory.getBaseFactory().createAvp(Avp.DESTINATION_REALM, this.destinationRealm.getBytes()));
that make result :
           DESTINATION_HOST : hss.open-ims.test
           DESTINATION_REALM : open-ims.test

I confused, because for me,  hss.open-ims.test is same with aaa://127.0.0.1:3868
Am I lacking something to configure?



Alexandre Mendonça

unread,
Mar 17, 2014, 9:41:25 PM3/17/14
to Mobicents Public
Nop, you're not lacking any config. But destination-host cares about the name, not what it resolves to.. and also, it should not be a uri (such as aaa://127.0.0.1:3868) but a FQDN (like hss.open-ims.test ). The example is not very accurate on that matter.

Glad you got it all working.


Reply all
Reply to author
Forward
0 new messages