Email Alert - Active Channels

HI all,

I’m hoping some of you have done something similar in the past to what i’m trying to accomplish. Basically we have 2 trunks one from our PSTN gateway whcih is an auidocodes mp-114 FXO and Skype Connect for SIP channels. We have problems occasionally where an inbound caller is expierences a busy signal because we are out of channels and we can’t accept the call. I have reviewed the logs and don’t see any notices about a failed inbound call presumably because skype rejects the call before attempting to send it through the trunk.

So basically i’d like to be able to setup an alert that will email me when we have no avilable channels left but before a call has failed to complete due to a CHANUNAVAIL log.

System is freepbx distro with asterisk

Thanks for all suggestions,