[OpenSIPS-Users] How to get RADIUS VSA in script?

Dan-Cristian Bogos danb at sms4sip.com
Wed Mar 25 14:03:50 CET 2009


Hi Dimitry,

up to now you can only get SIP-AVP attributes inside the OpenSIPS
script.

The content of all SIP-AVPs returned by the radius server is
automatically converted into avps, available to be used in your scripts
after you run the radius calls. You can easily spot this if you run
OpenSIPS with debug=4.

As the documentation also states, you can return integer and string
avps:
EG: Return an attribute - "SIP-AVP" with value: "h323-return-code:-2" if
you want to have an AVP available as $avp(s:h323-return-code) with the
value of "-2" - not sure if '-' supported in avp names, but this is how
it goes.

If you want to convert your already returned attributes inside
freeradius before sending them to OpenSIPS back, you should be able to
do this without too much hassle in post-auth using unlang language.

Cheers,
DanB

On Wed, 2009-03-25 at 13:05 +0300, Dmitry Lyubimkov wrote:
> Hello. 
> We use OpenSER V.1.3.2 
> During authentification RADIUS server sends (in answers) some additional
> attributes.(from a dictionary file)
> VENDOR          Cisco           9
> ATTRIBUTE       h323-return-code                103     string
> Cisco
> For example h323-return-code =-2 
> 
> How can I get value of this attribute in openser script?
> For example RPID I receive as follows: 
> avp_aliases = "username=s:1; calledid=s:30; callingid=s:31; rpid=s:rpid" 
> and I use $avp(rpid) in a code of the program 
> 
> but I cannot receive so h323-return-code because it is Vendor specific. 
> Can I learn it otherwise from a script? 
> Or the single method = setup intermediate RADIUS proxy to translate this
> attribute to any standard attribute number? 
> 
> Thanks. Dmitry.
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list