Good day.
Need tips for radius auth/accounting.
At fist, if I understand correctly, some changes here:
modparam("acc", "service_type", 15) modparam("acc", "radius_extra", "Sip-Src-IP=$si;Sip-Src-Port=$sp")
must be replaced to
modparam("acc_radius", "service_type", 15) modparam("acc_radius", "radius_extra", "Sip-Src-IP=$si;Sip-Src-Port=$sp")
But...
*Any* radius_extra parameters raise parsing error when K. start.
And second problem - setflag(FLT_ACC) doesn't call query to radius server, acc_rad_request("Some comment"); - does.
How it work in real life?
Hello,
On 4/11/13 8:10 AM, Victor V. Kustov wrote:
Good day.
Need tips for radius auth/accounting.
At fist, if I understand correctly, some changes here:
modparam("acc", "service_type", 15) modparam("acc", "radius_extra", "Sip-Src-IP=$si;Sip-Src-Port=$sp")
must be replaced to
modparam("acc_radius", "service_type", 15) modparam("acc_radius", "radius_extra", "Sip-Src-IP=$si;Sip-Src-Port=$sp")
But...
*Any* radius_extra parameters raise parsing error when K. start.
Can you run with debug=3 and send the output from syslog? I checked the sources and the parameter is exported by the module.
And second problem - setflag(FLT_ACC) doesn't call query to radius server, acc_rad_request("Some comment"); - does.
How it work in real life?
Have you set radius_flag parameter?
Cheers, Daniel
В Thu, 11 Apr 2013 09:44:37 +0200 Daniel-Constantin Mierla miconda@gmail.com пишет:
How it work in real life?
Have you set radius_flag parameter?
Yes.
modparam("acc_radius", "radius_flag", 2)
Have you changed FLT_ACC? Because it is by default 1.
Daniel
On 4/11/13 9:57 AM, Victor V. Kustov wrote:
В Thu, 11 Apr 2013 09:44:37 +0200 Daniel-Constantin Mierla miconda@gmail.com пишет:
How it work in real life?
Have you set radius_flag parameter?
Yes.
modparam("acc_radius", "radius_flag", 2)
В Thu, 11 Apr 2013 10:14:15 +0200 Daniel-Constantin Mierla miconda@gmail.com пишет:
Have you changed FLT_ACC? Because it is by default 1.
hmmm... not. seems i had not complete understand how flags work.
modparam("acc_radius", "radius_flag", FLT_ACC) - right?
as I understand setflag(); set clobal flags. any module check his flags in global and if any set, than make some actions. Right?
Hi Daniel-Constantin
about radius again: we need interact with radius same way:
1. when receive sip message with REGISTER method - initiate auth with radius. (Authentification)
2. when receive INVITE message - ask radius 'bout permissions and parse answer: get permission and next hop IP. (Authorization)
3. when call a) before call send Acct-Status-Type = Start with attributes. b) after call send Acct-Status-Type = Stop with attributes. (Accounting)
As I understand no problem with 1, 3b. Are 2, 3a possible?
В Thu, 11 Apr 2013 09:44:37 +0200 Daniel-Constantin Mierla miconda@gmail.com пишет:
Can you run with debug=3 and send the output from syslog? I checked the sources and the parameter is exported by the module.
Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: <core> [pvapi.c:690]: bad parameters Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: acc [acc_extra.c:192]: parse failed in <User-Name=XXX> around position 10 Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: acc [acc_extra.c:194]: error Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: acc_radius [acc_radius_mod.c:139]: failed to parse rad_extra param Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: <core> [sr_module.c:955]: init_mod(): Error while initializing module acc_radius (/usr/local/lib64/kamailio/modules/acc_radius.so)
that's all. debug not work seems
#grep -i debug kamailio.cfg
debug=3 # doesn't matter 1..9 - only errors. loadmodule "debugger.so" modparam("debugger", "cfgtrace", 1) # commented or not - doesn't matter
I thought you masked with XXX, but if you actually use XXX, then it has to be replaced with a pseudo-variable, such as $rU or $avp(x).
Cheers, Daniel
On 4/11/13 10:18 AM, Victor V. Kustov wrote:
В Thu, 11 Apr 2013 09:44:37 +0200 Daniel-Constantin Mierla miconda@gmail.com пишет:
Can you run with debug=3 and send the output from syslog? I checked the sources and the parameter is exported by the module.
Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: <core> [pvapi.c:690]: bad parameters Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: acc [acc_extra.c:192]: parse failed in <User-Name=XXX> around position 10 Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: acc [acc_extra.c:194]: error Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: acc_radius [acc_radius_mod.c:139]: failed to parse rad_extra param Apr 11 12:09:51 phoenix-c2 /usr/local/sbin/kamailio[61267]: ERROR: <core> [sr_module.c:955]: init_mod(): Error while initializing module acc_radius (/usr/local/lib64/kamailio/modules/acc_radius.so)
that's all. debug not work seems
#grep -i debug kamailio.cfg
debug=3 # doesn't matter 1..9 - only errors. loadmodule "debugger.so" modparam("debugger", "cfgtrace", 1) # commented or not - doesn't matter