[asterisk-users] Using AMI to determine PRI Channels Used

Godson Gera godson.g at gmail.com
Mon Nov 10 08:40:14 CST 2008


On Mon, Nov 10, 2008 at 7:41 PM, David Budny <dbudny at visiblecustomer.com>wrote:

>  What is the AMI command to see how many PRI channels are being used /
> available?
>
>
>
> Thanks
>
There is no direct command in AMI which will give you used channels number.
But you can easily keep track of the active zap channels, by catching the
respective events (events Link, Ringing,Hangup,Unlink etc etc ), on zap
channels, and storing them in a variable in your program.

When you receive a Connecting kind of event like Link,Ringing increase the
variable value, and when you receive Hangup or Unlink events decrease the
variable value.

Happy Hacking,
Godson Gera.
http://godson.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081110/c80718ab/attachment.htm 


More information about the asterisk-users mailing list