Sangoma Firewall Auto restart on failing or when stopped

I’m looking for a solution to automatically restart the Sangoma (FreePBX default) firewall if it crashes or encounters an issue. I’ve noticed that restarting fwconsole also restarts the firewall services. However, I’m wondering how fwconsole could be set to detect when there’s a problem with the firewall and then trigger a restart.

Do you have any suggestions on how to accomplish this?