List Info

Thread: avp_db_load creates other avps than instructed to




avp_db_load creates other avps than instructed to
country flaguser name
United States
2007-10-24 08:26:18
Bugs item #1819309, was opened at 2007-10-24 16:26
Message generated for change (Tracker Item Submitted) made
by Item Submitter
You can respond by visiting: 
https://sourcefo
rge.net/tracker/?func=detail&atid=743020&aid=1819309
&group_id=139143

Please note that this message will contain a full copy of
the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Dan (dan_pascu)
Assigned to: Nobody/Anonymous (nobody)
Summary: avp_db_load creates other avps than instructed to

Initial Comment:
There seems to be a problem with avp_db_load in trunk.

I have this db scheme:

modparam("avpops", "db_scheme",
"user_timeout:username_col=username;domain_col=domain;v
alue_col=timeout;table=subscriber;value_type=integer")

and then the following code:

route {
  $avp(s:can_uri) := "sip:danumts.ro";
  avp_db_load("$avp(s:can_uri)/uri",
"$avp(s:timeout)/$user_timeout");
  xlog("L_INFO", "incoming timeout for
danumts.ro: $avp(s:timeout)");
  avp_print();
}

Which produces:

incoming timeout for danumts.ro: <null>
avpops:ops_print_avp: p=0xb4408b20, flags=0x0080
avpops:ops_print_avp:                   id=<34303>
avpops:ops_print_avp:                   val_int=<20>
avpops:ops_print_avp: p=0xb4408ae8, flags=0x0003
avpops:ops_print_avp:                  
name=<can_uri>
avpops:ops_print_avp:                  
val_str=<sip:danumts.ro / 15>

notice that instead of creating $avp(s:timeout) it created
$avp(i:34303)

while this code:

route {
  avp_db_query("select timeout from subscriber where
username = 'dan' and domain = 'umts.ro'",
"$avp(s:timeout)");
  xlog("L_INFO", "incoming timeout for
danumts.ro: $avp(s:timeout)");
  avp_print();
}

produces:

incoming timeout for danumts.ro: 20
avpops:ops_print_avp: p=0xb4408b38, flags=0x0001
avpops:ops_print_avp:                  
name=<timeout>
avpops:ops_print_avp:                   val_int=<20>
avpops:ops_print_avp: p=0xb4408ae8, flags=0x0003
avpops:ops_print_avp:                  
name=<can_uri>
avpops:ops_print_avp:                  
val_str=<sip:danumts.ro / 15>

avp_db_load used to work in 1.1.x. I'm not sure about 1.2.x
since I never ran that.


------------------------------------------------------------
----------

You can respond by visiting: 
https://sourcefo
rge.net/tracker/?func=detail&atid=743020&aid=1819309
&group_id=139143

_______________________________________________
Devel mailing list
Developenser.org
htt
p://openser.org/cgi-bin/mailman/listinfo/devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )