Abhishek Singh Bailoo

Weblog

Feb 1

FreeSWITCH Timing


FS maintains its own clock because system clock can change suddenly. If NTP is enabled on your server then FS should be synced with system clock at least once every day or once every hour, as the need may be.

Use command fsctl sync_clock More details here http://wiki.freeswitch.org/wiki/Mod_commands

To get the current time here freeswitch command

fs_cli -x “strftime_tz Asia/Kolkata %Y-%m-%d %T” && date

Put a script also placed in /etc/cron.hourly/time-update.sh which update time hourly on child machine.

!/bin/bash

/usr/sbin/ntpdate 10.0.0.70 /usr/local/freeswitch/bin/fs_cli -x “fsctl sync_clock” exit 0

Anthony Minnesale says:

Allowing any software to trust the system time is very dangerous. Something that was depending on the system time to calculate a duration etc can be considerably compromised if the time suddenly changes by hours or years in either direction. Things like daylights savings time can break CDR etc.

The clock in FS is the onboard monotonic clock and the offset to real time is preserved. If you want FS to sync to system time when desired there are commands to perform this operation.