Diameter GX - need extra AVPs

261 views
Skip to first unread message

Paolo Fenaroli

unread,
Aug 19, 2014, 10:56:20 AM8/19/14
to mobicent...@googlegroups.com
Hi,

I'm currently developing a small GX server.
This is the scenario:





































I've managed to implement the architecture, but I'm stuck with the valorization of the avps.

On receiving a CCR, gotten the Qos, where should I put Qos value?
The ETSI specification on which diameterGx is based (6.7.0 - ts_129210v060700p) doesn't provide it,
while in the latter (7.4.0 - ts_129212v070400p) there's a specific avp named [ QoS-Information ].


There's a workaround for this situation?


Bartosz Baranowski

unread,
Aug 19, 2014, 1:43:41 PM8/19/14
to mobicent...@googlegroups.com
As far as I grasp RFCs and dime docs,  in "*[ AVP ]" ? iirc proxies musy copy AVPs that they dont understand, hence, if your endpoint does swallow QOS, it will get it.

Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.


--
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.

Paolo Fenaroli

unread,
Aug 20, 2014, 6:17:45 AM8/20/14
to mobicent...@googlegroups.com
Hi Bartosz,
Thanks for your reply.

I'm not sure I've understand what you've said, but in my case the "back end" (AS in the picture)  returns to  Mobicents a QoS that is a string. My duty is to put somewhere this value in the aswer, a CCA diameter message, and send back to seagull.
So my question is: given that a QoS avp is not present, there's a workaround to it?


Thanks again

Alexandre Mendonça

unread,
Aug 20, 2014, 6:40:10 PM8/20/14
to Mobicents Public
Hi Paolo,

If I got right your issue (and assuming you are using SLEE), you should be able to insert custom AVPs with a little workaround:

Message m = ((DiameterMessageImpl)ccr).getGenericData();
AvpUtilities.setAvpAsGrouped(m, 1016, m.getAvps(), DiameterAvp[]);

​Hope it helps.
Regards,

Paolo Fenaroli

unread,
Aug 21, 2014, 4:32:27 AM8/21/14
to mobicent...@googlegroups.com
Hi Alexandre,

Yes I'm using SLEE.

Here's a piece of code to clarify the issue:
//get IMSI from the request(CCR)
String imsi = request.getSubscriptionIds()[0].getSubscriptionIdData();
//retrieve QoS from web service
String resultQOS = binding.callPCRFInterface("CCR_I",imsi);
//set the QoS in answer - setQoSInformation instruction doesn't exist
answer.setQoSInformation(avpFactory.createAvp(Avp.QOS_INFORMATION,resultQOS.getBytes()));
//send the answer to client (seagull)

The last method doesn't exist, in fact a gx CCA is defined as (extracted from ETSI 3GPP TS 29.210 version 6.7.0 Release 6 19 ETSI TS 129 210 V6.7.0 (2006-12))
<CC-Answer> ::= < Diameter Header: 272, PXY >
< Session-Id >
{ Auth-Application-Id }
{ Origin-Host }
{ Origin-Realm }
[ Result-Code ]
[ Experimental-Result ]
{ CC-Request-Type }
{ CC-Request-Number }
*[ Event-Trigger ]
[ Origin-State-Id ]
*[ Charging-Rule-Remove ]
*[ Charging-Rule-Install ]
[ Charging-Information ]
[ Error-Message ]
[ Error-Reporting-Host ]
*[ Failed-AVP ]
*[ Proxy-Info ]
*[ Route-Record ]
*[ AVP ]

while a latter revision of the documet (ETSI 3GPP TS 29.212 version 7.4.0 Release 7 40 ETSI TS 129 212 V7.4.0 (2008-04)) introduces thee Qos-Information field:
<CC-Answer> ::= < Diameter Header: 272, PXY >
< Session-Id >
{ Auth-Application-Id }
{ Origin-Host }
{ Origin-Realm }
[ Result-Code ]
[ Experimental-Result ]
{ CC-Request-Type }
{ CC-Request-Number }
[ Bearer-Control-Mode ]
*[ Event-Trigger ]
[ Origin-State-Id ]
*[ Charging-Rule-Remove ]
*[ Charging-Rule-Install ]
[ Charging-Information ]
[ Online ]
[ Offline ]
*[ QoS-Information ]
[ Error-Message ]
[ Error-Reporting-Host ]
*[ Failed-AVP ]
*[ Proxy-Info ]
*[ Route-Record ]
*[ AVP ]

So my question is:
Can I achieve the QoS retrieving and passing with the implemented version of GX protocol?
Or is there another field that can do the job?
Or maybe a workaround?

Thank you,
Paolo

Bartosz Baranowski

unread,
Aug 21, 2014, 5:16:05 AM8/21/14
to mobicent...@googlegroups.com

Paolo Fenaroli

unread,
Aug 21, 2014, 5:31:11 AM8/21/14
to mobicent...@googlegroups.com
the method that doesn't exists is
GxCreditControlAnswer.setQoSInformation()

sorry if it wasn't clear

Alexandre Mendonça

unread,
Aug 22, 2014, 7:07:21 PM8/22/14
to Mobicents Public
Paolo,

Yes the method is not available, so you can either use what I suggested to add the AVPs or, more correctly, what Bartosz suggested, with setExtensionAvps: answer.setExtensionAvps(avpFactory.createAvp(..)). Is this not what you are asking for ?

Regards,

Paolo Fenaroli

unread,
Aug 25, 2014, 7:03:05 AM8/25/14
to mobicent...@googlegroups.com
Thank you very much,
I think I'm getting the hang of it.

I've changhed approach and I've ended up with this:

 public static final int TGPP = 10415;

avps.add(avpFactory.createAvp(TGPP,Avp.QOS_CLASS_IDENTIFIER, 1)); //enumerated
avps.add(avpFactory.createAvp(TGPP,Avp.MAX_REQUESTED_BANDWIDTH_DL, 5000)); //unsigned32
avps.add(avpFactory.createAvp(TGPP,Avp.MAX_REQUESTED_BANDWIDTH_UL, 5000)); //unsigned32
avps.add(avpFactory.createAvp(TGPP,Avp.GUARANTEED_BITRATE_DL, 10000)); //unsigned32
avps.add(avpFactory.createAvp(TGPP,Avp.GUARANTEED_BITRATE_UL, 10000)); //unsigned32
avps.add(avpFactory.createAvp(TGPP,Avp.BEARER_IDENTIFIER, 1)); //octedString
avps.add(avpFactory.createAvp(TGPP,Avp.QOS_INFORMATION,(DiameterAvp[]) avps.toArray()));

answer.setExtensionAvps((DiameterAvp[]) avps.toArray());


but now I get some warning and a null pointer exception:
12:48:14,780 WARN  [AvpDictionary] (pool-23-thread-1) AVP with code 1016 and Vendor-Id 0 not present in dictionary!

 , local ac = RA:DiameterGx:Diameter Session ID[seagull.mydomain.com;1096298391;22] , address = null , serviceID = null]
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lnet.java.slee.resource.diameter.base.events.avp.DiameterAvp;
at org.mobicents.diameter.server.PcrfServerSbb.onGxCreditControlRequest(PcrfServerSbb.java:229)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I know i have to modify with diameter.xml (I've already added the avp on the CCA section) and jdiameter-config.xml, but I'm not finding the right ections I suppose.

Furthermore, why whe warnig says "Vendor-id=0" if I'm creating the avp with Vendor-id=10415?

Regards,
Paolo

Alexandre Mendonça

unread,
Aug 25, 2014, 6:49:52 PM8/25/14
to Mobicents Public
Hi Paolo,

I don't see a NPE but rather a ClassCastException, you cannot convert from Object[] to DiameterAvp[] in that way. Use avps.toArray(new DiameterAvp[0]); instead and you will get a DiameterAvp[] directly.

As for the QoS-Information not having proper vendor-id.. I cannot tell why, make sure it's not somewhere else being used without vendor.

​Regards,


Paolo Fenaroli

unread,
Aug 26, 2014, 10:51:39 AM8/26/14
to mobicent...@googlegroups.com
Thanks again Alexadre, that was the problem!

I've done so many tries that I've missed the change in error log.

Thank you again :-)
Reply all
Reply to author
Forward
0 new messages