Thanks for the reply Uwe,<div>Can someone please help me on where to find this binary and how to build it!! Also would there be all the features consistent that are present in the 1.5.1 version.</div><div><br></div><div>Thank you again,</div>
<div><br></div><div>--- Jay<br><br><div class="gmail_quote">On Thu, Jun 18, 2009 at 1:17 AM, Uwe Kastens <span dir="ltr">&lt;<a href="mailto:kiste@kiste.org">kiste@kiste.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
ok. good point in a high traffic env.<br>
<br>
The same thing may work if you build a binary which works with the<br>
ul_delete_urecord(domain, aor)<br>
(<a href="http://www.opensips.org/html/docs/modules/1.5.x/usrloc.html" target="_blank">http://www.opensips.org/html/docs/modules/1.5.x/usrloc.html</a>) and call<br>
it each time a user registers.<br>
<br>
BR<br>
<br>
uwe<br>
<br>
<br>
Jayesh Nambiar schrieb:<br>
<div class="im">&gt; Hi Uwe,<br>
&gt; This will not work well if i use db_mode as 2 in the usrloc module.<br>
&gt; db_mode 1 does lot of DB queries !!!<br>
&gt;<br>
&gt; --- Jay<br>
&gt;<br>
&gt; On Wed, Jun 17, 2009 at 4:33 PM, Uwe Kastens &lt;<a href="mailto:kiste@kiste.org">kiste@kiste.org</a><br>
</div><div><div></div><div class="h5">&gt; &lt;mailto:<a href="mailto:kiste@kiste.org">kiste@kiste.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi,<br>
&gt;<br>
&gt;     You could solve this by working with AVP and sql. The idea could be:<br>
&gt;<br>
&gt;     if (method==&quot;REGISTER&quot;){<br>
&gt;     Authentication goes here<br>
&gt;     $avp(s:user)=$aU;<br>
&gt;     avp_db_query(&quot;select count() from location where<br>
&gt;     username=&#39;$avp(s:user)&#39;&quot;,&quot;var(x)&quot;);<br>
&gt;<br>
&gt;     if var(x) &gt; 0 {<br>
&gt;     avp_db_query(&quot;delete from location where username=&#39;$avp(s:user)&#39;&quot;);<br>
&gt;     }<br>
&gt;<br>
&gt;     save(&quot;location&quot;);<br>
&gt;     Untested!<br>
&gt;<br>
&gt;     BR<br>
&gt;<br>
&gt;     Uwe<br>
&gt;     Jayesh Nambiar schrieb:<br>
&gt;     &gt; Hi All,<br>
&gt;     &gt; I had a requirement of allowing only one registration per user in a<br>
&gt;     &gt; particular scenario. I did not want to use the max_contacts<br>
&gt;     parameter of<br>
&gt;     &gt; registrar module as it wont work right !!! The drawback was:<br>
&gt;     &gt; If device A had registered successfully and for some reason got<br>
&gt;     &gt; disconnected from the internet, the device won&#39;t unregister itself.<br>
&gt;     &gt; Opensips still has the record in the location table for that<br>
&gt;     device, now<br>
&gt;     &gt; if the internet comes back and when the device tries to register<br>
&gt;     again,<br>
&gt;     &gt; opensips will not allow since it already has the record in the<br>
&gt;     location.<br>
&gt;     &gt; The device will have to wait until the earlier registration expires in<br>
&gt;     &gt; the opensips.<br>
&gt;     &gt; The idea was to have a way of updating the location table if same user<br>
&gt;     &gt; is trying to REGISTER from same location or different location.<br>
&gt;     Meaning<br>
&gt;     &gt; if user A is registered from location A and someone else using same<br>
&gt;     &gt; credentials of user A tries to register from location B, the location<br>
&gt;     &gt; table should only update the earlier record to location B and not keep<br>
&gt;     &gt; location A and location B both for user A.<br>
&gt;     &gt;<br>
&gt;     &gt; Is there a way to do this. Any help will be highly appreciiated.<br>
&gt;     &gt;<br>
&gt;     &gt; Thanks in advance.<br>
&gt;     &gt;<br>
&gt;     &gt; --- Jay<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     ------------------------------------------------------------------------<br>
&gt;     &gt;<br>
&gt;     &gt; _______________________________________________<br>
&gt;     &gt; Users mailing list<br>
</div></div>&gt;     &gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> &lt;mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>&gt;<br>
<div class="im">&gt;     &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
&gt;     --<br>
&gt;<br>
&gt;     kiste lat: 54.322684, lon: 10.13586<br>
&gt;<br>
&gt;<br>
<br>
<br>
</div>--<br>
<div><div></div><div class="h5"><br>
kiste lat: 54.322684, lon: 10.13586<br>
</div></div></blockquote></div><br></div>