<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=812273713-28082006><FONT face=Arial
color=#0000ff size=2>IIRC, you'll want to look at 'hint' extensions, and
possibly subscriptions to get status updates</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <B>On Behalf Of
</B>Mir<BR><B>Sent:</B> Monday, August 28, 2006 9:34 AM<BR><B>To:</B> Asterisk
Users Mailing List - Non-Commercial Discussion<BR><B>Subject:</B> Re:
[asterisk-users] RE: [asterisk-dev] Phone status<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Your are right, I dont have to invent the wheel again, and I'm getting
cleverer by looking at other peoples code.</DIV>
<DIV> </DIV>
<DIV>But this does not solve my problems, I have worked in the PABX business
as a software developer for about 8 years, and coming to * is not all that
easy. </DIV>
<DIV> </DIV>
<DIV>For instance, * does not give you very good information of the state of
extensions (like we are used to in the "old-fashioned" PABX business), or
maybe I'm not good at finding the information.</DIV>
<DIV> </DIV>
<DIV>I'm trying to port an existing Windows application to *, its a dialer,
used to dial and se information about received calls.</DIV>
<DIV> </DIV>
<DIV>I know how to dial new calls, by using ORIGINATE on the AMI.</DIV>
<DIV>I can receive some status information via the AMI, but consider this
example:</DIV>
<DIV> </DIV>
<DIV>I receive a call, which I accept. I get an event from
the AMI, that the call is now in the UP state.</DIV>
<DIV>I receive another call, I get en event from the AMI, that the new call is
in the RINGING state.</DIV>
<DIV> </DIV>
<DIV>So far, so good.</DIV>
<DIV> </DIV>
<DIV>I now answer the other call (for instance by the line button on my
phone).</DIV>
<DIV>Both calls are now in the UP state, who am I talking to?</DIV>
<DIV> </DIV>
<DIV>This, and many other questions, are currently making me even more thin
haired than normal :-)</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Michael <BR><BR> </DIV>
<DIV><SPAN class=gmail_quote>2006/8/25, C F <<A
href="mailto:shmaltz@gmail.com">shmaltz@gmail.com</A>>:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">So
how about inventing a car? The auto industry is much more
profitable.<BR><BR>The point; there is no point in reinventing the wheel,
why are you <BR>writing this from scratch?<BR><BR>On 8/24/06, Mir <<A
href="mailto:michael.sysdba@gmail.com">michael.sysdba@gmail.com</A>>
wrote:<BR>><BR>> What do you mean?<BR>><BR>> I'm not looking for
someone elses work, I'm developing an application from <BR>>
scratch.<BR>><BR>> Michael<BR>><BR>><BR>> 2006/8/24, Andrew
Kirch <<A
href="mailto:AKirch@allthingsit.com">AKirch@allthingsit.com</A>>:<BR>>
><BR>><BR>><BR>><BR>><BR>><BR>> Umm… Flash operator
panel?<BR>><BR>><BR>><BR>>
Andrew<BR>><BR>><BR>><BR>> ________________________________<BR>><BR>><BR>>
From: <A
href="mailto:asterisk-dev-bounces@lists.digium.com">asterisk-dev-bounces@lists.digium.com</A><BR>>
[mailto:<A
href="mailto:asterisk-dev-bounces@lists.digium.com">asterisk-dev-bounces@lists.digium.com</A>]
On Behalf Of<BR>> Mir<BR>> Sent: Thursday, August 24, 2006 2:18 PM
<BR>> To: <A
href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</A>;
<A
href="mailto:asterisk-dev@lists.digium.com">asterisk-dev@lists.digium.com</A><BR>> Subject:
[asterisk-dev] Phone status <BR>><BR>><BR>><BR>><BR>><BR>>
Hi<BR>><BR>><BR>><BR>><BR>><BR>> I'm working on a project,
where I need the status of every telephone on the<BR>> system.
(Idle,ringing,busy)<BR>><BR>><BR>> If a phone is busy, I also need
to know the callerid of the other
end.<BR>><BR>><BR>><BR>><BR>><BR>> I have made a deamon,
which query Asterisk every second for active calls,<BR>> this works by
issuing a "Status" to the manager-interface, and processing <BR>> the
return data and then put the result into a MySQL
table.<BR>><BR>><BR>><BR>><BR>><BR>> The clients will
query the MySQL table every second for the state of their<BR>> phone, if
there are no records with their numbers in it, they are considered <BR>>
idle.<BR>><BR>><BR>><BR>><BR>><BR>> This works fine for
calls from one SIP-phone to the other, this is for<BR>> instance what it
look like when extension 310 is connected to extension
311:<BR>><BR>><BR>><BR>><BR>><BR>> Event: Status<BR>>
Privilege: Call<BR>> Channel: SIP/310-08697fb8<BR>> CallerID:
310<BR>> CallerIDName: <unknown><BR>> Account:<BR>> State:
Up<BR>> Link: SIP/311-0868fd98 <BR>> Uniqueid:
1156442804.74<BR>><BR>><BR>> Event: Status<BR>> Privilege:
Call<BR>> Channel: SIP/311-0868fd98<BR>> CallerID: 311<BR>>
CallerIDName: Snom<BR>> Account:<BR>> State: Up<BR>> Context:
macro-vm <BR>> Extension: s<BR>> Priority: 5<BR>> Seconds:
13<BR>> Link: SIP/310-08697fb8<BR>> Uniqueid:
1156442804.73<BR>><BR>> That is pretty easy to decode.<BR>><BR>>
However when an external call is made to a SIP-phone, the result is <BR>>
different, this is a call from another Asterisk via an IAX
trunk:<BR>><BR>> Event: Status<BR>> Privilege: Call<BR>>
Channel: SIP/311-08695698<BR>> CallerID: 35254390<BR>> CallerIDName:
<unknown> <BR>> Account:<BR>> State: Up<BR>> Link:
IAX2/MR-1<BR>> Uniqueid: 1156442974.76<BR>><BR>><BR>> Event:
Status<BR>> Privilege: Call<BR>> Channel: IAX2/MR-1<BR>> CallerID:
35436121<BR>> CallerIDName: <unknown> <BR>> Account:<BR>>
State: Up<BR>> Context: macro-vm<BR>> Extension: s<BR>> Priority:
5<BR>> Seconds: 9<BR>> Link: SIP/311-08695698<BR>> Uniqueid:
1156442974.75<BR>><BR>> The actual callerid of the caller is 3536121,
35254390 is the called number. <BR>><BR>> How do I get the
information, that 35436121 is connected to 311?<BR>><BR>> Am I doing
it in a stupid way, I'm aware that the Manager can give me<BR>> realtime
events, but I'm under the impression, that it is not very stable in <BR>>
a high traffic environment?<BR>><BR>> Any help or good ideas would be
appriceated.<BR>><BR>>
Michael<BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>>
_______________________________________________ <BR>> --Bandwidth and
Colocation provided by <A href="http://Easynews.com">Easynews.com</A>
--<BR>><BR>> asterisk-users mailing list<BR>> To UNSUBSCRIBE or
update options visit:<BR>><BR>> <A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>><BR>><BR>><BR>><BR>>
_______________________________________________<BR>> --Bandwidth and
Colocation provided by <A href="http://Easynews.com">Easynews.com</A>
--<BR>><BR>> asterisk-users mailing list<BR>> To UNSUBSCRIBE or
update options visit:<BR>><BR>> <A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</A><BR>><BR>><BR>><BR>_______________________________________________<BR>--Bandwidth
and Colocation provided by <A href="http://Easynews.com">Easynews.com</A>
--<BR><BR>asterisk-users mailing list<BR>To UNSUBSCRIBE or update options
visit: <BR> <A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>