[OpenSER-Devel] [ openser-Bugs-1819309 ] avp_db_load creates other avps than instructed to

SourceForge.net noreply at sourceforge.net
Fri Oct 26 09:17:41 UTC 2007


Bugs item #1819309, was opened at 2007-10-24 16:26
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Dan (dan_pascu)
Assigned to: Daniel-Constantin Mierla (miconda)
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;value_col=timeout;table=subscriber;value_type=integer")

and then the following code:

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

Which produces:

incoming timeout for dan at umts.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:dan at umts.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 dan at umts.ro: $avp(s:timeout)");
  avp_print();
}

produces:

incoming timeout for dan at umts.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:dan at umts.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.


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

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-10-26 12:17

Message:
Logged In: YES 
user_id=1246013
Originator: NO

Fix introduced on SVN.

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

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-10-25 12:05

Message:
Logged In: YES 
user_id=1246013
Originator: NO

Seems to be due to last changes in PV structure, so 1.2 is not affected. I
am taking care of it.

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

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



More information about the Devel mailing list