@stephenw10
A RasPi is too big and you'd had to buy it....
My point was that if refrigerators or light bulbs had something like a better ESP32 SOC (which they don't have), one could hide the PBX there. In case of a broken fridge or bulb, this would also lead to service calls for the service provider's hotline. I wonder if they would figure out, when the customer says, that whenever the light bulb is defect, my telephone doesn't work, too (unless you inform your family members or friends, which you wouldn't do).
The ISP restarts the PPPoE connection every 24 hours, this is why I came up with the Shellcmd script of type after...
This may actually not be necessary, if I control how Asterisk gets restartet. I need to look at the details, but the Asterisk start script in /usr/local/etc/rc.d also seems to get repeatedly called within a short interval, which likely lead to the race conditions I sometimes observerd (lot's of network errors). Since the Shellcmd script at first cleaned up the entire runtime environment of Asterisk, my problem seemed to be solved.
The only thing I probably need to do is making sure that Asterisk does not get started within a too short interval and that at first the old daemon gets properly killed, i.e. basically my Shellcmd script as the start option of the rc.d script. I always wondered why safe_asterisk was so bulky---there's probably something similar inside the script.