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.
The sky is the limit ;)
Diego
Hi Luis,
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.
The script is a daemon, so when you register/unregister a phone you see something like this:
I, [2009-08-29T03:05:20.351467 #3092] INFO -- : Phone 1000%192.168.0.2 - Unregistered
I, [2009-08-29T03:05:20.864802 #3092] INFO -- : Phone 1000%192.168.0.2 - Unregistered
I, [2009-08-29T03:05:20.865763 #3092] INFO -- : Phone 1000%192.168.0.2 - Registered(UDP)
I, [2009-08-29T03:05:21.390911 #3092] INFO -- : Phone 1000%192.168.0.2 - Registered(UDP)
I, [2009-08-29T03:05:21.391308 #3092] INFO -- : Phone 1000%192.168.0.2 - Registered(UDP)
I, [2009-08-29T03:05:21.548433 #3092] INFO -- : Phone 1000%192.168.0.2 - Unregistered
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 :-).
Let me know if you have any questions or need any help.
Regards,
Diego
On Thu, Sep 3, 2009 at 8:29 PM, Luis F Urrea <lfurrea@gmail.com> wrote:Diego can you explain a little bit further what your script does.
Not really versed into ruby but I certainly interested on these eventsOn Thu, Sep 3, 2009 at 1:30 PM, Diego Viola <diego.viola@gmail.com> wrote:
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.
http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/presence/presence.rb?r=14679
DiegoOn Thu, Sep 3, 2009 at 7:27 PM, Diego Viola <diego.viola@gmail.com> wrote:
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.
DiegoOn Thu, Sep 3, 2009 at 6:40 PM, Jerry Richards <jerry.richards@teotech.com> wrote:
Does Freeswitch support Presence via SIMPLE protocol? Can it maintain
presence? I presume this would be a SUBSCRIBE/NOTIFY arrangement?
Best Regards,
Jerry
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org