Hello Daniel,<br><br> I just tryed exactly this:<br><br> if(avp_db_load("$ru/username", "$avp(s:e911)"))<br> {<br> avp_pushto("$ru", "$avp(s:e911)");<br>
}<br><br> I even tried printing out the AVP after it should have been loaded, once again NULL. There is a row in usr_preferences, I have it working with avp_db_query, however for the life of me can not get avp_db_load to work? I have a column 'username', a column 'domain', a column 'attribute', a column 'type', and a column 'value'. The attribute is e911, the value is set, and the username is set, as well as domain, although domain in this case should not matter. I just can't get it working..... any help is appreciated, thanks!
<br><br><br><div><span class="gmail_quote">On 1/24/07, <b class="gmail_sendername">Daniel-Constantin Mierla</b> <<a href="mailto:daniel@voice-system.ro">daniel@voice-system.ro</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>did you get any error messages in syslog. Try:<br>avp_db_load("$ru/username", "$avp(s:e911)");<br><br>$rU is username, and $ru is R-URI from where to get the username (first<br>version should fire errors).
<br><br>Cheers,<br>Daniel<br><br>On 01/23/07 19:59, Brandon Armstead wrote:<br>> Hello everyone,<br>><br>> I'm trying to load an avp from the database, now from my<br>> understanding I simply use the avp_db_load() function. Now I
<br>> previously setup my avp_table to be usr_preferences, now I'm doing the<br>> following:<br>><br>> route[5]<br>> {<br>> xlog("L_INFO", "time [$Tf] method <$rm> r-uri <$ru> 2nd via
<br>> <$hdr(via[1])>\n");<br>><br>> avp_db_load("$rU/username", "$avp(s:e911)");<br>><br>> xlog("L_INFO", "CURRENT AVP VALUE: $avp(s:e911)");
<br>><br>> if(is_avp_set("$avp(s:e911)"))<br>> {<br>> xlog("L_INFO", "CURRENT \$ru: $ru");<br>> avp_pushto("$ru", "$avp(s:e911)");
<br>> xlog("L_INFO", "AFTER \$ru: $ru");<br>> }<br>><br>> route(1);<br>> }<br>><br>> For route 5, and I have a AVP row for 'e911' in the database, with the
<br>> username, domain, and the attribute set, the attribute ofcourse being<br>> e911, type 0, and a value set. However, I keep getting NULL back for<br>> the AVP I'm trying to pull, does anyone care to explain what I'm doing
<br>> wrong? Thanks.<br>><br>> --<br>> Brandon Armstead<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Users mailing list
<br>> <a href="mailto:Users@openser.org">Users@openser.org</a><br>> <a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a><br>><br></blockquote></div><br>
<br clear="all"><br>-- <br>Brandon Armstead