Re: [asterisk-users] RE: [asterisk-dev] Phone status

2006-08-28 Thread Mir
Your are right, I dont have to invent the wheel again, and I'm getting cleverer by looking at other peoples code.

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. 

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.

I'm trying to port an existing Windows application to *, its a dialer, used to dial and se information about received calls.

I know how to dial new calls, by using ORIGINATE on the AMI.
I can receive some status information via the AMI, but consider this example:

I receive a call, which I accept. I get an event from theAMI,that the call is now in the UP state.
I receive another call, I get en event from the AMI, that the new call is in the RINGING state.

So far, so good.

I now answer the other call (for instance by the line button on my phone).
Both calls are now in the UP state, who am I talking to?

This, and many other questions, are currently making me even more thin haired than normal :-)


Michael
2006/8/25, C F [EMAIL PROTECTED]:
So how about inventing a car? The auto industry is much more profitable.The point; there is no point in reinventing the wheel, why are you
writing this from scratch?On 8/24/06, Mir [EMAIL PROTECTED] wrote: What do you mean? I'm not looking for someone elses work, I'm developing an application from
 scratch. Michael 2006/8/24, Andrew Kirch [EMAIL PROTECTED]: 
 Umm… Flash operator panel? Andrew From: 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Mir Sent: Thursday, August 24, 2006 2:18 PM
 To: asterisk-users@lists.digium.com; asterisk-dev@lists.digium.comSubject: [asterisk-dev] Phone status
 Hi I'm working on a project, where I need the status of every telephone on the system. (Idle,ringing,busy)
 If a phone is busy, I also need to know the callerid of the other end. I have made a deamon, which query Asterisk every second for active calls, this works by issuing a Status to the manager-interface, and processing
 the return data and then put the result into a MySQL table. The clients will query the MySQL table every second for the state of their phone, if there are no records with their numbers in it, they are considered
 idle. This works fine for calls from one SIP-phone to the other, this is for instance what it look like when extension 310 is connected to extension 311:
 Event: Status Privilege: Call Channel: SIP/310-08697fb8 CallerID: 310 CallerIDName: unknown Account: State: Up Link: SIP/311-0868fd98
 Uniqueid: 1156442804.74 Event: Status Privilege: Call Channel: SIP/311-0868fd98 CallerID: 311 CallerIDName: Snom Account: State: Up Context: macro-vm
 Extension: s Priority: 5 Seconds: 13 Link: SIP/310-08697fb8 Uniqueid: 1156442804.73 That is pretty easy to decode. However when an external call is made to a SIP-phone, the result is
 different, this is a call from another Asterisk via an IAX trunk: Event: Status Privilege: Call Channel: SIP/311-08695698 CallerID: 35254390 CallerIDName: unknown
 Account: State: Up Link: IAX2/MR-1 Uniqueid: 1156442974.76 Event: Status Privilege: Call Channel: IAX2/MR-1 CallerID: 35436121 CallerIDName: unknown
 Account: State: Up Context: macro-vm Extension: s Priority: 5 Seconds: 9 Link: SIP/311-08695698 Uniqueid: 1156442974.75 The actual callerid of the caller is 3536121, 35254390 is the called number.
 How do I get the information, that 35436121 is connected to 311? Am I doing it in a stupid way, I'm aware that the Manager can give me realtime events, but I'm under the impression, that it is not very stable in
 a high traffic environment? Any help or good ideas would be appriceated. Michael ___
 --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by 
Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
___--Bandwidth and Colocation provided by Easynews.com --asterisk-users mailing listTo UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [asterisk-users] RE: [asterisk-dev] Phone status

2006-08-28 Thread Rushowr



IIRC, you'll want to look at 'hint' extensions, and 
possibly subscriptions to get status updates

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  MirSent: Monday, August 28, 2006 9:34 AMTo: Asterisk 
  Users Mailing List - Non-Commercial DiscussionSubject: Re: 
  [asterisk-users] RE: [asterisk-dev] Phone status
  
  Your are right, I dont have to invent the wheel again, and I'm getting 
  cleverer by looking at other peoples code.
  
  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. 
  
  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.
  
  I'm trying to port an existing Windows application to *, its a dialer, 
  used to dial and se information about received calls.
  
  I know how to dial new calls, by using ORIGINATE on the AMI.
  I can receive some status information via the AMI, but consider this 
  example:
  
  I receive a call, which I accept. I get an event from 
  theAMI,that the call is now in the UP state.
  I receive another call, I get en event from the AMI, that the new call is 
  in the RINGING state.
  
  So far, so good.
  
  I now answer the other call (for instance by the line button on my 
  phone).
  Both calls are now in the UP state, who am I talking to?
  
  This, and many other questions, are currently making me even more thin 
  haired than normal :-)
  
  
  Michael
  2006/8/25, C F [EMAIL PROTECTED]: 
  So 
how about inventing a car? The auto industry is much more 
profitable.The point; there is no point in reinventing the wheel, 
why are you writing this from scratch?On 8/24/06, Mir [EMAIL PROTECTED] 
wrote: What do you mean? I'm not looking for 
someone elses work, I'm developing an application from  
scratch. Michael 2006/8/24, Andrew 
Kirch [EMAIL PROTECTED]: 
 Umm Flash operator 
panel? 
Andrew 
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]] 
On Behalf Of Mir Sent: Thursday, August 24, 2006 2:18 PM 
 To: asterisk-users@lists.digium.com; 
asterisk-dev@lists.digium.comSubject: 
[asterisk-dev] Phone status  
Hi I'm working on a project, 
where I need the status of every telephone on the system. 
(Idle,ringing,busy) If a phone is busy, I also need 
to know the callerid of the other 
end. I have made a deamon, 
which query Asterisk every second for active calls, this works by 
issuing a "Status" to the manager-interface, and processing  the 
return data and then put the result into a MySQL 
table. The clients will 
query the MySQL table every second for the state of their phone, if 
there are no records with their numbers in it, they are considered  
idle. This works fine for 
calls from one SIP-phone to the other, this is for instance what it 
look like when extension 310 is connected to extension 
311: Event: Status 
Privilege: Call Channel: SIP/310-08697fb8 CallerID: 
310 CallerIDName: unknown Account: State: 
Up Link: SIP/311-0868fd98  Uniqueid: 
1156442804.74 Event: Status Privilege: 
Call Channel: SIP/311-0868fd98 CallerID: 311 
CallerIDName: Snom Account: State: Up Context: 
macro-vm  Extension: s Priority: 5 Seconds: 
13 Link: SIP/310-08697fb8 Uniqueid: 
1156442804.73 That is pretty easy to decode. 
However when an external call is made to a SIP-phone, the result is  
different, this is a call from another Asterisk via an IAX 
trunk: Event: Status Privilege: Call 
Channel: SIP/311-08695698 CallerID: 35254390 CallerIDName: 
unknown  Account: State: Up Link: 
IAX2/MR-1 Uniqueid: 1156442974.76 Event: 
Status Privilege: Call Channel: IAX2/MR-1 CallerID: 
35436121 CallerIDName: unknown  Account: 
State: Up Context: macro-vm Extension: s Priority: 
5 Seconds: 9 Link: SIP/311-08695698 Uniqueid: 
1156442974.75 The actual callerid of the caller is 3536121, 
35254390 is the called number.  How do I get the 
information, that 35436121 is connected to 311? Am I doing 
it in a stupid way, I'm aware that the Manager can give me realtime 
events, but I'm under the impression, that it is not very stable in  
a high traffic environment? Any help or good ideas would be 
appriceated. 
Michael 
___  --Bandwidth and 
Colocation provided by Easynews.com 
-- asterisk-users mailing list To UNSUBSCRIBE or 
update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users 
___ --Bandwidth and 
Colocation provided by Easynews.com 
-- asterisk-users mailing list To UNSUBSCRIBE or 
update

Re: [asterisk-users] RE: [asterisk-dev] Phone status

2006-08-24 Thread Mir
What do you mean?

I'm not looking for someone elses work, I'm developing an application from scratch.

Michael
2006/8/24, Andrew Kirch [EMAIL PROTECTED]:




Umm… Flash operator panel?

Andrew





From: 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
On Behalf Of MirSent: Thursday, August 24, 2006 2:18 PMTo: 
asterisk-users@lists.digium.com; asterisk-dev@lists.digium.com
Subject: [asterisk-dev] Phone status



Hi



I'm working on a project, where I need the status of every telephone on the system. (Idle,ringing,busy)

If a phone is busy, I also need to know the callerid of the other end.



I have made a deamon, which query Asterisk every second for active calls, this works by issuing a Status to the manager-interface, and processing the return data and then put the result into a MySQLtable. 




The clients will query the MySQL table every second for the state of their phone, if there are no records with their numbers in it, they are considered idle.




This works fine for calls from one SIP-phone to the other, this is for instance what it look like when extension 310 is connected to extension 311:




Event: StatusPrivilege: CallChannel: SIP/310-08697fb8CallerID: 310CallerIDName: unknownAccount: State: UpLink: SIP/311-0868fd98
Uniqueid: 1156442804.74
Event: StatusPrivilege: CallChannel: SIP/311-0868fd98CallerID: 311CallerIDName: SnomAccount: State: UpContext: macro-vm
Extension: sPriority: 5Seconds: 13Link: SIP/310-08697fb8 Uniqueid: 1156442804.73
That is pretty easy to decode.
However when an external call is made to a SIP-phone, the result is different, this is a call from another Asterisk via an IAX trunk:

Event: StatusPrivilege: CallChannel: SIP/311-08695698CallerID: 35254390CallerIDName: unknownAccount: State: UpLink: IAX2/MR-1
Uniqueid: 1156442974.76
Event: StatusPrivilege: CallChannel: IAX2/MR-1CallerID: 35436121CallerIDName: unknownAccount: State: UpContext: macro-vm
Extension: sPriority: 5Seconds: 9Link: SIP/311-08695698 Uniqueid: 1156442974.75
The actual callerid of the caller is 3536121, 35254390 is the called number.
How do I get the information, that 35436121 is connected to 311?
Am I doing it in a stupid way, I'm aware that the Manager can give me realtime events, but I'm under the impression, that it is not very stable in a high traffic environment?

Any help or good ideas would be appriceated.
Michael





___--Bandwidth and Colocation provided by Easynews.com
 --asterisk-users mailing listTo UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [asterisk-users] RE: [asterisk-dev] Phone status

2006-08-24 Thread Dean Collins








I guess what Andrew was saying is what are
you trying to do specifically that Flash Operator Panel doesnt already give
you







Cheers,

Dean













From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mir
Sent: Thursday, 24 August 2006
2:48 PM
To: Asterisk Users Mailing List -
Non-Commercial Discussion
Subject: Re: [asterisk-users] RE:
[asterisk-dev] Phone status







What do you mean?











I'm not looking for someone elses work, I'm developing an application
from scratch.











Michael







2006/8/24, Andrew Kirch [EMAIL PROTECTED]:








Umm Flash operator panel?



Andrew











From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Mir
Sent: Thursday, August 24, 2006
2:18 PM
To: asterisk-users@lists.digium.com;
asterisk-dev@lists.digium.com
Subject: [asterisk-dev] Phone
status











Hi











I'm
working on a project, where I need the status of every telephone on the system.
(Idle,ringing,busy)





If
a phone is busy, I also need to know the callerid of the other end.











I
have made a deamon, which query Asterisk every second for active calls, this
works by issuing a Status to the manager-interface, and processing
the return data and then put the result into a MySQLtable. 











The
clients will query the MySQL table every second for the state of their phone,
if there are no records with their numbers in it, they are considered idle. 











This
works fine for calls from one SIP-phone to the other, this is for instance what
it look like when extension 310 is connected to extension 311: 











Event:
Status
Privilege: Call
Channel: SIP/310-08697fb8
CallerID: 310
CallerIDName: unknown
Account: 
State: Up
Link: SIP/311-0868fd98 
Uniqueid: 1156442804.74


Event: Status
Privilege: Call
Channel: SIP/311-0868fd98
CallerID: 311
CallerIDName: Snom
Account: 
State: Up
Context: macro-vm 
Extension: s
Priority: 5
Seconds: 13
Link: SIP/310-08697fb8 
Uniqueid: 1156442804.73

That
is pretty easy to decode.

However
when an external call is made to a SIP-phone, the result is different, this is
a call from another Asterisk via an IAX trunk:

Event:
Status
Privilege: Call
Channel: SIP/311-08695698
CallerID: 35254390
CallerIDName: unknown
Account: 
State: Up
Link: IAX2/MR-1 
Uniqueid: 1156442974.76


Event: Status
Privilege: Call
Channel: IAX2/MR-1
CallerID: 35436121
CallerIDName: unknown
Account: 
State: Up
Context: macro-vm 
Extension: s
Priority: 5
Seconds: 9
Link: SIP/311-08695698 
Uniqueid: 1156442974.75

The
actual callerid of the caller is 3536121, 35254390 is the called number.

How
do I get the information, that 35436121 is connected to 311?

Am
I doing it in a stupid way, I'm aware that the Manager can give me realtime
events, but I'm under the impression, that it is not very stable in a high
traffic environment? 

Any
help or good ideas would be appriceated.

Michael


























___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users














___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] RE: [asterisk-dev] Phone status

2006-08-24 Thread C F

So how about inventing a car? The auto industry is much more profitable.

The point; there is no point in reinventing the wheel, why are you
writing this from scratch?

On 8/24/06, Mir [EMAIL PROTECTED] wrote:


What do you mean?

I'm not looking for someone elses work, I'm developing an application from
scratch.

Michael


2006/8/24, Andrew Kirch [EMAIL PROTECTED]:






Umm… Flash operator panel?



Andrew



 


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mir
Sent: Thursday, August 24, 2006 2:18 PM
To: asterisk-users@lists.digium.com; asterisk-dev@lists.digium.com
 Subject: [asterisk-dev] Phone status





Hi





I'm working on a project, where I need the status of every telephone on the
system. (Idle,ringing,busy)


If a phone is busy, I also need to know the callerid of the other end.





I have made a deamon, which query Asterisk every second for active calls,
this works by issuing a Status to the manager-interface, and processing
the return data and then put the result into a MySQL table.





The clients will query the MySQL table every second for the state of their
phone, if there are no records with their numbers in it, they are considered
idle.





This works fine for calls from one SIP-phone to the other, this is for
instance what it look like when extension 310 is connected to extension 311:





Event: Status
Privilege: Call
Channel: SIP/310-08697fb8
CallerID: 310
CallerIDName: unknown
Account:
State: Up
Link: SIP/311-0868fd98
Uniqueid: 1156442804.74


Event: Status
Privilege: Call
Channel: SIP/311-0868fd98
CallerID: 311
CallerIDName: Snom
Account:
State: Up
Context: macro-vm
Extension: s
Priority: 5
Seconds: 13
Link: SIP/310-08697fb8
Uniqueid: 1156442804.73

That is pretty easy to decode.

However when an external call is made to a SIP-phone, the result is
different, this is a call from another Asterisk via an IAX trunk:

Event: Status
Privilege: Call
Channel: SIP/311-08695698
CallerID: 35254390
CallerIDName: unknown
Account:
State: Up
Link: IAX2/MR-1
Uniqueid: 1156442974.76


Event: Status
Privilege: Call
Channel: IAX2/MR-1
CallerID: 35436121
CallerIDName: unknown
Account:
State: Up
Context: macro-vm
Extension: s
Priority: 5
Seconds: 9
Link: SIP/311-08695698
Uniqueid: 1156442974.75

The actual callerid of the caller is 3536121, 35254390 is the called number.

How do I get the information, that 35436121 is connected to 311?

Am I doing it in a stupid way, I'm aware that the Manager can give me
realtime events, but I'm under the impression, that it is not very stable in
a high traffic environment?

Any help or good ideas would be appriceated.

Michael









___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users




___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

http://lists.digium.com/mailman/listinfo/asterisk-users




___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] RE: [asterisk-dev] Phone status

2006-08-24 Thread Andrew Kirch








Umm Flash operator panel?



Andrew











From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mir
Sent: Thursday, August 24, 2006
2:18 PM
To:
asterisk-users@lists.digium.com; asterisk-dev@lists.digium.com
Subject: [asterisk-dev] Phone
status







Hi











I'm working on a project, where I need the status of every telephone on
the system. (Idle,ringing,busy)





If a phone is busy, I also need to know the callerid of the other end.











I have made a deamon, which query Asterisk every second for active
calls, this works by issuing a Status to the manager-interface, and
processing the return data and then put the result into a MySQLtable. 











The clients will query the MySQL table every second for the state of
their phone, if there are no records with their numbers in it, they are
considered idle.











This works fine for calls from one SIP-phone to the other, this is for
instance what it look like when extension 310 is connected to extension 311:











Event:
Status
Privilege: Call
Channel: SIP/310-08697fb8
CallerID: 310
CallerIDName: unknown
Account: 
State: Up
Link: SIP/311-0868fd98
Uniqueid: 1156442804.74


Event: Status
Privilege: Call
Channel: SIP/311-0868fd98
CallerID: 311
CallerIDName: Snom
Account: 
State: Up
Context: macro-vm
Extension: s
Priority: 5
Seconds: 13
Link: SIP/310-08697fb8 
Uniqueid: 1156442804.73

That is
pretty easy to decode.

However
when an external call is made to a SIP-phone, the result is different, this is
a call from another Asterisk via an IAX trunk:

Event:
Status
Privilege: Call
Channel: SIP/311-08695698
CallerID: 35254390
CallerIDName: unknown
Account: 
State: Up
Link: IAX2/MR-1
Uniqueid: 1156442974.76


Event: Status
Privilege: Call
Channel: IAX2/MR-1
CallerID: 35436121
CallerIDName: unknown
Account: 
State: Up
Context: macro-vm
Extension: s
Priority: 5
Seconds: 9
Link: SIP/311-08695698 
Uniqueid: 1156442974.75

The
actual callerid of the caller is 3536121, 35254390 is the called number.

How do I
get the information, that 35436121 is connected to 311?

Am I
doing it in a stupid way, I'm aware that the Manager can give me realtime
events, but I'm under the impression, that it is not very stable in a high
traffic environment?

Any help
or good ideas would be appriceated.

Michael






















___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users