<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Ahmed,<br>
<br>
Instead of <br>
modparam("dispatcher|avpops","db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>
<br>
try:<br>
</tt><tt><tt>modparam("dispatcher","db_url","mysql://opensips:opensipsrw@localhost/opensips")</tt></tt><tt><tt><tt><br>
modparam("avpops","db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>
</tt></tt><br>
Let me know if this fixed the problem.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 01/16/2017 05:20 PM, Ahmed Munir
wrote:<br>
</div>
<blockquote
cite="mid:CAGMN=JfhjV+nGvLWt1YZ5pxp=JAFrmPLGmSMerN-PBDxvAHkbw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Hi,<br>
<br>
</div>
I've currently upgraded opensips from 1.8.8 to 2.2.2. The
issue currently facing after upgrade as getting error messages
and failed to start to opensips service when using
avp_db_query () function like; <br>
<br>
$var(res) = avp_db_query("SELECT Outpulse_number,setid FROM<br>
Prefix_data where Program_prefix = $var(pg_prefix)",
"$avp(outpluse),<br>
$avp(trunkid)");<br>
<br>
</div>
<div>Errors below;<br>
<br>
ERROR:avpops:__fixup_db_query_avp: no db url defined to be
used by<br>
this function<br>
ERROR:core:fix_actions: fixing failed (code=-6) at<br>
//etc/opensips/opensips.cfg:207<br>
CRITICAL:core:fix_expr: fix_actions error<br>
ERROR:core:main: failed to fix configuration with err code -6<br>
<br>
</div>
<div><br>
</div>
Whereas, variable $var(res) is storing return code after
executing DB query.<br>
<br>
If I add this line: avp_db_query("SELECT 1"); above to my
$var(res) db<br>
query, opensips service starts successfully and don't see the
errors.<br>
<br>
Please advise the steps do I need to take to fix above issues.<br
clear="all">
<div>
<div>
<div><br>
</div>
<div>BTW, declared avpops 'db_url' in module parameters.<br>
<br>
modparam("dispatcher|avpops","db_url","mysql://opensips:opensipsrw@localhost/opensips")<br>
<br>
</div>
<div>-- <br>
<div class="gmail_signature">Regards,<br>
<br>
Ahmed Munir Chohan<br>
<br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>