- Joined
- Apr 28, 2011
- Messages
- 44
- Reaction score
- 0
Hi guys, does anyone know how to run a script when asterisk reloads or restarts?
I've got a process connected to Asterisk on my Elastix system via the AMI. Each time Asterisk is reloaded or restarted the connection to the AMI is lost and the process needs to reconnect.
I've got a small script that will restart my monitoring process that I would like to run after Asterisk has reloaded or restarted but am not sure where to put it.
I could put in in /etc/init.d/asterisk to catch it when asterisk is started but what about amportal restart/reloads via the GUI? Is there one place to put the agent restart script?
Or is there a better way of doing this so the AMI doesn't lose connection?
Any help gratfully received!
Neil
I've got a process connected to Asterisk on my Elastix system via the AMI. Each time Asterisk is reloaded or restarted the connection to the AMI is lost and the process needs to reconnect.
I've got a small script that will restart my monitoring process that I would like to run after Asterisk has reloaded or restarted but am not sure where to put it.
I could put in in /etc/init.d/asterisk to catch it when asterisk is started but what about amportal restart/reloads via the GUI? Is there one place to put the agent restart script?
Or is there a better way of doing this so the AMI doesn't lose connection?
Any help gratfully received!
Neil