[OpenSIPS-Users] avpops module
discodog62 at aol.com
discodog62 at aol.com
Mon Sep 15 20:33:01 CEST 2014
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
1.2.3.4 is the IP that I am sending the call from.
loadmodule "avpops.so"
modparam("avpops", "db_url","text:///etc/opensips/dbtext")
modparam("avpops","avp_table","avpops")
my avpops db_text file
id(int,auto) username(string) attribute(string) value(string) uuid(string) domain(string) type(int)
1::myvar:AAAAA:1.2.3.4::
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).
avp_db_load("$si","$avp(myvar)/avpops");
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;
avp_db_load("$avp(tst_uuid)","$avp(myvar)/avpops");
same results.
I added the avp_print()
and I would see this
Sep 15 11:10:07 [15608] INFO:avpops:ops_print_avp: p=0x7fa1364ae880, flags=0x0002
Sep 15 11:10:07 [15608] INFO:avpops:ops_print_avp: id=<1>
Sep 15 11:10:07 [15608] INFO:avpops:ops_print_avp: val_str=<1.2.3.4 / 13>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140915/218d2489/attachment.htm>
More information about the Users
mailing list