[OpenSIPS-Users] URI PARSING

mayamatakeshi mayamatakeshi at gmail.com
Wed Jul 7 12:43:27 CEST 2010


On Wed, Jul 7, 2010 at 7:32 PM, Premalatha Kuppan
<premalatha at ngintech.com>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,_})'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100707/8bcd1940/attachment.htm 


More information about the Users mailing list