Hi all .. I'm trying to change the way avp_db_load works on my current config to load avp's from DB based on $fU and $fd and not based on uuid, so I have try this ...
... modparam("avpops", "avp_table", "usr_preferences") modparam("avpops", "use_domain", 1) ... # load caller avps avp_db_load("$fu/username", "*"); ...
With no success .. because the query that is send to the DB is:
select value,attribute,type from usr_preferences where username='{$fU value}'
instedad of
select value,attribute,type from usr_preferences where username='{$fU value}' and domain='{$fd value}'
witch is what I expect when using use_domain=1
Any clue about what I'm doing wrong?
Best regards
Hello,
On 9/3/10 4:54 PM, Raúl Alexis Betancor Santana wrote:
Hi all .. I'm trying to change the way avp_db_load works on my current config to load avp's from DB based on $fU and $fd and not based on uuid, so I have try this ...
... modparam("avpops", "avp_table", "usr_preferences") modparam("avpops", "use_domain", 1) ... # load caller avps avp_db_load("$fu/username", "*");
"/username" flag forces usage of user part only. Try without it.
Cheers, Daniel
...
With no success .. because the query that is send to the DB is:
select value,attribute,type from usr_preferences where username='{$fU value}'
instedad of
select value,attribute,type from usr_preferences where username='{$fU value}' and domain='{$fd value}'
witch is what I expect when using use_domain=1
Any clue about what I'm doing wrong?
Best regards
On Viernes 03 Septiembre 2010 18:50:16 Daniel-Constantin Mierla escribió:
Hello,
On 9/3/10 4:54 PM, Raúl Alexis Betancor Santana wrote:
Hi all .. I'm trying to change the way avp_db_load works on my current config to load avp's from DB based on $fU and $fd and not based on uuid, so I have try this ...
... modparam("avpops", "avp_table", "usr_preferences") modparam("avpops", "use_domain", 1) ...
# load caller avps avp_db_load("$fu/username", "*");
"/username" flag forces usage of user part only. Try without it.
Cheers, Daniel
Thanks ... it's working now ... I got confused when reading the docs:
http://www.kamailio.org/docs/modules/3.0.x/modules/avpops.html#id2930196
... pvar = any pseudo variable defined in Kamailio. If the pvar is $ru (request uri), $fu (from uri), $tu (to uri) or $ou (original uri), then the implicit flag is 'uri'. Otherwise, the implicit flag is 'uuid'. ...
I supposed (wrongly) that when it said "...flag is 'uri'." it will try with $fU@$fd ... not that it does the split for the query ... X)
Cheers.