[OpenSER-Users] checking radius return attributes

Dan-Cristian Bogos dan.bogos at gmail.com
Wed Aug 29 20:33:47 CEST 2007


Hi Danish,

can u post the full block where you are doing these checks?

DanB

On 8/29/07, danish.samad at vocalseeds.com <danish.samad at vocalseeds.com> wrote:
> Hi Dan,
> Thanks for the explanation, things are more clear now. Now I am returning
> a SIP-AVP from radius (for authentication), this is what I see in the logs
>
> Attributes:
>         SIP-AVP = "return-code=0"
>         .......
>
> In my script I do
>         avp_print();
>         if(is_avp_set("$avp(s:return-code)")){
>                 xlog("L_NOTICE","return code is set \n");
>         };
>         if(avp_check("$avp(s:return-code)", "eq/0/g"))
>         {
>                xlog("L_NOTICE","return code 0 received \n");
>         };
>
> none of the checks pass and nothing is printed from avp_print. In openser
> logs I see this line
>
> 1(32550) DEBUG:auth_radius:generate_avps: getting SIP AVPs from avpair 225
>
> am I missing some pre-requisites or what am I doing wrong.
>
> Regards,
> Danish
>
>
> > Hi Danish,
> >
> > for the moment you cannot process attributes other than SIP-AVP inside
> > openser script. This one is automatically converted into avp.
> > EG. A SIP-AVP attribute in the form of: "reason='No Credit'" should
> > automatically create an AVP named reason with value "No Credit".
> >
> > Hope that helps,
> > DanB
> >
> >
> > On 8/29/07, danish.samad at vocalseeds.com <danish.samad at vocalseeds.com>
> > wrote:
> >> Hi Dan,
> >>
> >> Thanks for your reply.
> >>
> >> Actually I am currently returning an integer status value in
> >> cisco-h323-return-code (a vendor specific attribute). So basically how
> >> can
> >> I extract the value returned in this attribute, compare it and then send
> >> and sl reply.
> >>
> >> Probably there is a way of loading this attr value in an avp and
> >> comparing
> >> it?
> >>
> >> Regards,
> >> Danish
> >>
> >> > Hello Danish,
> >> >
> >> > a solution would be returning a SIP-AVP, containing the reason for
> >> > failure, and then forward this to the client using sl.
> >> > Another one would be completely rewriting R-URI again from your
> >> > SIP-AVP and then send the request to an announcement server (eg:
> >> > ann:paymentrequired at your.server - which should play Payment Required
> >> > annoucement).
> >> >
> >> > Cheers,
> >> > DanB
> >> >
> >> > On 8/29/07, danish.samad at vocalseeds.com <danish.samad at vocalseeds.com>
> >> > wrote:
> >> >> Hi,
> >> >>
> >> >> I have configured openser-1.2 with a (commercial) third party radius
> >> >> server and it is working great. Now I have a requirement where I need
> >> to
> >> >> check a radius return attribute in case an access reject is received
> >> in
> >> >> response to an  authorization request. Is there some way I can do
> >> this
> >> >> in
> >> >> the openser script.
> >> >>
> >> >> Basically I want to send a 402 payment required message to a sip
> >> client
> >> >> in
> >> >> case the call is rejected due low balance. In such cases radius
> >> returns
> >> >> a
> >> >> status  response code with access reject.
> >> >>
> >> >>
> >> >> Thanks,
> >> >> Danish
> >> >>
> >> >> _______________________________________________
> >> >> Users mailing list
> >> >> Users at openser.org
> >> >> http://openser.org/cgi-bin/mailman/listinfo/users
> >> >>
> >> >
> >>
> >>
> >
>
>




More information about the Users mailing list