<br><br><div class="gmail_quote">On Wed, Jul 7, 2010 at 7:32 PM, Premalatha Kuppan <span dir="ltr"><<a href="mailto:premalatha@ngintech.com">premalatha@ngintech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br><br>Iam using avp_db_query, but opensips is dead with following error,<br><br>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 :(<br>
<br>Any insight ?<br><br>if (is_method("REGISTER"))<br> {<br> # authenticate the REGISTER requests (uncomment to enable auth)<br> if (!www_authorize("10.140.1.110", "subscriber"))<br>
{<br> www_challenge("10.140.1.110", "0");<br> exit;<br> }<br><br> # if (!db_check_to())<br> # {<br>
# sl_send_reply("403","Forbidden auth ID");<br> # exit;<br> # }<br><br> if (!save("location"))<br> sl_reply_error();<br>
<br> $var(x) = $rU ;<br> 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,_})'");<br>
exit;<br> }<br><br><br>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<br>Jul 7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]: <b>ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 351</b><br>
Jul 7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]: ERROR:core:main: failed to fix configuration with err code -6<br></blockquote><div><br>Clearly you misplaced the parenthesis:<br><br>$(var(x){s.select,0,_})',<br>
'$var(x)({s.select,1,_})', <br>'$(var(x){s.select,2,_})'<br> <br> <br></div></div><br>