<div dir="ltr">Try removing the second argument <i style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">"$avp(CallMaxDuration)"</i> from avp_db_query() Because the database backend does not return any results.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 8:50 AM, Rodrigo Pimenta Carvalho <span dir="ltr"><<a href="mailto:pimenta@inatel.br" target="_blank">pimenta@inatel.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear OpenSIPS-users,</p>
<p><br>
</p>
<p>In the OpenSIPS database I have created some new tables, for my project. I can read from such tables successfully. For example, the instruction</p>
<p><br>
</p>
<p> <i>avp_db_query("select Value from GeneralConfigurations where Attribute = 'CallMaxDuration'", "$avp(CallMaxDuration)");</i></p>
<p><br>
</p>
<p>run and works very well. It put the right value in the apv!</p>
<p><br>
</p>
<p>However, when the following instruction is executed, it doesn't take any effect in the database:</p>
<p><br>
</p>
<p><i> avp_db_query("update GeneralConfigurations set Value = 'yes' where Attribute = 'Exists_Intercom_Call'", "$avp(UpdateResult)");</i></p>
<p><br>
</p>
<p>The log says:</p>
<p>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<p><br>
</p>
<p>Nov 3 11:32:52 [29114] DBG:avpops:ops_dbquery_avps: query [update GeneralConfigurations set Value = 'yes' where Attribute = 'Exists_Intercom_Call']<br>
Nov 3 11:32:52 [29114] DBG:avpops:db_query_avp: no result after query<br>
Nov 3 11:32:52 [29114] DBG:avpops:db_close_query: close avp query<br>
Nov 3 11:32:52 [29114] ERROR:db_sqlite:db_sqlite_free_result: <font color="#FF0000">
invalid parameter value</font></p>
<p><br>
</p>
<p>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<p><br>
</p>
<p>But the query UPDATE is correct, because I have already tested it directly in the database.</p>
<p><br>
</p>
<p>So, am I doing something wrong? What exactly does mean that error "invalid parameter value" in this case? Can I use UPDATE in an avp_db_query?</p>
<p><br>
</p>
<p>Any hint will be very helpful!</p>
<p><br>
</p>
<p>Best regards.<span class="HOEnZb"><font color="#888888"><br>
</font></span></p><span class="HOEnZb"><font color="#888888">
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<div><font size="2">
<div>RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: <a href="tel:%2B55%2035%203471%209200" value="+553534719200" target="_blank">+55 35 3471 9200</a> RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</font></span></div>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Aron Podrigal<div>-</div><div>'1000001', '1110010', '1101111', '1101110' '1010000', '1101111', '1100100', '1110010', '1101001', '1100111', '1100001', '1101100'</div><div><br></div><div>P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'<br></div><div><br></div></div></div></div></div>
</div>