<font size=2 face="sans-serif">Thanks for the clarification, Daniel.</font>
<br>
<br><font size=2 face="sans-serif">I've tried the 'sqlops' solution but
there is something wrong. Is sqlops compatible with the db_text DB?</font>
<br>
<br><font size=2 face="sans-serif">I've tried:</font>
<br>
<br><font size=2 face="sans-serif">modparam(&quot;sqlops&quot;,&quot;sqlcon&quot;,&quot;ca=&gt;text:///etc/kamailio/dbtext&quot;)</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">sql_query(&quot;ca&quot;, &quot;select
* from uri&quot;, &quot;ra&quot;);</font>
<br><font size=2 face="sans-serif">xlog(&quot;rows: $dbr(ra=&gt;rows) cols:
$dbr(ra=&gt;cols)\n&quot;);</font>
<br><font size=2 face="sans-serif">sql_result_free(&quot;ra&quot;);</font>
<br><font size=2 face="sans-serif">...</font>
<br>
<br><font size=2 face="sans-serif">It gives a &quot;segmentation fault&quot;.</font>
<br>
<br><font size=2 face="sans-serif">Thanks &amp; BR,</font>
<br><font size=2 face="sans-serif">Pedro</font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">De: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Daniel-Constantin Mierla
&lt;miconda@gmail.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Para: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">&quot;SIP Router -
Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List&quot;
&lt;sr-users@lists.sip-router.org&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">cc: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Pedro Antonio Vico
Solano &lt;pvsolano@amper.es&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Fecha: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">02/03/2012 10:04</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Asunto: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [SR-Users]
Limiting registrations to known users without auth</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>Hello,<br>
<br>
check_to() matches to see if the authenticated user is allowed to use the
address in the To header, so it has to be called for authenticated requests.<br>
<br>
does_uri_exist() is checking to see if r-uri address is a valid local subscriber,
but it does not have an option take it from To header.<br>
<br>
What you can do is to use sqlops module to do a query and check if the
address (or user part of it) in To header is matching a record (username
and eventually the domain) in subscriber table.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 3/1/12 6:10 PM, Pedro Antonio Vico Solano wrote: </font>
<br><font size=2 face="sans-serif">Hello,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I'm trying to restrict registrations based on the username/number but without
authentication. I'm using &quot;uri_db&quot; module, the URI table and
the check_to() function. But when a user tries to register Kamailio 3.1.5
says the following error:</font><font size=3> <br>
</font><font size=2 face="Courier New"><br>
0(11832) ERROR: uri_db [checks.c:71]: No authorized credentials found (error
in scripts)</font><font size=3> </font><font size=2 face="Courier New"><br>
0(11832) ERROR: uri_db [checks.c:72]: Call {www,proxy}_authorize before
calling check_* functions!</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I've read README from uri_db and seems to be possible doing it the way
I do. I have the following configuration:</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
modparam(&quot;usrloc|uri_db&quot;, &quot;db_url&quot;, &quot;text:///etc/kamailio/dbtext&quot;)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
modparam(&quot;uri_db&quot;, &quot;db_table&quot;, &quot;uri&quot;)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
modparam(&quot;uri_db&quot;, &quot;use_uri_table&quot;, 1)</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
route{</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;...</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;check_to()</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;...</font><font size=3> </font><font size=2 face="sans-serif"><br>
}</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
am I doing right?</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Thanks &amp; BR,</font><font size=3> </font><font size=2 face="sans-serif"><br>
Pedro</font><font size=1 color=#008000 face="sans-serif"><br>
ADVERTENCIA <br>
<br>
Este mensaje y/o sus anexos, pueden contener información personal y confidencial
cuyo uso, reproducción o distribución no autorizados están legalmente
prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente,
lo hubiera recibido, le rogamos que informe al remitente y lo borre de
inmediato.<br>
<br>
En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de
Carácter Personal le informamos de que su dirección de correo electrónico,
así como sus datos personales y de empresa pasarán a formar parte de
nuestro fichero de Gestión, y serán tratados con la única finalidad
de mantenimiento de la relación adquirida con usted. Los datos personales
que existen en nuestro poder están protegidos por nuestra Política de
Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede
ejercitar los derechos de acceso, rectificación, cancelación y oposición
dirigiéndose por escrito a la dirección arriba indicada.<br>
<br>
This e-mail and its attachments may include confidential personal information
which may be protected by any legal rules and cannot be used, copied, distributed
or disclosed to any person without authorisation. If you are not the intended
recipient and have received this e-mail by mistake, please advise the sender
and erase it.<br>
<br>
In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection,
we hereby inform you that your email address, as well as your personal
and business information, will be included in our Management files and
used solely for purposes corresponding to our commercial relationship.
All personal data in our possession is protected by our Data Safety Policy
and thus shall not be released to any other third party whatsoever. You
may exercise your right to access, rectify, cancel and contest by writing
to the address provided above. </font><font size=3><br>
</font>
<br><tt><font size=3>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
</font></tt><a href="mailto:sr-users@lists.sip-router.org"><tt><font size=3 color=blue><u>sr-users@lists.sip-router.org</u></font></tt></a><tt><font size=3><br>
</font></tt><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"><tt><font size=3 color=blue><u>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</u></font></tt></a><tt><font size=3><br>
</font></tt>
<br>
<br><tt><font size=3>-- <br>
Daniel-Constantin Mierla -- </font></tt><a href=http://www.asipto.com/><tt><font size=3 color=blue><u>http://www.asipto.com</u></font></tt></a><tt><font size=3><br>
</font></tt><a href=http://linkedin.com/in/miconda><tt><font size=3 color=blue><u>http://linkedin.com/in/miconda</u></font></tt></a><tt><font size=3>
-- </font></tt><a href=http://twitter.com/miconda><tt><font size=3 color=blue><u>http://twitter.com/miconda</u></font></tt></a>
<br><font size=1 color=#008000 face="sans-serif"><br>
ADVERTENCIA </font><font size=2 face="sans-serif"><br>
</font><font size=1 color=#008000 face="sans-serif"><br>
Este mensaje y/o sus anexos, pueden contener información personal y confidencial
cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos.
Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera
recibido, le rogamos que informe al remitente y lo borre de inmediato.<br>
<br>
En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter
Personal le informamos de que su dirección de correo electrónico, así como
sus datos personales y de empresa pasarán a formar parte de nuestro fichero
de Gestión, y serán tratados con la única finalidad de mantenimiento de
la relación adquirida con usted. Los datos personales que existen en nuestro
poder están protegidos por nuestra Política de Seguridad, y no serán compartidos
con ninguna otra empresa. Usted puede ejercitar los derechos de acceso,
rectificación, cancelación y oposición dirigiéndose por escrito a la dirección
arriba indicada.<br>
<br>
This e-mail and its attachments may include confidential personal information
which may be protected by any legal rules and cannot be used, copied, distributed
or disclosed to any person without authorisation. If you are not the intended
recipient and have received this e-mail by mistake, please advise the sender
and erase it.<br>
<br>
In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection,
we hereby inform you that your email address, as well as your personal
and business information, will be included in our Management files and
used solely for purposes corresponding to our commercial relationship.
All personal data in our possession is protected by our Data Safety Policy
and thus shall not be released to any other third party whatsoever. You
may exercise your right to access, rectify, cancel and contest by writing
to the address provided above. </font>