[OpenSIPS-Users] Issues with avp_db_query in opensips 2.2.2
ahmedmunir007 at gmail.com
Mon Jan 16 10:20:28 EST 2017
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;
$var(res) = avp_db_query("SELECT Outpulse_number,setid FROM
Prefix_data where Program_prefix = $var(pg_prefix)", "$avp(outpluse),
ERROR:avpops:__fixup_db_query_avp: no db url defined to be used by
ERROR:core:fix_actions: fixing failed (code=-6) at
CRITICAL:core:fix_expr: fix_actions error
ERROR:core:main: failed to fix configuration with err code -6
Whereas, variable $var(res) is storing return code after executing DB query.
If I add this line: avp_db_query("SELECT 1"); above to my $var(res) db
query, opensips service starts successfully and don't see the errors.
Please advise the steps do I need to take to fix above issues.
BTW, declared avpops 'db_url' in module parameters.
Ahmed Munir Chohan
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users