Does anyone have an idea ? It seems the problem lies in the
formatting of the authentication request.
Indeed, I added a xlog in opensips just before the call to
radius_send_auth() in order to check if all the pseudo variables I
put in my custom AVPs are correctly recognized by Opensips and it
seems they are :
Jun 21 12:44:05
WWW_64Bits ./opensips[17927]: Sip-URI-User=37493210064,
User-Name=37493210064, Sip-Method=REGISTER,
Digest-User-Name=37493210064, Digest-Realm=halys.fr,
Digest-Nonce=4fe2fb13000000002e38b48919f0b3196bf73cb9b4d65a77,
Digest-Algorithm=MD5,
Digest-Response=7e87b71a1b6b80f20329d281835305dd,
Framed-IP-Address=192.168.1.18, NAS-IP-Address=78.xxx.xxx.xxx
Best Regards,
Sebastien
Le 20/06/2012 18:27, Sebastien CRUAUX a écrit :
Unfortunately, now I am facing another issue...
Here is my input set :
modparam("aaa_radius",
"sets", "set1 = (User-Name=$fU, Sip-Method=$rm,
Digest-User-Name=$au, Digest-Realm=$ar,
Digest-Nonce=$an,
Digest-Algorithm=$auth.alg, Digest-Response=$auth.resp,
Framed-IP-Address=$(ct.fields(uri){uri.host}),
NAS-IP-Address=$si)")
and here is what I get in my Access-Request :
Attribute
Value Pairs
AVP: l=6 t=NAS-IP-Address(4): 78.xxx.xxx.xxx
// Source IP of the REGISTER request
AVP: l=6 t=Framed-IP-Address(8): 0.0.0.0
AVP: l=34 t=Digest-Response(206):
257b8dd004056e89d347dc396898102b
AVP: l=7 t=Digest-Attributes(207): 06054D4435
AVP: l=52 t=Digest-Attributes(207):
023234666531663234373030303030303031636563383464...
AVP: l=12 t=Digest-Attributes(207):
010A68616C79732E6672
AVP: l=15 t=Digest-Attributes(207):
0A0D3337343933323130303634
AVP: l=6 t=Error-Cause(101): Unknown(128)
AVP: l=13 t=User-Name(1): 37493210064
AVP: l=6 t=NAS-Port(5): 5060
AVP: l=6 t=NAS-IP-Address(4): 172.17.1.126 // local
IP of my Opensips server
Why do the AVPs Digest-Attributes, Error-Cause, NAS-Port and the
2nd NAS-IP-Address appear while I never asked for them in my set ?
Moreover, some of the AVPs I asked for are not present
(Sip-Method, Digest-User-Name, Digest-Realm, Digest-Nonce,
Digest-Algorithm) and the AVP Framed-IP-Address contains 0.0.0.0
while it should contain the IP address in the Contact URI.
Thanks for your help.
Best Regards,
Sebastien
Le 20/06/2012 15:07, Sebastien CRUAUX a écrit :
Thanks Vlad, it works ! :)
Regards,
Sebastien
Le 20/06/2012 15:04, Vlad Paiu a écrit :
Hello,
You are calling the uri.host transformation wrong. You have
$ct.fields(uri){uri.host}
but it should be
$(ct.fields(uri){uri.host})
Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com
On 06/20/2012 01:45 PM, Sebastien CRUAUX wrote:
Hi,
I would like to send custom RADIUS Access-Requests from
Opensips to my RADIUS server. The documentation told me it
was possible using the radius_send_auth() function. This
function needs the definition of sets in aaa_radius module
parameters in order to work.
I followed the doc and defined a couple of sets but I always
get the same error :
ERROR:aaa_radius:parse_set_content: malformed modparam
ERROR:aaa_radius:parse_sets_func: malformed modparam
set1
CRITICAL:core:yyerror: parse error in config file, line
258, column 18-19: Parameter <sets> not found in
module <aaa_radius> - can't set
ERROR:core:main: bad config file (1 errors)
Here is the definition of my custom sets :
modparam("aaa_radius",
"sets", "set1 = (User-Name=$fU, Sip-Method=$rm,
Digest-User-Name=$au, Digest-Realm=$ar,
Digest-Nonce=$an, Digest-Algorithm=$auth.alg,
Digest-Response=$auth.resp,
Framed-IP-Address=$ct.fields(uri){uri.host},
NAS-IP-Address=$si)")
modparam("aaa_radius",
"sets", "set2 = (User-Name=$fU)")
Can anyone tell me what could be wrong in this definition ?
When I comment the definition of "set1", Opensips starts
fine so I guess one of the AVPs makes it crash but I can't
figure out which one.
Thanks.
Best Regards,
Sebastien
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
|