Recently my Asterisk server has been randomly shutting down on me (not exactly crashing, nothing informative in the logs, just suddenly isn’t running anymore). I’ve finally narrowed it down to happening when we receive a fax. Apparently one of the updates to Asterisk has changed the syntax as I now get the following warning right before the asterisk process shuts down:
pbx.c: SetVar is deprecated, please use Set instead.
I didn’t put the 2 together earlier because deprecated doesn’t usually mean “will crash the process without any errors logged” Unfortunately, all the documentation that I’m finding still refers to using “SetVar” and not “Set”. Is it the same syntax, other than the command name? Here’s the offending line in my config:
That’s part of the problem… I don’t get a core file… It’s just all of a sudden Asterisk is no longer running. No core dump, no error in any log, no shutdown indications in any logs, etc. It’s just “not running/not in the process list” all of a sudden!
It’s definitely the fax receive functionality. Asterisk stops running at the point at which the fax processing should (used to) begin. Replicated it while watching at the -r console, and there’s no useful output, just all of a sudden the shell prompt comes up and Asterisk is no longer running!
I threw together a Java app that fires off through crontab and checks up on Asterisk once a minute and if it’s not running, it restarts it. At least that’ll let our system come back up relatively quick (and without user intervention). However, I have no idea what to do next in troubleshooting this problem.