Steve,<div>you are right, i'm gonna use the group function, I tested here and it works pretty fine. Thanks. </div><div><br></div><div>Danny, thanks for the help once again!<br><br><div class="gmail_quote">On Mon, Aug 9, 2010 at 4:36 PM, Steve Edwards <span dir="ltr"><<a href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Mon, 9 Aug 2010, Felipe Figueiredo wrote:<br>
<br>
> is there a way to see how many channels of an specific tecnology are<br>
> being used?<br>
<br>
</div>See? From where? Within the dialplan or from an external process?<br>
<div class="im"><br>
> Like, i have a zap card, e1 (30 channels), and there are 10 channels<br>
> being used at this moment. When the E1 reaches 15 busy channels I need<br>
> to receive a call or something like this, telling me that 15 of 30<br>
> channels are busy. How can I do this?<br>
<br>
</div>Within the dial plan you can use the GROUP() and GROUP_COUNT() functions.<br>
You could set the group to the technology and check the count as each call<br>
enters your dial plan. (Asterisk will automagically decrement the count as<br>
the calls are terminated.) If the count exceeds your threshold, you could<br>
use system() to create a call file to call you and play an appropriate<br>
message.<br>
<br>
>From an external process you can parse the output of "asterisk -r -x 'show<br>
channels'," "asterisk -r -x 'sip show channels'," or "asterisk -r -x 'zap<br>
show channels'." Note that these are the "1.2" commands. You are probably<br>
using a more current version. If the count exceeds your threshold, create<br>
a call file to call you and play an appropriate message.<br>
<br>
--<br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards <a href="mailto:sedwards@sedwards.com">sedwards@sedwards.com</a> Voice: +1-760-468-3867 PST<br>
Newline Fax: +1-760-731-3000<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</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" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div>