[Asterisk-Dev] PBX status info

John Todd jtodd at loligo.com
Mon Oct 20 08:48:55 MST 2003


At 9:15 AM -0300 10/20/03, Jorge Merlino wrote:
>Hello list,
>
>I'd like to know if there is a way to know what extensions are in use at a
>given point in time. I'm thinking in the equivalent of an operator console
>which tells her the phones that are in use.
>I considered using the SQL base as the source of information for this, but the
>info is only comitted to the base when the phone hangs up. I suppose I can
>change the code to commit some information to the base when the conversation
>is initiated and then commit the rest when it finishes, but I'd like to know
>if any of you have another solution for this issue.
>
>Regards,
>	Jorge

It seems from reading the source that there is some ability to do 
this with the "hint" syntax, but I don't know what phones or what 
methods support it.

exten => 1234,hint,SIP/9999

I have no idea how that works.  I sent out a message on Thursday of 
last week asking about it - no replies.  If you find better data, 
please let us know.

JT


>To: asterisk-users-lists.digium.com
>From: John Todd <jtodd at loligo.com>
>Subject: Use of the "hint" modifiers - examples, anyone?
>
>I have found some references to the "hint" (or HINT?) variable and 
>method in the source code, but quite a bit of Google-ing has not 
>turned up any extensive answers as to some real-life examples of how 
>to use this perhaps very useful tool.  I understand the point of the 
>tool, but I need to get some actual configs to look at before I 
>think I'll figure it out.  Even if my particular equipment doesn't 
>support it, there may be other ideas I can get from it.  (JerJer - 
>maybe SCCP could use that data if there is an SCCP command of 
>similar nature to the SIP SUBSCRIBE command - that would be pretty 
>handy for those 7914 operator stations.)
>
>Searching through the source gives tantalizing hints (no pun 
>intended) in pbx.c, but no actual real-life samples.  Can someone 
>who is familiar with it put some words to the features?
>
>I found this from March 20, 2003 from Andre Bierwirth:
>
>--------
>Subject: [Asterisk-Dev] Logged in users
>To: asterisk-dev at lists.digium.com
>
>I am currently work on it. If i am ready Asterisk have functions to get =
>device or extension state.
>
>int ast_extension_state(struct ast_channel *c, char *context, char =
>*exten)
>returns=20
>-1 =3D error or no hint(device hint) for extension
>  0 =3D extension is free or unknown
>  1 =3D one device in extension is busy (have a call)
>  2 =3D all devices in extension unavailable(unregistered)
>
>** You can give ast_device_state a Dialstring like SIP/mark or IAX/mark =
>**
>
>int ast_device_state(char *device)
>returns
>-1 =3D error
>  0 =3D device is free or unknown
>  1 =3D device is busy (have a call)
>  2 =3D device is valid but unregistered
>
>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))
>
>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.
>
>With IAX you can poll the dialplan and get the extension states if its =
>implemented.
>
>Andre
>-----------
>
JT



More information about the asterisk-dev mailing list