You are trying to solve the symptom rather than the problem here...
The problem is why are the trunks locking up? You should look at your call flow and see why these calls are getting hung up, or why your carrier is not sending you a positive disconnect signal.
What you are asking for is not possible, but even if it was it would only be masking the real problem which will likely still cause some issues. Solve the core problem and you don't need to worry about a backwoods hack.
The closest you will get is a daily reboot using the PROGRAMMED REBOOT SCHEDULE maintenance command, which again would just mask the symptom but not solve the real problem.
Hi acejavelin,
Thank you for your opinion. Yes we are currently on progress to migrate our copper wired CO trunks to FO for better tone detection, but the process is quite problematic here. Meanwhile, our line is bombarded by spam call and that worsen our "busy line" condition.
If Mitel can not auto release the trunk, in the mean time (before CO trunk migration progress completed) our management want us to analyze how often our trunk locked up by busy line every days. So, if Mitel can provide us auto email notification for that, it will be very helpful instead of monitoring and run STATE TRUNK GROUP every second
oh, and btw, reboot the PABX is not our option here since this locked up is heavily happen, even in the work hours...