[OpenSIPS-Users] Issues with avp_db_query in opensips 2.2.2
bogdan at opensips.org
Mon Jan 16 10:55:12 EST 2017
Let me know if this fixed the problem.
OpenSIPS Founder and Developer
On 01/16/2017 05:20 PM, Ahmed Munir wrote:
> 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),
> Errors below;
> ERROR:avpops:__fixup_db_query_avp: no db url defined to be used by
> this function
> 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
> 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
> Users mailing list
> Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users