Asterisk does not restart after crash. Debian Jessie

Hi there,
I have Asterisk running on a few systems, however sometimes asterisk crashes and when it crashes it does not restart automatically. I am running Asterisk 13.11.2 installed from source on most of my systems. I am relatively new to asterisk so any help would be appreciated. Many thanks

System : PCengines APU2C4 system board, Debian jessie 8.6

Asterisk never restarts after a crash. It is restarted by script, typically safe_asteriisk, that is in turn run from the system start up script that starts Asterisk. Maybe that script doesn’t work well outside its CentOS origins, or maybe you are bypassing it, by starting Asterisk directly.

Thanks David, but it says this in the comments at the top of /etc/init.d/asterisk which implies to me tat safe_asterisk is no longer used ?

Mon Jun 04 2007 Iñaki Baz Castillo

  • Eliminated SAFE_ASTERISK since it doesn’t work as LSB script (it could require a independent “safe_asterisk” init script).

any ideas ?

Or would it be better for me to just write some kind of cron script that kept checking if the service was running and restart it if not ?

The safe_asterisk script is faster because it knows when Asterisk terminates.