You should try to do something like "event plain all" from the freeswitch CLI and see all the events that you can use in your apps, etc.<br><br>The sky is the limit ;)<br><br>Diego<br><br><div class="gmail_quote">
On Thu, Sep 3, 2009 at 8:46 PM, Diego Viola <span dir="ltr"><<a href="mailto:diego.viola@gmail.com">diego.viola@gmail.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;">
Hi Luis,<br><br>My script simply adds two event hooks for presence (PRESENCE_IN and PRESENCE_OUT) and then it passes those events to a method (presence_handler) and it prints the "from" which is something like: 1000%192.168.0.2 (the user and ip) and the status: which can be Registered or Unregistered.<br>
<br>The script is a daemon, so when you register/unregister a phone you see something like this:<br><br><font size="2"><b>I, [2009-08-29T03:05:20.351467 #3092] INFO -- : Phone 1000%192.168.0.2 - Unregistered<br><br>I, [2009-08-29T03:05:20.864802 #3092] INFO -- : Phone 1000%192.168.0.2 - Unregistered<br>
<br>I, [2009-08-29T03:05:20.865763 #3092] INFO -- : Phone 1000%192.168.0.2 - Registered(UDP)<br><br>I, [2009-08-29T03:05:21.390911 #3092] INFO -- : Phone 1000%192.168.0.2 - Registered(UDP)<br><br>I, [2009-08-29T03:05:21.391308 #3092] INFO -- : Phone 1000%192.168.0.2 - Registered(UDP)<br>
<br>I, [2009-08-29T03:05:21.548433 #3092] INFO -- : Phone 1000%192.168.0.2 - Unregistered</b></font><br><br>That's pretty much what it does, but this makes it possible to make apps to report the status of phones, etc. I was thinking to send that information on a database and then show it on a web interface, with Ajax, etc. on "near real time", it would be pretty cool :-).<br>
<br>Let me know if you have any questions or need any help.<br><br>Regards,<br><font color="#888888"><br>Diego</font><div><div></div><div class="h5"><br><br>
<div class="gmail_quote">On Thu, Sep 3, 2009 at 8:29 PM, Luis F Urrea <span dir="ltr"><<a href="mailto:lfurrea@gmail.com" target="_blank">lfurrea@gmail.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;">
Diego can you explain a little bit further what your script does.<br><br>Not really versed into ruby but I certainly interested on these events<div><div></div><div><br><br><div class="gmail_quote">On Thu, Sep 3, 2009 at 1:30 PM, Diego Viola <span dir="ltr"><<a href="mailto:diego.viola@gmail.com" target="_blank">diego.viola@gmail.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;">I have made a simple script that catches the PRESENCE IN/OUT events and passes them to a method to get the information for the phones, you can take a look at it here.<br>
<br><a href="http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/presence/presence.rb?r=14679" target="_blank">http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/presence/presence.rb?r=14679</a><br>
<font color="#888888">
<br>Diego</font><div><div></div><div><br><br><div class="gmail_quote">On Thu, Sep 3, 2009 at 7:27 PM, Diego Viola <span dir="ltr"><<a href="mailto:diego.viola@gmail.com" target="_blank">diego.viola@gmail.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;">
Not sure if it does via SIMPLE protocol, but if you do "event plain all" you should see the PRESENCE_IN and PRESENCE_OUT events.<br><font color="#888888"><br>Diego</font><div><div></div><div><br><br><div class="gmail_quote">
On Thu, Sep 3, 2009 at 6:40 PM, Jerry Richards <span dir="ltr"><<a href="mailto:jerry.richards@teotech.com" target="_blank">jerry.richards@teotech.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;">Does Freeswitch support Presence via SIMPLE protocol? Can it maintain<br>
presence? I presume this would be a SUBSCRIBE/NOTIFY arrangement?<br>
<br>
Best Regards,<br>
Jerry<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>