On Wed, Jul 7, 2010 at 7:32 PM, Premalatha Kuppan
<[email protected]>wrote:
> Hi,
>
> Iam using avp_db_query, but opensips is dead with following error,
>
> During Registration, when the user is registered. I have to parse and store
> th value in DB. So, included the avp_db_query in this loop. Is this right
> one to do. I assume the value of rU is NULL over here, probably its failing.
> Not sure :(
>
> Any insight ?
>
> if (is_method("REGISTER"))
> {
> # authenticate the REGISTER requests (uncomment to enable
> auth)
> if (!www_authorize("10.140.1.110", "subscriber"))
> {
> www_challenge("10.140.1.110", "0");
> exit;
> }
>
> # if (!db_check_to())
> # {
> # sl_send_reply("403","Forbidden auth ID");
> # exit;
> # }
>
> if (!save("location"))
> sl_reply_error();
>
> $var(x) = $rU ;
> avp_db_query("INSERT INTO TESTTABLE (xxx,yyy,zzz)
> VALUES('$(var(x){s.select,0,_})','$var(x)({s.select,1,_})','$(var(x){s.select,2,_})'");
> exit;
> }
>
>
> Jul 7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]:
> ERROR:avpops:fixup_db_query_avp: no db url defined to be used by this
> function
> Jul 7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]:
> *ERROR:core:fix_actions:
> fixing failed (code=-6) at cfg line 351*
> Jul 7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]: ERROR:core:main:
> failed to fix configuration with err code -6
>
Clearly you misplaced the parenthesis:
$(var(x){s.select,0,_})',
'$var(x)({s.select,1,_})',
'$(var(x){s.select,2,_})'
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users