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"><<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>></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'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 'location' 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>
> I have a scenario where I'm trying to fire a script based on the first<br>
> registration of a device. In normal circumstances I can check the<br>
> location table using registered() function and if there is an entry i<br>
> know it's not the first registration. My problem is when a phone does a<br>
> quick reboot., it sometimes comes back on line before the phone's entry<br>
> is removed from the location table. In this case, the above solution<br>
> does not work.<br>
><br>
> Can anyone provide advice on how to determine first registration of a<br>
> phone coming back online in another way?<br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
<div class="im">><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>
<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>