<div dir="ltr">Hi Atle<div>Thanks for the input, however please note that it was working fine until I did insert the few lines above. Having said that I am running Kamailio 3.4 on that particular server.</div><div style>Regards</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 25, 2013 at 4:05 PM, Atle Samuelsen <span dir="ltr"><<a href="mailto:atle.samuelsen@gmail.com" target="_blank">atle.samuelsen@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Howdy Ali,<br>
<br>
What version of Kamailio and mysql are you running?<br>
<br>
If you are running a VERY (yes, VERY) old version..  of both, you<br>
might end up in a case, where you will see that the location database<br>
will be updated in the beginning (just after you restart your proxy)<br>
but not afterwords.<br>
<br>
try to restart your proxy, see if a few registrations end up in your<br>
database table..  If so ;) I bet the problem is mysql timeouts ;) and<br>
you should update both your mysql and your kamailio :)<br>
<span class="HOEnZb"><font color="#888888"><br>
- Atle<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Jun 25, 2013 at 3:00 PM, Ali Jawad <<a href="mailto:ali.jawad@splendor.net">ali.jawad@splendor.net</a>> wrote:<br>
> That is logical, however in that case shouldn't the location table in memory<br>
> be also missing entries ?<br>
><br>
><br>
> On Tue, Jun 25, 2013 at 3:37 PM, Olle E. Johansson <<a href="mailto:oej@edvina.net">oej@edvina.net</a>> wrote:<br>
>><br>
>><br>
>> 25 jun 2013 kl. 14:34 skrev Ali Jawad <<a href="mailto:ali.jawad@splendor.net">ali.jawad@splendor.net</a>>:<br>
>><br>
>> Dear All<br>
>><br>
>> I had an issue with my kamailio that non-registered users were able to<br>
>> send calls "I.e. similar to Asterisk Peer mode" . So I did add the following<br>
>> statement<br>
>><br>
>> if(!reg_fetch_contacts("location", "$fu", "caller"))<br>
>> {<br>
>>    sl_send_reply("403", "Please register first");<br>
>>    exit;<br>
>> }<br>
>><br>
>> That did fix the the problem with my registration issues, however as a a<br>
>> side effect the location table is not updated anymore and this broke a few<br>
>> scripts I use to maintain a few aspects of my system.<br>
>><br>
>> kamctl ul --show does display all users correctly.<br>
>><br>
>> However the database table only contains a few entries.<br>
>><br>
>><br>
>> It all depends on where you added the code, so it's very hard for any on<br>
>> the list to help you.<br>
>> You might have a problem that REGISTER statements get checked here too and<br>
>> you want<br>
>> to avoid that to get them actually to successfully register. EIther add a<br>
>> check if method<br>
>> is not equal REGISTER or that it is equal INVITE depending upon what you<br>
>> want to do.<br>
>><br>
>> Regards<br>
>> /Olle<br>
>><br>
>><br>
>> My location settings are :<br>
>><br>
>> # ----- usrloc params -----<br>
>> /* enable DB persistency for location entries */<br>
>> #!ifdef WITH_USRLOCDB<br>
>> modparam("usrloc", "timer_interval", 1)<br>
>> modparam("usrloc", "db_url", DBURL)<br>
>> modparam("usrloc", "db_mode", 2)<br>
>> modparam("usrloc", "use_domain", MULTIDOMAIN)<br>
>> #!endif<br>
>><br>
>><br>
>> Please advice<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
>> <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
>> <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Ali Jawad<br>
> Information Systems Manager<br>
> CISSP - PMP - ITIL V3 - RHCE - VCP - C|EH - CCNA - MCSA<br>
> Splendor Telecom (<a href="http://www.splendor.net" target="_blank">www.splendor.net</a>)<br>
> Beirut, Lebanon<br>
> Phone: +9611373725/ext 116<br>
> FAX: +9611375554<br>
><br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
> <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font><font color="#888888"><b>Ali Jawad    <br></b></font></font><div><div><font><font color="#888888"><b>Information Systems Manager<br>

<font size="1">CISSP - PMP - ITIL V3 - RHCE - VCP - C|EH - CCNA - MCSA</font><br></b></font></font></div><div><font><font color="#888888"><b>Splendor Telecom <span style="background-color:rgb(255,255,255)">(</span><span style="background-color:rgb(51,51,255);color:rgb(51,102,255)"><a href="http://www.splendor.net/" target="_blank"><span style="background-color:rgb(255,255,255)"><font color="#3366ff">www.splendor.net</font></span></a></span><span style="background-color:rgb(255,255,255)">)</span><br>


Beirut, Lebanon<br>Phone: +9611373725/ext 116<br>FAX: +9611375554<br><br></b></font></font><div><div></div></div></div></div></div>
</div>