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(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users