<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I am currently work on it. If i am ready Asterisk
have functions to get device or extension state.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>int ast_extension_state(struct ast_channel *c, char
*context, char *exten)</FONT></DIV>
<DIV><FONT face=Arial size=2>returns </FONT></DIV>
<DIV><FONT face=Arial size=2>-1 = error or no hint(device hint) for
extension</FONT></DIV>
<DIV><FONT face=Arial size=2> 0 = extension is free or unknown</FONT></DIV>
<DIV><FONT face=Arial size=2> 1 = one device in extension is busy (have a
call)</FONT></DIV>
<DIV><FONT face=Arial size=2> 2 = all devices in extension
unavailable(unregistered)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>** You can give ast_device_state a Dialstring like
SIP/mark or IAX/mark **</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>int ast_device_state(char *device)</FONT></DIV>
<DIV><FONT face=Arial size=2>returns</FONT></DIV>
<DIV><FONT face=Arial size=2>-1 = error</FONT></DIV>
<DIV><FONT face=Arial size=2> 0 = device is free or unknown</FONT></DIV>
<DIV><FONT face=Arial size=2> 1 = device is busy (have a call)</FONT></DIV>
<DIV><FONT face=Arial size=2> 2 = device is valid but
unregistered</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>So SIP can support SUBSCRIBE requests, and for
Snom200 SUBSCIBE Dialogs (Map a Key to an extension and see if the extension
have a call (the LED turned on))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Its easy to implement the device state support for
IAX, i have talk with mark about it. I implement only the PBX and
Channel and SIP functions.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With IAX you can poll the dialplan and get the
extension states if its implemented.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Andre</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=steve_callsystem@yahoo.com
href="mailto:steve_callsystem@yahoo.com">Steve K</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-dev@lists.digium.com
href="mailto:asterisk-dev@lists.digium.com">asterisk-dev@lists.digium.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, March 24, 2003 9:35
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Asterisk-Dev] Logged in
users</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<P>Hey guys, </P>
<P>I was just wondering if there is a way to query the asterisk server (from a
client) so it can return a list of logged in clients?</P>
<P><FONT face=Arial size=2></FONT> </P>
<P>Steve K</P>
<P><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR>
<HR SIZE=1>
Do you Yahoo!?<BR><A
href="http://rd.yahoo.com/platinum/evt=8162/*http://platinum.yahoo.com/splash.html">Yahoo!
Platinum</A> - Watch CBS' NCAA March Madness, <A
href="http://rd.yahoo.com/platinum/evt=8162/*http://platinum.yahoo.com/splash.html">live
on your desktop</A>!</BLOCKQUOTE></BODY></HTML>