CCR and CCA (Diameter Credit Control Apllication)

915 views
Skip to first unread message

amal chhaibi

unread,
Mar 13, 2014, 12:18:21 PM3/13/14
to mobicent...@googlegroups.com
Hi all,
I used this tuto : 

When i invoked sendInitial() method i received :

But when i invoked sendInterim() (or senTermination() ) method i received :

someone can tell me why i haven't received CCR and CCA in second picture (with sendInterim() method) ?

Excuse my bad English!
Thanks in advanced.


Alexandre Mendonça

unread,
Mar 14, 2014, 12:00:25 AM3/14/14
to Mobicents Public
Hi Amal,

Your english is perfectly understandable, but please try to be more descriptive.. explain exactly what you did, what you have got in the console (with text, not images).

Anyway, I am guessing you called sendInterim() or sendTermination() without first calling sendInitial().. if that's so, the stack won't allow to do so because you cannot send an UPDATE or TERMINATION request on a new session.. it must be INITIAL (UPDATE)* TERMINATION.

Learn more about CCA @ http://tools.ietf.org/html/rfc4006

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.

amal chhaibi

unread,
Mar 14, 2014, 7:24:57 AM3/14/14
to mobicent...@googlegroups.com
Hi ,
Thank you, i will follow your advice.

Question:
when i want to interact with a remote server . i must create a server and abstract server class (like this tuto https://code.google.com/p/mobicents/source/browse/trunk/servers/diameter/testsuite/tests/src/test/java/org/mobicents/diameter/stack/functional/?r=18808#functional%2Fcca ) or not ??? 


Best Regards,
Amal

amal chhaibi

unread,
Mar 14, 2014, 9:23:52 AM3/14/14
to mobicent...@googlegroups.com
hi ..
i have some error , i can't receive a CCA-update

 

Any help please.

thanks.



Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

amal chhaibi

unread,
Mar 14, 2014, 9:44:30 AM3/14/14
to mobicent...@googlegroups.com
2014-03-14 14:40:46,161 INFO  StackImpl - (-)(-)(-)(-)(-) Starting Mobicents DIAMETER Stack v1.5.10.0-build639 (-)(-)(-)(-)(-)
2014-03-14 14:40:46,596 WARN  DictionaryImpl - Duplicated AVP Definition for AVP Code: 456, Vendor-Id: 0. See TRACE logs for definitions.
2014-03-14 14:40:46,637 INFO  DictionaryImpl - Mobicents Diameter Dictionary loaded in 395ms -- Vendors[10] Commands[52] Types[20] AVPs[510]
2014-03-14 14:40:46,675 INFO  StackImpl - (-)(-)(-)(-)(-) Started  Mobicents DIAMETER Stack v1.5.10.0-build639 (-)(-)(-)(-)(-)
2014-03-14 14:40:47,175 INFO  StackCreator - Diameter CLIENT :: Adding Listener for [AppId [Vendor-Id:0; Auth-Application-Id:4; Acct-Application-Id:0]].
2014-03-14 14:40:47,176 INFO  StackCreator - Diameter CLIENT :: Supporting 1 applications.
2014-03-14 14:40:52,020 INFO  Client - Sending Request: 272 [E2E:1848639490 -- HBH:1087559100 -- AppID:4]
2014-03-14 14:40:52,020 INFO  Client - Request AVPs:
2014-03-14 14:40:52,020 INFO  Client - <avp name="Session-Id" code="263" vendor="0" value="GatewayService-7-10-1.GGSNMNB01;324;3235042313;xxTESTxx" />
2014-03-14 14:40:52,020 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-14 14:40:52,020 INFO  Client - <avp name="Destination-Realm" code="283" vendor="0" value="siemens.com" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="Origin-Realm" code="296" vendor="0" value="ggsnmnb01.tunisiana" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="Origin-Host" code="264" vendor="0" value="GatewayService-7-10-1.GGSNMNB01" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="Service-Context-Id" code="461" vendor="0" value=" ID" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="CC-Request-Type" code="416" vendor="0" value="1" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="CC-Request-Number" code="415" vendor="0" value="0" />
2014-03-14 14:40:52,021 INFO  Client - <avp name="Subscription-Id" code="443" vendor="0">
2014-03-14 14:40:52,021 INFO  Client -   <avp name="Subscription-Id-Type" code="450" vendor="0" value="2" />
2014-03-14 14:40:52,021 INFO  Client -   <avp name="Subscription-Id-Data" code="444" vendor="0" value="21620856588" />
2014-03-14 14:40:52,021 INFO  Client - </avp>
2014-03-14 14:40:52,021 INFO  Client - <avp name="Requested-Service-Unit" code="437" vendor="0">
2014-03-14 14:40:52,021 INFO  Client -   <avp name="CC-Time" code="420" vendor="0" value="10" />
2014-03-14 14:40:52,021 INFO  Client - </avp>
2014-03-14 14:40:52,021 INFO  Client - 

2014-03-14 14:40:52,024 INFO  Client - Received Answer: 272 [E2E:1848639490 -- HBH:1087559100 -- AppID:0]
2014-03-14 14:40:52,024 INFO  Client - Request AVPs:
2014-03-14 14:40:52,024 INFO  Client - <avp name="Session-Id" code="263" vendor="0" value="GatewayService-7-10-1.GGSNMNB01;324;3235042313;xxTESTxx" />
2014-03-14 14:40:52,024 INFO  Client - <avp name="Result-Code" code="268" vendor="0" value="5030" />
2014-03-14 14:40:52,024 INFO  Client - <avp name="Origin-Host" code="264" vendor="0" value="ipdpt" />
2014-03-14 14:40:52,024 INFO  Client - <avp name="Origin-Realm" code="296" vendor="0" value="ipdpt" />
2014-03-14 14:40:52,024 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-14 14:40:52,024 INFO  Client - <avp name="CC-Request-Type" code="416" vendor="0" value="1" />
2014-03-14 14:40:52,024 INFO  Client - <avp name="CC-Request-Number" code="415" vendor="0" value="0" />
2014-03-14 14:40:52,024 INFO  Client - 

2014-03-14 14:40:54,022 WARN  ClientCCASessionImpl - Wrong event type (SEND_UPDATE_REQUEST) on state IDLE
2014-03-14 14:40:54,022 INFO  Client - Sending Request: 272 [E2E:1848639492 -- HBH:0 -- AppID:4]
2014-03-14 14:40:54,022 INFO  Client - Request AVPs:
2014-03-14 14:40:54,022 INFO  Client - <avp name="Session-Id" code="263" vendor="0" value="GatewayService-7-10-1.GGSNMNB01;324;3235042313;xxTESTxx" />
2014-03-14 14:40:54,022 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-14 14:40:54,022 INFO  Client - <avp name="Destination-Realm" code="283" vendor="0" value="siemens.com" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="Origin-Realm" code="296" vendor="0" value="ggsnmnb01.tunisiana" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="Origin-Host" code="264" vendor="0" value="GatewayService-7-10-1.GGSNMNB01" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="Service-Context-Id" code="461" vendor="0" value=" ID" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="CC-Request-Type" code="416" vendor="0" value="2" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="CC-Request-Number" code="415" vendor="0" value="1" />
2014-03-14 14:40:54,023 INFO  Client - <avp name="Subscription-Id" code="443" vendor="0">
2014-03-14 14:40:54,023 INFO  Client -   <avp name="Subscription-Id-Type" code="450" vendor="0" value="2" />
2014-03-14 14:40:54,023 INFO  Client -   <avp name="Subscription-Id-Data" code="444" vendor="0" value="21620856588" />
2014-03-14 14:40:54,023 INFO  Client - </avp>
2014-03-14 14:40:54,023 INFO  Client - <avp name="Requested-Service-Unit" code="437" vendor="0">
2014-03-14 14:40:54,023 INFO  Client -   <avp name="CC-Time" code="420" vendor="0" value="10" />
2014-03-14 14:40:54,023 INFO  Client - </avp>
2014-03-14 14:40:54,023 INFO  Client - 

Exception in thread "main" java.lang.AssertionError: Did not receive Update! Client ER:

at org.junit.Assert.fail(Assert.java:69)
at GGSN.Main.startTest(Main.java:101)
at GGSN.Main.main(Main.java:33)


Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

Alexandre Mendonça

unread,
Mar 14, 2014, 6:50:12 PM3/14/14
to Mobicents Public
You have received a Result-Code of 5030 (DIAMETER_USER_UNKNOWN). That's why the session is terminated and you cannot send an UPDATE CCR.

Regards,


amal chhaibi

unread,
Mar 17, 2014, 3:42:20 AM3/17/14
to mobicent...@googlegroups.com
Hi,
So what can i do please ?
Thanks in advanced


Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

Ibrahima Gaye

unread,
Mar 17, 2014, 5:28:38 AM3/17/14
to mobicent...@googlegroups.com
Hi Amal,
you have to verify if the subscriber 21620856588 exist in the IN side
and also in your code you have to handle the result codes: what to
send after which result code?

Regards,

On 3/17/14, amal chhaibi <amal.c...@gmail.com> wrote:
> Hi,
> So what can i do please ?
> Thanks in advanced
>
> Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :
>>
>> Hi all,
>> I used this tuto :
>>
>> https://code.google.com/p/mobicents/source/browse/trunk/servers/diameter/testsuite/tests/src/test/java/org/mobicents/diameter/stack/functional/?r=18808#functional%2Fcca
>> <https://code.google.com/p/mobicents/source/browse/trunk/servers/diameter/testsuite/tests/src/test/java/org/mobicents/diameter/stack/functional/?r=18808#functional%2Fcca>
>>
>> for create a CCA Client.
>>
>> When i invoked sendInitial() method i received :
>>
>>
>> <https://lh3.googleusercontent.com/-lVswhBTCsI8/UyHWduDf3aI/AAAAAAAAAI0/w17UO79tgnU/s1600/SendInitial.PNG>
>> But when i invoked sendInterim() (or senTermination() ) method i received
>> :
>>
>>
>> <https://lh4.googleusercontent.com/-fdJLPle9s90/UyHWrN4OjoI/AAAAAAAAAI8/3rBn_OdGFw8/s1600/SendUpdate.PNG>
>> someone can tell me why i haven't received CCR and CCA in second picture
>> (with sendInterim() method) ?
>>
>> Excuse my bad English!
>> Thanks in advanced.
>>
>>
>>
>
> --
> 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.
>


--

*------Ibrahim*

amal chhaibi

unread,
Mar 17, 2014, 6:01:12 AM3/17/14
to mobicent...@googlegroups.com
Hi,
i replaced the subscriber 21620856588 by another subsriber-Id exist in the IN side , but i obtained the same error.
Regards, 


Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

Ibrahima Gaye

unread,
Mar 17, 2014, 9:00:31 AM3/17/14
to mobicent...@googlegroups.com
Hi,
http://www.developingsolutions.com/solutions/diameter_result_codes/
5030 (The server does not recognize the user.)
verify the format used to send the subscriber's number if it's correct.

maybe if you share your code and/or the full log someone else can give
you better help.

regards,

On 3/17/14, amal chhaibi <amal.c...@gmail.com> wrote:
> Hi,
> i replaced the subscriber 21620856588 by another subsriber-Id exist in the
> IN side , but i obtained the same error.
> Regards,
>
> Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :
>>
>> Hi all,
>> I used this tuto :
>>
>> https://code.google.com/p/mobicents/source/browse/trunk/servers/diameter/testsuite/tests/src/test/java/org/mobicents/diameter/stack/functional/?r=18808#functional%2Fcca
>> <https://code.google.com/p/mobicents/source/browse/trunk/servers/diameter/testsuite/tests/src/test/java/org/mobicents/diameter/stack/functional/?r=18808#functional%2Fcca>
>>
>> for create a CCA Client.
>>
>> When i invoked sendInitial() method i received :
>>
>>
>> <https://lh3.googleusercontent.com/-lVswhBTCsI8/UyHWduDf3aI/AAAAAAAAAI0/w17UO79tgnU/s1600/SendInitial.PNG>
>> But when i invoked sendInterim() (or senTermination() ) method i received
>> :
>>
>>
>> <https://lh4.googleusercontent.com/-fdJLPle9s90/UyHWrN4OjoI/AAAAAAAAAI8/3rBn_OdGFw8/s1600/SendUpdate.PNG>
>> someone can tell me why i haven't received CCR and CCA in second picture
>> (with sendInterim() method) ?
>>
>> Excuse my bad English!
>> Thanks in advanced.
>>
>>
>>
>

Ibrahima Gaye

unread,
Mar 17, 2014, 9:22:35 AM3/17/14
to mobicent...@googlegroups.com
Also in the Subscription-Id-Type the value you set is 2 which means
the Subscription-Id-Data value should be a SIP URI ...
Try to set the value of Subscription-Id-Types to '0' (meaning
Subscription-Id-Data value should be in E.164 format (e.g., MSISDN) )
and retry ...

Regards,

PS:
http://tools.ietf.org/html/rfc4006


8.47. Subscription-Id-Type AVP

The Subscription-Id-Type AVP (AVP Code 450) is of type Enumerated,
and it is used to determine which type of identifier is carried by
the Subscription-Id AVP.

This specification defines the following subscription identifiers.
However, new Subscription-Id-Type values can be assigned by an IANA
designated expert, as defined in section 12. A server MUST implement
all the Subscription-Id-Types required to perform credit
authorization for the services it supports, including possible future
values. Unknown or unsupported Subscription-Id-Types MUST be treated
according to the 'M' flag rule, as defined in [DIAMBASE].

END_USER_E164 0
The identifier is in international E.164 format (e.g., MSISDN),
according to the ITU-T E.164 numbering plan defined in [E164] and
[CE164].

END_USER_IMSI 1
The identifier is in international IMSI format, according to the
ITU-T E.212 numbering plan as defined in [E212] and [CE212].

END_USER_SIP_URI 2
The identifier is in the form of a SIP URI, as defined in [SIP].

END_USER_NAI 3
The identifier is in the form of a Network Access Identifier, as
defined in [NAI].



Hakala, et al. Standards Track [Page 77]

RFC 4006 Diameter Credit-Control Application August 2005


END_USER_PRIVATE 4
The Identifier is a credit-control server private identifier.

8.48. Subscription-Id-Data AVP

The Subscription-Id-Data AVP (AVP Code 444) is used to identify the
end user and is of type UTF8String. The Subscription-Id-Type AVP
defines which type of identifier is used.
--

*------Ibrahim*

amal chhaibi

unread,
Mar 17, 2014, 11:03:03 AM3/17/14
to mobicent...@googlegroups.com
i change type of subscriber-ID and i obtained this :
2014-03-17 15:49:24,748 INFO  DictionaryImpl - Mobicents Diameter Dictionary loaded in 390ms -- Vendors[10] Commands[52] Types[20] AVPs[510]
2014-03-17 15:49:29,789 INFO  StackCreator - Diameter CLIENT :: Adding Listener for [AppId [Vendor-Id:0; Auth-Application-Id:4; Acct-Application-Id:0]].
2014-03-17 15:49:29,790 INFO  StackCreator - Diameter CLIENT :: Supporting 1 applications.
2014-03-17 15:49:29,921 INFO  RouterImpl - Looking up peer for request: MessageImpl{commandCode=272, flags=128}, DestHost=null, DestRealm=siemens.com
2014-03-17 15:49:29,921 INFO  RouterImpl - Realm siemens.com has avaliable following peers [aaa://10.105.203.113:3868] from list [10.105.203.113]
2014-03-17 15:49:29,922 INFO  Client - Sending Request: 272 [E2E:932184066 -- HBH:1350877210 -- AppID:4]
2014-03-17 15:49:29,922 INFO  Client - Request AVPs:
2014-03-17 15:49:29,922 INFO  Client - <avp name="Session-Id" code="263" vendor="0" value="localhost;324;3498360426;xxTESTxx" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Destination-Realm" code="283" vendor="0" value="siemens.com" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Origin-Realm" code="296" vendor="0" value="ggsnmnb01.tunisiana" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Origin-Host" code="264" vendor="0" value="GatewayService-7-10-1.GGSNMNB01" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Auth-Application-Id" code="258" vendor="0" value="4" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Service-Context-Id" code="461" vendor="0" value="725fcff0ca274f4d...@mss.mobicents.org" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="CC-Request-Type" code="416" vendor="0" value="1" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="CC-Request-Number" code="415" vendor="0" value="0" />
2014-03-17 15:49:29,922 INFO  Client - <avp name="Subscription-Id" code="443" vendor="0">
2014-03-17 15:49:29,922 INFO  Client -   <avp name="Subscription-Id-Type" code="450" vendor="0" value="0" />
2014-03-17 15:49:29,922 INFO  Client -   <avp name="Subscription-Id-Data" code="444" vendor="0" value="21626009912" />
2014-03-17 15:49:29,923 INFO  Client - </avp>
2014-03-17 15:49:29,923 INFO  Client - <avp name="Requested-Service-Unit" code="437" vendor="0">
2014-03-17 15:49:29,923 INFO  Client -   <avp name="CC-Time" code="420" vendor="0" value="10" />
2014-03-17 15:49:29,923 INFO  Client - </avp>
2014-03-17 15:49:29,923 INFO  Client - 

Exception in thread "main" java.lang.AssertionError: Did not receive INITIAL! Client ER:

at org.junit.Assert.fail(Assert.java:69)
at GGSN.Main.startTest(Main.java:86)
at GGSN.Main.main(Main.java:30)

you will find below my code :


I wait your Help, please
   Thanks in advanced 
AbstractClient.java
Client.java
ClientGGSN.java
client-jdiameter-config.xml
Error.java
Main.java
StackCreator.java
StateChange.java
Utils.java

amal chhaibi

unread,
Mar 17, 2014, 11:36:57 AM3/17/14
to mobicent...@googlegroups.com



Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

Ibrahima Gaye

unread,
Mar 17, 2014, 12:12:44 PM3/17/14
to mobicent...@googlegroups.com
meaning you did not receive answer in due time ? ...
try to increase the value in "Thread.sleep(2000);" in Main.java ...

regards,

On 3/17/14, amal chhaibi <amal.c...@gmail.com> wrote:
>
>
> <https://lh5.googleusercontent.com/-R_4hjryCdX4/UycWlA6h1gI/AAAAAAAAAKw/0ecLNhY5oZk/s1600/3001.PNG>
>> <https://lh3.googleusercontent.com/-lVswhBTCsI8/UyHWduDf3aI/AAAAAAAAAI0/w17UO79tgnU/s1600/SendInitial.PNG>
>> But when i invoked sendInterim() (or senTermination() ) method i received
>> :
>>
>>
>> <https://lh4.googleusercontent.com/-fdJLPle9s90/UyHWrN4OjoI/AAAAAAAAAI8/3rBn_OdGFw8/s1600/SendUpdate.PNG>
>> someone can tell me why i haven't received CCR and CCA in second picture
>> (with sendInterim() method) ?
>>
>> Excuse my bad English!
>> Thanks in advanced.
>>
>>
>>
>

amal chhaibi

unread,
Mar 17, 2014, 12:28:29 PM3/17/14
to mobicent...@googlegroups.com
I don't think but I tried to replace Thread.sleep(2000) by Thread.sleep(5000) and no change.
Regards.




--
You received this message because you are subscribed to a topic in the Google Groups "mobicents-public" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobicents-public/pB-Cr8U9rd8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobicents-publ...@googlegroups.com.

Ibrahima Gaye

unread,
Mar 17, 2014, 1:41:41 PM3/17/14
to mobicent...@googlegroups.com
Hi Amal,
Check what's happening at the server side (server's log) ...
Regards


--
------
Ibrahim


amal chhaibi

unread,
Mar 18, 2014, 5:23:05 AM3/18/14
to mobicent...@googlegroups.com
Hello,
I made some change in the AbstractClient class and i obtained this result :












Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

amal chhaibi

unread,
Mar 18, 2014, 7:00:44 AM3/18/14
to mobicent...@googlegroups.com
Hi,
i resolve problems,
Thanks for your help.


Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :

Ibrahima Gaye

unread,
Mar 18, 2014, 7:05:41 AM3/18/14
to mobicent...@googlegroups.com
Hi Amal, 
What was the problem (someone may need your solution)?
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.


--
------
Ibrahim


amal chhaibi

unread,
Mar 18, 2014, 7:14:29 AM3/18/14
to mobicent...@googlegroups.com

Hi ,
i changed :
 String serviceContextId = null;
    if (serviceContextId == null) {
      serviceContextId = UUID.randomUUID().toString().replaceAll("-", "") + "@mss.mobicents.org";
    }
by
 String serviceContextId = "32...@nsn.com";
    if (serviceContextId == null) {
      serviceContextId = UUID.randomUUID().toString().replaceAll("-", "") + "@mss.mobicents.org";
    }

and i added some avps :

          ccrAvps.addAvp(Avp.TGPP_GGSN_MCC_MNC,"60503",10415,false,false,true);
 ccrAvps.addAvp(18,"60503",10415,false,false,true);

 
 byte[] ipggsn = new byte[]{41,(byte)228,39,81};
 ccrAvps.addAvp(7,ipggsn,10415,false,false);

          ccrAvps.addAvp(2,-1493171299,10415,false,false,true);
 ccrAvps.addAvp(455,1,false,true,true);

Regards,






Le jeudi 13 mars 2014 17:18:21 UTC+1, amal chhaibi a écrit :
Reply all
Reply to author
Forward
0 new messages