[OpenSIPS-Users] Problems with "radius_send_acct" - send wrong values
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Dec 6 18:45:20 CET 2012
Hi Ewgeny,
The problem i that both RADIUS AVP "Acct-Status-Type " and
"Service-Type" are defined as INTEGERs at TYPE, not as string - and you
are pushing STRING values into those AVPs.
You should do :
$avp(start)= 1 ; /*Start*/
$var(service-type-akk)= 1 ; /*Login-User*/
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 12/05/2012 06:21 PM, Ewgeny wrote:
> Hi!
>
> I need to send a lot of specific radius attributes to the RADIUS server.
> For these purposes, I want to use the function "radius_send_acct" from the module "AAA RADIUS MODULE" http://www.opensips.org/html/docs/modules/1.8.x/aaa_radius.html#id250028.
>
> **************************************************************************************
> my configuration:
> **************************************************************************************
> loadmodule "aaa_radius.so"
> modparam("aaa_radius", "radius_config", "/etc/radiusclient-ng/radiusclient.conf")
>
> modparam("aaa_radius","sets","acct-start = (Acct-Status-Type=$avp(start),
> <------><------><------><------><------> service-type=$var(service-type-akk),
> <------><------><------><------><------> h323-incoming-conf-id=$ci,
> <------><------><------><------> <--> Cisco-AVPair=$var(h323-incoming-call-id-auth),
> <------><------><------><------><------> User-Name=$fU)")
>
> ***********************************************************************************************
> from routing script:
> ***********************************************************************************************
>
>> # account only INVITEs
> <------>if (is_method("INVITE")) {
>
> $avp(start)="Start";
> $var(service-type-akk)="Login-User";
> $var(h323-incoming-call-id-auth)="h323-incoming-call-id="+$ci;
>
>
> <------><------>radius_send_acct("acct-start");
> <------><------>xlog("L_INFO", "radius_acct-start_1...... \n");
> }
>
>
>
> As you see: accounting request is send,but values like Service-Type, Acct-Status-Type are send incorrectly....
>
> Accounting-Request Id 152 xx.xx.xx.xxx:38902 -> xxx.xx.ххх.ххх:1813 (30 packets) +30.571
> User-Name = "6633605992"
> Cisco-AVPair = "h323-call-id=f449473a-1593-4475-9161-ecb4e30821d8"
> Cisco-AVPair = "h323-incoming-call-id=f449473a-1593-4475-9161-ecb4e30821d8"
> h323-incoming-conf-id = "f449473a-1593-4475-9161-ecb4e30821d8"
> Service-Type = 1768386380 /*should be Login-User*/
> Acct-Status-Type = 1952670529 /*should be Start*/
> NAS-Port-Id = 5060
> Acct-Delay-Time = 0
> NAS-IP-Address = 46.4.96.145
>
>
> Why is this happening?
> I'm working on this problem for a month
> please help
>
>
>
> I use libradiusclient-ng2.
> My radius dictionaries:
>
> cat /etc/radiusclient-ng/dast/dictionary | grep Acct-Status-Type
> ATTRIBUTE Acct-Status-Type 40 integer
> VALUE Acct-Status-Type Start 1
> VALUE Acct-Status-Type Stop 2
> VALUE Acct-Status-Type Alive 3
> VALUE Acct-Status-Type Accounting-On 7
> VALUE Acct-Status-Type Accounting-Off 8
>
> cat /etc/radiusclient-ng/dast/dictionary | grep Service-Type
> ATTRIBUTE Service-Type 6 integer
> VALUE Service-Type Login-User 1
> VALUE Service-Type Framed-User 2
> VALUE Service-Type Callback-Login-User 3
> VALUE Service-Type Callback-Framed-User 4
> VALUE Service-Type Outbound-User 5
> VALUE Service-Type Administrative-User 6
> VALUE Service-Type NAS-Prompt-User 7
>
>
> ..........................
> ..........................
> ..........................
> $INCLUDE dictionary.cisco
> $INCLUDE rfc5090.txt
> $INCLUDE dict.opensips
>
>
> My Opensips version:
> version: opensips 1.8.2-notls (x86_64/linux)
> running on Ubuntu Server wheezy/sid x64
>
>
>
>
> thanks in advance
> Ewgeny
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list