[Users] Using schemes with AVPops

Martin Kjeldsen martin.kjeldsen at cuatro.dk
Tue Aug 16 00:31:07 CEST 2005


Thanks for the help. So far I'm still having some trouble getting the 
info out of the DB via the load function. I'm trying to get the username 
in tha alias table with these settings.

modparam("avpops", "db_scheme", 


But not getting anything!!!

And a second thought is how will I be able to push it into the header as 
"P-Asserted-Identity", when the only accepts headers of Request or Reply?

Thanks in advance


Daniel-Constantin Mierla wrote:

> Try:
> modparam("avpops", "db_scheme", "scheme0:uuid_col=contact; \
>          value_col=username;value_type=string;table=aliases")
> ...
> avp_db_load("$uri_avp","s:pai/$scheme0");
> avp_pushto("$P-Asserted-Identity","s:pai");
> Note that $uri_avp is an alias to the avp storing user's uri to match 
> the contact column from the table aliases. As I suppose, it should be 
> the From uri and in this case you can use directly $from as first 
> parameter in avp_db_load(). You may have some problems if the UA adds 
> parameters in From URI (it will not match the contact column) and in 
> this case you have to use avp_subst() to get rid of them.
> An easier solution would be if you use the dbaliases table (alias_db 
> module).
> Daniel
> On 08/12/05 21:39, Martin Kjeldsen wrote:
>> Hi
>> I'm in need of some help using the schemes with AVPops!
>> What I would like to do, is extract a value from the coloum:username 
>> in table:aliases, matched by a specific user.
>> First of all I'm uncertain of how to create such a scheme and match 
>> it with a specific user, and second of all, can I push this in to the 
>> header as a P-Asserted-Identity?
>> And I'm not mistaken, when I under the impression thatI dont need to 
>> create a AVP table for this, am I?
>> Thank you in advance
>> Kind regards
>> Martin
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users

Med venlig hilsen / Kind Regards
Martin Kjeldsen

Cuatro-Group P/S (4G)
Hindegade 3, DK-1303 København K

Tel: (+45) 82 35 65 00
Fax: (+45) 82 35 65 65
Mob: (+45) 60 64 65 87

Url: http://www.cuatro.dk

More information about the sr-users mailing list