<font color='black' size='2' face='arial'><font face="arial" size="2" style="font-size: small; background-color: rgb(255, 255, 255);">I am confused on the avpops module. I am hoping some one can straight things out for me. </font><span style="font-size: small; background-color: rgb(255, 255, 255);"></span>
<div style="font-size: small; background-color: rgb(255, 255, 255);"><font face="arial" size="2"><br>
</font></div>
<div style="font-size: small; background-color: rgb(255, 255, 255);"><font face="arial" size="2">I am using opensips 1.8</font>
<div style="font-size: 10pt;"><br>
</div>
<div style="font-size: 10pt;">Here is my relevant setup</div>
<div style="font-size: 10pt;"><br>
</div>
<div style="font-size: 10pt;">1.2.3.4 is the IP that I am sending the call from.</div>
<div style="font-size: 10pt;"><br>
</div>
<div><font face="arial">loadmodule "avpops.so"</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">modparam("avpops", "db_url","text:///etc/opensips/dbtext") </font></div>
<div><font face="arial">modparam("avpops","avp_table","avpops")</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">my avpops db_text file</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">
<div>id(int,auto) username(string) attribute(string) value(string) uuid(string) domain(string) type(int)</div>
<div>1::myvar:AAAAA:1.2.3.4::</div>
</font></div>
<div style="font-size: 10pt;"><br>
</div>
<div style="font-size: 10pt;"><br>
</div>
<div style="font-size: 10pt;"><span style="font-size: 10pt;">I am hoping that I can use the avpops module to do the following....</span></div>
<div style="font-size: 10pt;"><br>
</div>
<div style="font-size: 10pt;">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).</div>
<div style="font-size: 10pt;"><br>
</div>
<div>
<div><font face="arial">avp_db_load("$si","$avp(myvar)/avpops");</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> xlog("L_INFO","****** Updated AVP: $avp(</font>myvar<font face="arial">) ******\n");</font></div>
</div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">When I do this I see <null> in my $svp(myvar).</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">I also tried assigning the $si to a avp variable as well </font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">$avp(tst_uuid) = $si;</font></div>
<div><font face="arial"><br>
</font></div>
<div>avp_db_load("<span style="font-size: 10pt;">$avp(tst_uuid)</span><span style="font-size: 10pt;">","$avp(myvar)/avpops");</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">same results.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">I added the avp_print()</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">and I would see this</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div>
<div><font face="arial">Sep 15 11:10:07 [15608] INFO:avpops:ops_print_avp: p=0x7fa1364ae880, flags=0x0002</font></div>
<div><font face="arial">Sep 15 11:10:07 [15608] INFO:avpops:ops_print_avp: id=<1></font></div>
<div><font face="arial">Sep 15 11:10:07 [15608] INFO:avpops:ops_print_avp: val_str=<1.2.3.4 / 13></font></div>
</div>
</div>
</font>