Nagios check_asterisk_channels

i can get the only possed calls 0r older call cache when i run the script. any sript to to get the active calls and alert notifcattion if its extend thresold value.

Thanks for those who give solution