On Mon, 9 Aug 2010, Felipe Figueiredo wrote:

> is there a way to see how many channels of an specific tecnology are 
> being used?

See? From where? Within the dialplan or from an external process?

> Like, i have a zap card, e1 (30 channels), and there are 10 channels 
> being used at this moment. When the E1 reaches 15 busy channels I need 
> to receive a call or something like this, telling me that 15 of 30 
> channels are busy. How can I do this?

Within the dial plan you can use the GROUP() and GROUP_COUNT() functions. 
You could set the group to the technology and check the count as each call 
enters your dial plan. (Asterisk will automagically decrement the count as 
the calls are terminated.) If the count exceeds your threshold, you could 
use system() to create a call file to call you and play an appropriate 
message.

>From an external process you can parse the output of "asterisk -r -x 'show 
channels'," "asterisk -r -x 'sip show channels'," or "asterisk -r -x 'zap 
show channels'." Note that these are the "1.2" commands. You are probably 
using a more current version. If the count exceeds your threshold, create 
a call file to call you and play an appropriate message.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to