Alerte when numbers of concurent channels have been hit

Is their a way to be alerted when a trunk is used at like 80% of his capacity?

If I put something like 20 maximum channels on a trunk I would like to receive an email when I hit maybe 15 simultaneous calls on that trunk. Ìs it possible to do so? We use a FreePBX in High Availability right now.