Hello,
I've a single question about AVPs :
how can I use them when loaded from radius_load_attr ?
example : the 0123452000 is the caller, I want to use an acl to block him.
=> in my radius user config :
0123451010(a)sip.dot.com User-Password = "0000"
User-Name = "0123451010(a)sip.dot.com".com",
SER-UID = "0123451010(a)sip.dot.com".com",
SER-DID = "1",
SER-From-UID = "0123451010(a)sip.dot.com".com",
SER-From-DID = "1",
SER-Digest-Username = "0123451010",
SER-Digest-Realm = "sip.dot.com",
SER-Uri-User = "0123451010(a)sip.dot.com".com",
SER-Attr = "acl:pstn",
SER-Attr = "asserted-id:0123451010",
SER-Attr = "phone:0123451010",
SER-Attr = "lang:fr"
=> in the SER (v2.0.0) :
if (!radius_load_attrs("$fu", "(a)f.uri"))
{
sl_reply("403", "Radius attributes not found");
exit;
}
if ( $acl == "pstn" )
{
sl_reply("401", "Unauthorized");
exit;
}
I tried too " $fu.acl ", " set_attr function, ... it seems I can't use
SER-Attr as a variable.
in the debug (dump_attrs) :
...
ser[28670]: r_INBOUND: => dump_attrs()
ser[28670]: INFO: avp.c:542: class=GLOBAL
ser[28670]: AVP["lang"]="en"
ser[28670]: INFO: avp.c:552: track=FROM class=DOMAIN
ser[28670]: AVP["did"]="1"
ser[28670]: AVP["digest_realm"]="sip.dot.com"
ser[28670]: INFO: avp.c:562: track=TO class=DOMAIN
ser[28670]: AVP["did"]="1"
ser[28670]: AVP["digest_realm"]="sip.dot.com"
ser[28670]: INFO: avp.c:572: track=FROM class=USER
ser[28670]: AVP["uid"]="0123451010(a)sip.dot.com"
ser[28670]: AVP["acl"]="pstn"
ser[28670]: AVP["asserted-id"]="0123451010"
ser[28670]: AVP["lang"]="fr"
ser[28670]: AVP["phone"]="0123451010"
ser[28670]: AVP["acl"]="pstn"
ser[28670]: AVP["asserted-id"]="0123451010"
ser[28670]: AVP["lang"]="fr"
ser[28670]: AVP["phone"]="0123451010"
ser[28670]: INFO: avp.c:582: track=TO class=USER
ser[28670]: AVP["acl"]="pstn"
ser[28670]: AVP["asserted-id"]="0123451005"
ser[28670]: AVP["lang"]="fr"
ser[28670]: AVP["phone"]="0123451005"
ser[28670]: AVP["acl"]="pstn"
ser[28670]: AVP["asserted-id"]="0123451005"
ser[28670]: AVP["lang"]="fr"
ser[28670]: AVP["phone"]="0123451005"
ser[28670]: INFO: avp.c:592: track=FROM class=URI
ser[28670]: AVP["uac_nat"]=1
ser[28670]: AVP["account"]="yes"
ser[28670]: INFO: avp.c:602: track=TO class=URI
ser[28670]: INFO: No AVP present
...
If anyone has tips to help me, many thanks !
I'm sure there's something who replaces the old group_radius module, but
which one or how to create SER-Attr $grp ?
Many thanks,
--
Samuel MULLER
sml(a)720.fr
Show replies by date