As I posted here before, Ubuntu has moved to Upstart as the main engine to start daemons. As a result, Kamailio will fail to start on boot time because it starts before MySQL that has already been moved to the new Upstart daemon starting fashion.
I am struggling to get some help from the Ubuntu community explaining how we can match the previous init script behavior when using Upstart but I got no success till now. Anyway, I have created an Upstart script for Kamailio that does most everything that the old script use to do. However, in this script I am making sure MySQL starts before Kamailio. If you have another SQL engine you must change the script to match your SQL engine by changing the “start on started” statement on the script. To use it you have to:
A – Create a kamailio.conf file at “/etc/init/” with the contents of the kamailio.conf script in attach, that is the new Upstart stile init script. Please notice that I just adapted the existing script, no news…
B – Create a symbolic link at /etc/init.d/ pointing to this kamailio.conf at /etc/init/.
C – If you want, you can still have a /etc/default/kamailio file like it used to be and the script will behave like it used to behave when using the default file.
Hopefully someone more “influent” at the Ubuntu community may get some help on how to adapt their “start on started” Upstart stanza to behave like we need for multiple possible SQL engines.
Cheers!
Moacir