HA: [Users] Problem with RPID and Radius

Dmitry Lyubimkov loft at onego.ru
Fri Mar 31 13:02:21 CEST 2006


I have added in dictionary file
VENDOR          Cisco           9
ATTRIBUTE       Cisco-AVPair            1       string          Cisco
ATTRIBUTE       h323-credit-amount              101     string
Cisco
ATTRIBUTE       h323-credit-time                102     string
Cisco
ATTRIBUTE       h323-return-code                103     string
Cisco
ATTRIBUTE       h323-currency                   110     string
Cisco

The others аттрибуты already were in the dictionary.

But it has not helped.
Debug OpenSER writes:
 7(18632) DEBUG:auth_radius:radius_authorize_sterman: Success
 7(18632) DEBUG:auth_radius:generate_avps: getting SIP AVPs from avpair
225
 7(18632) parse_headers: flags=200
 7(18632) DEBUG: get_hdr_body : content_length=241
 7(18632) found end of header
 7(18632) find_first_route: No Route headers found
 7(18632) loose_route: There is no Route HF
 7(18632) check_username(): Digest username and URI username match
 7(18632) alias_db_lookup: no alias found for R-URI
 7(18632) lookup(): '79217262040' Not found in usrloc
 7(18632) append_rpid_hf: No rpid AVP

Does not work. OpenSER writes
 7(18632) append_rpid_hf: No rpid AVP
But even without addition attributes all works when SIP-AVP goes last
field in answer of a Radius server.

Dmitry

-----Исходное сообщение-----
От: Klaus Darilion [mailto:klaus.mailinglists at pernau.at] 
Отправлено: 31 марта 2006 г. 12:19
Кому: Dmitry Lyubimkov
Копия: users at openser.org
Тема: Re: [Users] Problem with RPID and Radius


I had similar problems caused by radiusclient-ng which discards all 
radius attributes if there are unknown attributes in the radius packet. 
Thus add all attributes to the radiusclient-ng dictionary.
http://openser.org/docs/modules/1.0.x/tm.html#AEN251

regards
klaus


Dmitry Lyubimkov wrote:
> Subscribers pass authentication on Radius server.
> Except for the answer about successful or unsuccessful authentication
> OpenSER receives RPID field.
> Answer of RADUS server (FreeRadius) looks so:
> Sending Access-Accept of id 136 to 172.16.2.6:33413
>         SIP-AVP = "RPID:8142799202"
> 
> Using commands
>    if (uri=~"^sip:[0-9]+ at .*") {
>         if (method=="INVITE") {
>  
> append_rpid_hf("<sip:","@voapp.ru>;party=calling;privacy=off");
>         };
>     };
> RPID field is added in SIP heading
> 
> Using another Radius the Server (from billing system) OpenSER receives
> such answer:
> Sending Access-Accept of id 127 to 172.16.2.6:33405
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         Framed-Routing = None
>         Framed-MTU = 1500
>         SIP-AVP = "RPID:8142799202"
>         h323-credit-amount = "h323-credit-amount=100.00"
>         h323-credit-time = "h323-credit-time=72000"
>         h323-return-code = "h323-return-code=0"
>         h323-currency = "h323-currency=USD"
> 
> At this RPID field it is not added in header. (The same code of
OpenSER
> script works)
> But the most interesting still ahead!
> We remove support SIP-AVP in billing system. And proxy Radius messages
> through FreeRadius
> We receive from billing
> rad_recv: Access-Accept packet from host 62.33.22.13:1812, id=1,
> length=158
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         Framed-Routing = None
>         Framed-MTU = 1500
>         h323-credit-amount = "h323-credit-amount=100.00"
>         h323-credit-time = "h323-credit-time=72000"
>         h323-return-code = "h323-return-code=0"
>         h323-currency = "h323-currency=USD"
> 
> FreeRadius itself adds RPID and sends to OpenSER the following packet
> Sending Access-Accept of id 185 to 172.16.2.6:33614
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         Framed-Routing = None
>         Framed-MTU = 1500
>         h323-credit-amount = "h323-credit-amount=100.00"
>         h323-credit-time = "h323-credit-time=72000"
>         h323-return-code = "h323-return-code=0"
>         h323-currency = "h323-currency=USD"
>         SIP-AVP = "RPID:8142799202"
> But RPID is understood correctly and it is added in heading part of
SIP
> message.
> The difference between "bad" and "good" RADIUS message only in a place
> where meets SIP-AVP = "RPID:8142799202"
> In the first case this field goes in the middle, in the second case it
> is the last.
> To what such selectivity can be connected? How it can in OpenSER be
> corrected?
> 
> Dmitry
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users









More information about the Users mailing list