After compiling and  installing freeswitch on centOS from freeswitch source files , we can just copy  /usr/src/freeswitch/build/freeswitch.init.redhat   file to /etc/init.d directory and   correct the freeswitch path entries  to make it start at boot time .

copy the file to init.d directory and  add permissions

#cp /usr/src/freeswitch/build/freeswitch.init.redhat /etc/init.d/freeswitch

#chmod 755 /etc/init.d/freeswitch

edit the file  and correct the freeswitch path entries . On my  freeswicth  test server the entries are like below

 

PROG_NAME=freeswitch
PID_FILE=${PID_FILE-/usr/local/freeswitch/log/freeswitch.pid}
FS_USER=${FS_USER-freeswitch}
FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch}
FS_HOME=${FS_HOME-/usr/local/freeswitch}
LOCK_FILE=/var/lock/subsys/freeswitch
FREESWITCH_ARGS=”-nc”

 

save the file  and  add it to auto start services list

 

chkconfig –level 345 freeswitch on

 

now chkconfig –list freeswitch should show something like below

<25>:chkconfig –list freeswitch
freeswitch 0:off 1:off 2:off 3:on 4:on 5:on 6:off

 

If we restart the system it should start free-switch automatically .

netstat -ptuln  command output will show if  free-switch is listening to the ports

 

 

Capture

 

 

Categories: LinuxVOIP

0 Comments

Leave a Reply

Your email address will not be published.