I currently have phones in multiple time zones registering to the same server and I am trying to find a way to get the right time zone in the config files without having to make a different config file for each time zone. I already allow the DHCP to override the time zone setting but it doesn't work for all the locations and I would rather not have to manually configure each phone. I have both polycoms and grandstreams registering to the server, any help would be much appreciated. Thanks.
Its an MTE and for the most
Its an MTE and for the most part they are separate tenants, however there are a few tenants that have phones in two or three different time zones. Most of the sites don't have a dhcp server that can be used to issue the time-offset.
there are 3 ways to set the
there are 3 ways to set the time server and offset on a polycom phone
1. DHCP
2. Polycom phone configs
3. manually on the phone
DHCP is by far the most dynamic and flexible. You need a good DHCP server, at minimum, to
tell the phones where to get their configs
tell the phones what time server to use
tell the phones what time-offset it is
additionally you can
tell the phones what VLAN to join
Failing that ability, you have to use config files to tell the phones what their time server is and what their offset is. This can be done per tenant but cannot be done per individual phone. So the examples where one tenant resides in multiple locations is left with only 2 choice 1) advanced dhcp service, 2) manually setting it on the phone.
Once you reach the point where you are installing equipment to deal with quality and nat issues its simple to ensure that the same equipment have a good dhcp server.
have each tenant use a
have each tenant use a different 'local-settings' file. Instead of a 'local-settings.cfg', I have each tenant using their own ${TENANT}-settings.cfg file defined in the models.txt, and each tenant has their own unique subdirectory in /etc/asterisk/usr_provisioning/ that contains a customized polycom_local.cfg file.
here are some polycom config parameters so you know what they look like:
tcpIpApp.sntp.resyncPeriod="86400"
tcpIpApp.sntp.address="1.us.pool.ntp.org"
tcpIpApp.sntp.address.overrideDHCP="1"
tcpIpApp.sntp.gmtOffset="-18000"
tcpIpApp.sntp.gmtOffset.overrideDHCP="1"
Per phone configuration
You CAN do this on a per phone basis.
Create directory /tftpboot/polycom/overrides/
Create /etc/asterisk/provisioning/polycom_phone-phone.cfg with the overrides like:
<?xml version="1.0" standalone="yes"?>
<PHONE_CONFIG>
<OVERRIDES tcpIpApp.sntp.gmtOffset.overrideDHCP="1" tcpIpApp.sntp.gmtOffset="-18000" />
Add the following to the appropriate phone models in models.txt:
input_3=polycom_phone-phone.cfg
output_3=polycom/overrides/${mac}-phone.cfg
In file /etc/asterisk/provisioning/polycom_mac.cfg set your override directory so it looks like:
CONFIG_FILES="${mac}-registration.cfg,local-settings.cfg,sip.cfg"
MISC_FILES=""
OVERRIDES_DIRECTORY="/polycom/overrides/"
LOG_FILE_DIRECTORY=""/>
Chris
1. you shouldn't be doing
1. you shouldn't be doing anything in /etc/asterisk/provisioning since it will be deleted every update, thats why /etc/asterisk/user_provisioning was created
2. thats clearly NOT per phone since your 1 template is getting pushed out identically to all the users, you don't have a unique polycom_phone-phone.cfg template for each and every handset, in fact you aren't even doing it uniquely per tenant, that would be in /etc/asterisk/user_provisioning/tenantname/polycom_phone-phone.cfg. This is the 10 line equivalent to copying someone elses file and having to edit it afterwards. Why go through the trouble of building all that crap into models.txt when there is no substitution and you could just write your own $MAC-phone.cfg file in less work; or better yet, just copy another and edit.
3. the $MAC-phone.cfg is called the override file, it is meant for the PHONE to write this file on the ftp server. Its a reverse provisioning aspect of polycom phones. If you are publishing them in the server->phone direction then they stop working as intended. Next time the phone reboots, those other changes performed on the phone (ring tones, timezone, persistent headset etc) will all be gone because you overwrote them. This file is how the phone stores its overrides on the server so that they persist after reboot.
4. When you set the timezone on the phone itself, it uploads and updates the $MAC-phone.cfg file already. Doing all these steps is 4x the work of just changing it on the display and accomplishes the exact same thing...it populates the value in an override file.
if your question is just the clock on the polycom phones, then each office should have its own dhcp server that issues 'option time-offset'. is this a single tenant server or MTE? is each office a different tenant?
as far as the grandstreams, just remove the plug and use them to keep your newspapers from blowing away, thats all they are good for :)
as far as unix time, that time is going to be the system time of the server itself. you may derive comfort in standardizing on GMT, or you could pick EST since a lot of the US runs on that schedule (NYSE etc). This will only be a problem for mail messages etc.