this still does not solve the issue of a reboot that occurs in under 60 seconds. if a phone does not unregister on reboot, the record remains in the db for those 60 seconds. if it comes back up in under 60 seconds, then to opensips it looks like a reregistration. <br>
<br>is there someway to discern this scenario from the info in the location table that is already there? maybe the callid or cseq or something?<br><br><div class="gmail_quote">On Sat, Sep 26, 2009 at 1:43 PM, Alex Balashov <span dir="ltr">&lt;<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">As Inaki said, what you&#39;re trying to achieve is a little ridiculous.<br>
<br>
But, if you must do it, I recommend using a database capable of<br>
advanced triggers and decent stored procedures (PostgreSQL) and using<br>
usrloc and registrar with full database backing and no caching or<br>
synchronisation (changes immediately reflected in database).  Then put<br>
a trigger on your &#39;location&#39; table.  Trying to do this from the route<br>
script is silly.<br>
<div><div></div><div class="h5"><br>
Alex G wrote:<br>
<br>
&gt; I have a scenario where I&#39;m trying to fire a script based on the first<br>
&gt; registration of a device. In normal circumstances I can check the<br>
&gt; location table using registered() function and if there is an entry i<br>
&gt; know it&#39;s not the first registration. My problem is when a phone does a<br>
&gt; quick reboot., it sometimes comes back on line before the phone&#39;s entry<br>
&gt; is removed from the location table. In this case, the above solution<br>
&gt; does not work.<br>
&gt;<br>
&gt; Can anyone provide advice on how to determine first registration of a<br>
&gt; phone coming back online in another way?<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
<div class="im">&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&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>
<br>
<br>
</div><font color="#888888">--<br>
Alex Balashov - Principal<br>
Evariste Systems<br>
Web     : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
Tel     : (+1) (678) 954-0670<br>
Direct  : (+1) (678) 954-0671<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>