[OpenSIPS-Users] avpops module
discodog62 at aol.com
discodog62 at aol.com
Wed Sep 17 20:50:11 CEST 2014
Thank you! I used the usr_preferences table with the debug level 4 it showed me the way. My issue was that I did not set a value for the last value of int.
From: Bogdan-Andrei Iancu <bogdan at opensips.org>
To: OpenSIPS users mailling list <users at lists.opensips.org>; discodog62 <discodog62 at aol.com>
Sent: Tue, Sep 16, 2014 12:10 am
Subject: Re: [OpenSIPS-Users] avpops module
I guess you try to load from avpops table the "myvar" avp belonging to UUID "220.127.116.11" (which is actually the src IP) ?
1) are you sure you properly order the values according to the dbtext header . Note that the official db structure is a bit different (see scripts/dbtext/opensips/usr_preferences )
2) run in debug mode 4 to see more logs from opensips when the query is performed.
3) you may try to temporary use db_mysql (where you can trace the actual query to DB level) to see which is the faulty part - the why you do the query or the way you have the data in DB.
OpenSIPS Founder and Developer
On 15.09.2014 21:33, discodog62 at aol.com wrote:
I am confused on the avpops module. I am hoping some one can straight things out for me.
I am using opensips 1.8
Here is my relevant setup
18.104.22.168 is the IP that I am sending the call from.
my avpops db_text file
id(int,auto) username(string) attribute(string) value(string) uuid(string) domain(string) type(int)
I am hoping that I can use the avpops module to do the following....
when a call comes in I would like to use the source ip to match the UUID and load the attribute value into my variable $avp(myvar).
xlog("L_INFO","****** Updated AVP: $avp(myvar) ******\n");
When I do this I see <null> in my $svp(myvar).
I also tried assigning the $si to a avp variable as well
$avp(tst_uuid) = $si;
I added the avp_print()
and I would see this
Sep 15 11:10:07  INFO:avpops:ops_print_avp: p=0x7fa1364ae880, flags=0x0002
Sep 15 11:10:07  INFO:avpops:ops_print_avp: id=<1>
Sep 15 11:10:07  INFO:avpops:ops_print_avp: val_str=<22.214.171.124 / 13>
Users mailing list
Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users