How To Fix FusionPBX Wrong Time

In this article I will how to fix FusionPBX wrong time.

FreeSwitch time can be drift from the Linux system time. It will create problem for FusionPBX CDR and Time condition functionality.

Lets compare Linux System time and FreeSwitch time

To display the current System Time in Linux type:

$ date 

To display FreeSwitch Time Linux type:

$ fs_cli -x "strftime"

Fix FusionPBX Incorrect Time

To synchronize FreeSwitch incorrect time with Linux System time run command:

$ fs_cli -x "fsctl sync_clock"

or sync clock when FreeSwitch idle:

$ fs_cli -x "fsctl sync_clock_when_idle" 

freeswitch time synchronized

FreeSwitch service restart also will fix incorrect time problem.

Sync FreeSwitch Time Automatically

For automatically synchronize FreeSwitch time this command should be executed as scheduled job.

Edit your crontab file with # crontab -e command (as root) and add next line:

0 */8 * * * /usr/bin/fs_cli -x 'fsctl sync_clock_when_idle'

Than save and exit. This cronjob will fix time every 8 hours.

That’s it!

Synchronize FreeSwitch Time with Linux System Time

Run “fsctl sync_clock_when_idle” from Command Line Interface (fs_cli)

   

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

arstech

Leave a Reply