Incorrect Time – FUSIONPBX

Posted by

Check time on Linux CLI

date 

and press enter, this is your server time.

to check freeswitch time

fs_cli -x "strftime"

and press enter, this is your server time.

If you freeswitch time is not consistant with the sever time then use the following command to correct freesswitch time. This command will end any active call and also phones will re-register

fs_cli -x "fsctl sync_clock"

another command can be used to avoid disconnecting active calls.

fs_cli -x "fsctl sync_clock_when_idle" 

What I have also done for my freeswitch serve is to creat a small script which runs at schedule interval as cron job to keep the time synced between the server and freeswitch. This script also creates a log file to keep track is the time sync was successfull or not. I have kept timesync bash script locan to /root/timesync and I have also kept the log file location to /root/timesync.log for my own easy access. You can place where ever you like both the script and the log file.

Finally I ruin the timesync bash script with cronjob

to view or edit cronjob enter the following command at server cli. I am using debian.

crontab -e

I am using cronjob line to directly run the command, you can use the script if you like that was created above.

Thats it, Good Luck.

Leave a Reply

Your email address will not be published. Required fields are marked *