Ricardo Carvalho
2007-Feb-21 11:16 UTC
[asterisk-users] Monitoring which users are online in realtime
Hi all, Is there a way to keep track in Asterisk of which phones are online in realtime using some MySQL DB table for exemple, much like "sip show peers" does in the CLI? Regards, Ricardo.
Philipp Kempgen
2007-Feb-21 11:37 UTC
[asterisk-users] Monitoring which users are online in realtime
Ricardo Carvalho wrote:> Is there a way to keep track in Asterisk of which phones are online in > realtime using some MySQL DB table for exemple, much like "sip show > peers" does in the CLI?If you are using real realtime with rtupdate=yes in sip.conf Asterisk stores the current time + sip registration time in the regseconds column in your sipfriends table (the name depends on your extconfig.conf). So you could do something like SELECT * FROM `sipfriends` WHERE `regseconds` > UNIX_TIMESTAMP() to get a list of the registered SIP friends. Regards, Philipp -- amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Let's use IT to solve problems and not to create new ones. Asterisk -> http://www.das-asterisk-buch.de Gesch?ftsf?hrer: Stefan Wintermeyer Handelsregister: Neuwied B 14998