Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB

Showing 1-7 of 7 messages
Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Robertas Mikaitis 3/15/12 7:55 AM
I do not receive ReAuthAnswer and AbortSessionAnswer to SBB.

My event declaration in service:

        <event event-direction="Receive" initial-event="True">
            <event-name>RoCreditControlRequest</event-name>
            <event-type-ref>
                <event-type-
name>net.java.slee.resource.diameter.ro.events.RoCreditControlRequest</
event-type-name>
                <event-type-vendor>java.net</event-type-vendor>
                <event-type-version>0.8</event-type-version>
            </event-type-ref>
            <initial-event-select variable="ActivityContext"/>
        </event>

        <event event-direction="Receive" initial-event="False">
            <event-name>ReAuthAnswer</event-name>
            <event-type-ref>
                <event-type-
name>net.java.slee.resource.diameter.base.events.ReAuthAnswer</event-
type-name>
                <event-type-vendor>java.net</event-type-vendor>
                <event-type-version>0.8</event-type-version>
            </event-type-ref>
            <initial-event-select variable="ActivityContext"/>
        </event>


Log for ReAuthAnswer RECEIVED:
2012-03-15 16:45:00,931 DEBUG
[org.jdiameter.client.impl.transport.tcp.TCPTransportClient] Just read
[120] bytes on [Socket[addr=/10.241.142.73,port=10802,localport=3868]]
2012-03-15 16:45:00,931 DEBUG
[org.jdiameter.client.impl.transport.tcp.TCPClientConnection] Received
message of size [120]
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.controller.PeerImpl] Receive message type
[258] to peer [aaa://10.241.142.73:10802]
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Handling event with type
[RECEIVE_MSG_EVENT]
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Not performing validation
to message since validator is DISABLED.
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Placing message into
linked blocking queue with remaining capacity: [10000].
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Process event
[Event{name:RECEIVE_MSG_EVENT, key:null,
object:MessageImpl{commandCode=258, flags=96}}]. Peer State is [OKAY]
2012-03-15 16:45:00,932 DEBUG [org.jdiameter.server.impl.PeerImpl]
Receiving message in server.
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.controller.PeerImpl] Receiving message in
client.
2012-03-15 16:45:00,932 DEBUG
[org.jdiameter.client.impl.controller.PeerImpl] Message is an answer
2012-03-15 16:45:00,932 DEBUG
[javax.slee.RAEntityNotification[entity=DiameterRo].DiameterRoResourceAdaptor]
Event org.mobicents.slee.resource.FireableEventTypeImpl@3f8c0fcc
filtered




Log for AbortSessionAnswer RECEIVED:
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.transport.tcp.TCPTransportClient] Just read
[120] bytes on [Socket[addr=/10.241.142.73,port=10802,localport=3868]]
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.transport.tcp.TCPClientConnection] Received
message of size [120]
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.controller.PeerImpl] Receive message type
[274] to peer [aaa://10.241.142.73:10802]
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Handling event with type
[RECEIVE_MSG_EVENT]
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Not performing validation
to message since validator is DISABLED.
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Placing message into
linked blocking queue with remaining capacity: [10000].
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.fsm.PeerFSMImpl] Process event
[Event{name:RECEIVE_MSG_EVENT, key:null,
object:MessageImpl{commandCode=274, flags=96}}]. Peer State is [OKAY]
2012-03-15 16:46:00,941 DEBUG [org.jdiameter.server.impl.PeerImpl]
Receiving message in server.
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.controller.PeerImpl] Receiving message in
client.
2012-03-15 16:46:00,941 DEBUG
[org.jdiameter.client.impl.controller.PeerImpl] Message is an answer
2012-03-15 16:46:00,942 DEBUG
[javax.slee.RAEntityNotification[entity=DiameterRo].DiameterRoResourceAdaptor]
Event org.mobicents.slee.resource.FireableEventTypeImpl@f6cfdbe6
filtered
Re: Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Robertas Mikaitis 3/15/12 8:30 AM
Forgot to mention Mobicents SLEE 2.6.0 + Diameter Stack 1.4.0 CR2
> [javax.slee.RAEntityNotification[entity=DiameterRo].DiameterRoResourceAdapt­or]
> [javax.slee.RAEntityNotification[entity=DiameterRo].DiameterRoResourceAdapt­or]
> Event org.mobicents.slee.resource.FireableEventTypeImpl@f6cfdbe6
> filtered
Re: Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Tomek 3/16/12 6:00 AM
Hi
You are trying to catch wrong type of event.
Please  use
"net.java.slee.resource.diameter.ro.events.RoCreditControlAnswer"
instead of "net.java.slee.resource.diameter.base.events.ReAuthAnswer"
Regards
Tomasz
http://arevocom.com
Re: Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Tomek 3/16/12 6:44 AM
Sorry, I misread your problem.
What is exactly the scenario ?
Which way are you sending ReAuthRequests ?
Tomasz
On 16 Mar, 14:00, Tomek <zwi...@gmail.com> wrote:
> Hi
> You are trying to catch wrong type of event.
> Please  use
> "net.java.slee.resource.diameter.ro.events.RoCreditControlAnswer"
> instead of "net.java.slee.resource.diameter.base.events.ReAuthAnswer"
> Regards
> Tomaszhttp://arevocom.com
Re: Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Robertas Mikaitis 3/19/12 1:12 AM
Hello,
This is a piece of code that send reAuthRequest, for abortRequest code
is almost identical:

                RoServerSessionActivity roActivity =
getServiceData().getRoServerSessionActivity();

                ReAuthRequest reAuthRequest =
roActivity.getDiameterMessageFactory().createReAuthRequest();
 
reAuthRequest.setDestinationHost(getServiceData().getRoCreditControlRequest().getOriginHost());
 
reAuthRequest.setDestinationRealm(getServiceData().getRoCreditControlRequest().getOriginRealm());

                long rg =
getServiceData().getRoCreditControlRequest().getMultipleServicesCreditControls()
[0].getRatingGroup();
                DiameterAvp rgAvp =
roActivity.getDiameterAvpFactory().createAvp(432, rg);
                reAuthRequest.setExtensionAvps(rgAvp);

                if
(getServiceData().getRoCreditControlRequest().getMultipleServicesCreditControls()
[0].getServiceIdentifiers() != null
                        &&
getServiceData().getRoCreditControlRequest().getMultipleServicesCreditControls()
[0].getServiceIdentifiers().length > 0)
                {
                    long srvId =
getServiceData().getRoCreditControlRequest().getMultipleServicesCreditControls()
[0].getServiceIdentifiers()[0];
                    DiameterAvp srvIdAvp =
roActivity.getDiameterAvpFactory().createAvp(439, srvId);
                    reAuthRequest.setExtensionAvps(srvIdAvp);
                }
                reAuthRequest.setUserName("test");

                roActivity.sendReAuthRequest(reAuthRequest);

My app acts as server which receives charging requests from GGSN.
After credit limit is recharged ReAuthRequest is send to GGSN for
reauthorization. Response from GGSN is kind of an error type, I get
ReAuthAnswer with RC - DIAMETER_COMMAND_UNSUPPORTED, so maybe this
could be related with this issue. Btw, aci is attached by SBB, so
should be no problem here. Same happens to AbortSessionResponse which
also it has RC - DIAMETER_COMMAND_UNSUPPORTED, so maybe RC code is
somehow related to this issue. Below is event declaration for
ReAuthRequest and AbortSessionRequest, in first post i accidentally
copied piece of declaration for RoCreditControlRequest, sorry.

<event event-direction="Receive" initial-event="False">
            <event-name>ReAuthAnswer</event-name>
            <event-type-ref>
                <event-type-
name>net.java.slee.resource.diameter.base.events.ReAuthAnswer</event-
type-name>
                <event-type-vendor>java.net</event-type-vendor>
                <event-type-version>0.8</event-type-version>
            </event-type-ref>
            <initial-event-select variable="ActivityContext"/>
        </event>

        <event event-direction="Receive" initial-event="False">
            <event-name>AbortSessionAnswer</event-name>
            <event-type-ref>
                <event-type-
name>net.java.slee.resource.diameter.base.events.AbortSessionAnswer</
event-type-name>
                <event-type-vendor>java.net</event-type-vendor>
                <event-type-version>0.8</event-type-version>
            </event-type-ref>
            <initial-event-select variable="ActivityContext"/>
        </event>

Thanks,
Robertas
Re: Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Robertas Mikaitis 3/20/12 8:13 AM
I found the issue - it was wrong application id. Another problem is
that for ReAuthRequest base diameter factory does not allow adding it,
thought it does for AbortSessionRequest.

I had modified source code of:
org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl.java

  public ReAuthRequest createReAuthRequest(DiameterAvp[] avps) throws
AvpNotAllowedException {
    ApplicationId appId = getApplicationId(avps);
    ReAuthRequest msg = (ReAuthRequest)
this.createDiameterMessage(null, avps, Message.RE_AUTH_REQUEST, appId !
= null ? appId : BASE_AUTH_APP_ID);

    // Add Session-Id AVP if not present
    addSessionIdAvp(msg);

    return msg;
  }

So this is same as for AbortSessionRequest, applicationId is retrieved
from provided avps[] array. What should I do this updated code, should
i send it so someone or you will update it in repository?
Just an idea for improvment - maybe it could be added automatically
depending on specific implementing RA type, like "4" for Diameter Ro
Ra in similar manner as sessionId is added?

Another problem - from Huawei GGSN AbortSessionAnswer comes without
AuthAppId it has VendorSpecificAppId instead(inside is correct
AuthAppId avp), I think because of this missing AuthAppId avp event is
not routed back to service and is filtered as previously - ra expect
events according to application id.
Re: [mobicents-public] Re: Diameter Ro Ra. ReAuthAnswer and AbortSessionAnswer not delivered to SBB Alexandre Mendonça 3/28/12 6:00 PM
Hi Robertas,

Please see inline.

Regards,

--
Alexandre Mendonça // JBoss R&D
http://ammendonca.blogspot.com/



On Tue, Mar 20, 2012 at 15:13, Robertas Mikaitis <rob...@gmail.com> wrote:
I found the issue - it was wrong application id. Another problem is
that for ReAuthRequest base diameter factory does not allow adding it,
thought it does for AbortSessionRequest.

I had modified source code of:
org.mobicents.slee.resource.diameter.base.DiameterMessageFactoryImpl.java

 public ReAuthRequest createReAuthRequest(DiameterAvp[] avps) throws
AvpNotAllowedException {
   ApplicationId appId = getApplicationId(avps);
   ReAuthRequest msg = (ReAuthRequest)
this.createDiameterMessage(null, avps, Message.RE_AUTH_REQUEST, appId !
= null ? appId : BASE_AUTH_APP_ID);

   // Add Session-Id AVP if not present
   addSessionIdAvp(msg);

   return msg;
 }

So this is same as for AbortSessionRequest, applicationId is retrieved
from provided avps[] array. What should I do this updated code, should
i send it so someone or you will update it in repository?

You can create an issue here: http://code.google.com/p/mobicents/issues/entry?template=Mobicents%20Diameter%20Template and attach the patch, we will review and apply it.
 
Just an idea for improvment - maybe it could be added automatically
depending on specific implementing RA type, like "4" for Diameter Ro
Ra in similar manner as sessionId is added?

I think that's the best option, as well. The specific message factory should override the method to include proper Application-Id. If you can, please provide such changes.
 

Another problem - from Huawei GGSN AbortSessionAnswer comes without
AuthAppId it has VendorSpecificAppId instead(inside is correct
AuthAppId avp), I think because of this missing AuthAppId avp event is
not routed back to service and is filtered as previously - ra expect
events according to application id.

You can add the specific Application-Id to the RA, so that it will listen to the custom application id. See 
http://docs.jboss.org/mobicents/jain-slee/2.5.0.FINAL/resources/diameter-ro/user-guide/en-US/html/ra.html#ra_configuration