What I can see in the log is that there is no avp with id integer 500 (defined by the avp alias callscope), which you use in avp_db_load(). There is an avp which has the name 'callscope'. So, there must be a value for the avp i:500.
Daniel
On 11/04/05 03:30, brett-ser-list wrote:
Hello All, I'm trying (desperately) to use avp_db_load with an avp: version: ser 0.9.3 (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 @(#) $Id: main.c,v 1.197 2004/12/03 19:09:31 andrei Exp $ main.c compiled on 12:28:21 Aug 16 2005 with gcc 3.3
modparam("auth_db","avps_column_str","callscope") modparam("avpops","avp_aliases","callgroups=i:200") modparam("avpops","avp_aliases","callscope=i:500") avp_db_load("$callscope","$callgroups/avps") ;
In watching the debug, I see the avp loaded just fine from the database from the auth_db parameter: 3(1735) DEBUG:avpops:print_avp: p=0xf51c20d8, flags=3 3(1735) DEBUG: name=<callscope> 3(1735) DEBUG: val_str=<200>
but the above avp_db_load line is resulting in: 3(1735) DEBUG:avpops:get_val_as_str: no avp found 3(1735) ERROR:avpops:load_avps: failed to get uuid
I also notice that it doesn't even bother to hit the database after the auth_db hit. So unless the avp table has been cached (Which I have no idea if it has..) how would it know?
Seems like error #1: no avp found? Seems like it doesn't like my syntax but according to the avpops documentation, it should be right: source = (sip_uri|avp_alias|str_value) ['/'('username'|'domain'|'uri'|'uuid')]
note: avp_db_load("$callscope/uuid","$callgroups/avps") ; gives me: 0(0) ERROR:avpops:fixup_db_avp: source/flags "callscope" unknown!
Look, what I really want to do is use the authentication credentials to load an avp. Isn't that was avp is for? I don't want the FROM or the TO or the [R]URI, but the actual AUTHentication username. Any ideas??
Thanks!! BTW, I've tried the newest SER DEVEL CVS, and OPENSER 1.0 with basically the same results. Some custom modules I have would also make me want to stick with 0.9.0.
-Brett
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers