[asterisk-dev] Phone status

Andrew Kirch AKirch at AllThingsIT.com
Thu Aug 24 11:19:33 MST 2006


Umm... Flash operator panel?

 

Andrew

 

________________________________

From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Mir
Sent: Thursday, August 24, 2006 2:18 PM
To: asterisk-users at lists.digium.com; asterisk-dev at 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

 

 

  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060824/bafdfaf6/attachment.htm


More information about the asterisk-dev mailing list