Hi!
I'm quite new to avps - in fact I have not used them yet. Thus, please apologize if my questions are dumb.
In my setup, (open)ser receives in the radius response two attributes: - RPID - prefix (for a call by call provider)
In ser I have to add the RPID header using the RPID attribute, and prefix the number in the request URI with the prefix attribute.
As far as I understand the auth_radius module in 0.9.4 supports receiving various radius attributes and storing them as AVPs.
First, in ser.cfg I will add the RPID header. Is the function still append_rpid_hf() or do I have to use another function for generating the RPID header out of AVPs?
Afterwards I have to prefix the request URI. Can this be done with avpops functions? I only found avp_pushto, which will replace the request URI - right?
Can I store any arbitrary Radius attribute in AVPs or only predefined ones?
regards, klaus
Hi Klaus,
via the load_credentials module parameter, auth_db may load into AVPs additional values from subscriber table. Classical example is RPID - by default load_credentials is defined to load it into STRING name AVP "rpid".
That's the first step - getting the info. Second one is to use it.... for RPID, yes, you may still use the append_rpid_hf() function which will look for the RPID AVP and insert it as header. You may use as buffer any AVP; here is the explicit configuration: # at auth, load rpid column into AVP ID 10 modparam("auth_db","load_credentials","i:10=rpid") # the append_rpid_hf () should look for RPID value into AVP ID 10 modparam("auth","rpid_avp","i:10") Please refer to docs - http://www.openser.org/docs/ for more details about these params.
regarding the prefix for RURI.....there is a new feature on OpenSER CVS head http://www.openser.org/pipermail/users/2005-June/000123.html if you have the prefix in some AVP (let;s say AVP ID 14 => i:14); compose a the prefixed RURI username in a new AVP (i:15): avp_printf("i:15","$avp(i:14)$rU"); and replace the username: avp_pushto("$ruri/username","i:15");
See http://www.openser.org/docs/modules/0.10.x/avpops.html for these functions.
regards, bogdan
Klaus Darilion wrote:
Hi Klaus,
Klaus Darilion wrote:
yes, works also with radius - if the radius server adds RADIUS AVPs with code "SIP_AVP", they will be loaded as AVPs. See http://www.openser.org/docs/modules/0.9.x/auth_radius.html#AEN55
regards, bogdan
Hi Klaus,
Klaus Darilion wrote:
Is there somewhere a list of which AVPs are already used inside openser? I would like to avoid using existing AVPs for my purposes.
there is no such list - all module that are using avps must/should to have the AVP name configurable via module parameters. The module writer will have to take what AVPs assign and for what to avoid problems.
Not sure if this policy is respected, but I think this is the best way to go - avoid overlapping and mare configurable.
regards, Bogdan
On 06/29/05 12:56, Bogdan-Andrei Iancu wrote:
There is the rpid avp used by auth modules -- it is named by default 'rpid'. Another module that uses default names for AVPs is LCR but they can be changed via parameters. At the first look, all other modules using AVPs (tm, ...) do not use default names --- the names are initialized to NULL and must be set from config.
Maybe starting a docuwiki page for default AVP names would be a good idea.
Regards, Daniel