File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes how to check the channel count Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to check the channel count" Watch "how to check the channel count" New topic

how to check the channel count

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
I am trying to get the active channels through asterisk java.I can able to get the channels.But i need to get the count of the channels.
The code through which i get the active channels is:

The output which i got when i call the extension 701 from 703 is:

[org.asteriskjava.manager.event.StatusEvent[dateReceived=Wed Jan 07 14:30:58 IST 2009,privilege='Call',callerid='703',link='SIP/701-0937c3f0',state='Up',timestamp='null',calleridname='<unknown>',extension='null',uniqueid='1231318853.50',actionid='null',internalactionid='23063136_4',seconds='null',priority='null',context='null',account='null',calleridnum='703',channel='SIP/703-093f7920',systemHashcode=13100371], org.asteriskjava.manager.event.StatusEvent[dateReceived=Wed Jan 07 14:30:58 IST 2009,privilege='Call',callerid='701',link='SIP/703-093f7920',state='Up',timestamp='null',calleridname='701',extension='s',uniqueid='1231318853.49',actionid='null',internalactionid='23063136_4',seconds='6',priority='7',context='macro-dial',account='null',calleridnum='701',channel='SIP/701-0937c3f0',systemHashcode=27312399], org.asteriskjava.manager.event.StatusCompleteEvent[dateReceived=Wed Jan 07 14:30:58 IST 2009,timestamp='null',actionid='null',internalactionid='23063136_4',systemHashcode=14872264]]

I need to count how many org.asteriskjava.manager.event.StatusEvent displayed.according to that count i can able to count the active could separate this output and count?
any help would be highly appreciated.

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46410
Too complicated for the beginner's forum. Moving.
I agree. Here's the link:
subject: how to check the channel count
It's not a secret anymore!