[OpenSIPS-Users] Issues with avp_db_query in opensips 2.2.2
liviu at opensips.org
Mon Jan 16 11:39:07 EST 2017
You actually found a script syntax bug. Here is a workaround for it,
until a fix is available:
avp_db_query("SELECT Outpulse_number,setid FROM Prefix_data where
Program_prefix = $var(pg_prefix)", "$avp(outpluse),$avp(trunkid)");
$var(res) = $retcode; # or you can just use $retcode!
You may track the progress for this issue here .
On 16.01.2017 17:20, 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