[Users] Problem with RPID and Radius

Dmitry Lyubimkov loft at onego.ru
Thu Mar 30 21:03:11 CEST 2006


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







More information about the sr-users mailing list