<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>