Total newbie. Questions re date and time on phones

Greetings,

Please excuse my ignorance if I have placed this in an inappropriate forum.

Intro: I have been thrust into (by default) managing the phone system (and many other systems) here. I am the de-facto general “sys/net admin” for a small company (<30 users).

I am very very new to IP based phone systems though I do have a pretty good background in networking and windows based servers. I am also a Cisco CCNA. Not bragging, just trying to give you an idea of what type of technical abilities I have. I know a few Linux commands, and have available to me (one of my users) a person that is familiar with various versions of Linux.

The person I replaced left “abruptly” with no knowledge transfer at all. Hence my situation.

Regretfully, I do not know the relationship between, TrixBox, FreePBX and Asterisk. Is Trixbox a front end for FreePBX which is based on Asterisk ? Any enlightenment would be appreciated.

As far as I can tell this is what I have/know: I have a generic type of server: At the bottom of the post is what I was able to capture from some of the admin screens as far as versions are concerned.

My immediate question/problem is that some (most) of the phones display incorrect date and time. When I reboot them, they revert to December 31. The date and time increments forward from there (until the next reboot of the phone). The TRIXBOX main screen (V 1.2.3) shows the correct time of day. I presume this is server time and should somehow be able to be transferred to the phones. I can’t find a time area in FREEPBX. All I see is uptime.

Any help or enlightenment would be much appreciated. I hope I have given enough information. If not please let me know.

Thanks.

P…


Trixbox version Version: 1.2.3

Kernel Version 2.6.9-34.0.2.ELsmp (SMP)
Distro Name CentOS release 4.4 (Final)

Created by phpSysInfo-2.5.2_rc2 http://phpsysinfo.sourceforge.net/ on Sep 23, 2008 at 01:08 PM (this is the correct time)

Hardware Information
Processors 2
Model Pentium III (Katmai)
CPU Speed 547.41 MHz
Cache Size 512 KB
System Bogomips 2189.87

Version
Asterisk 1.2.12.1 built by root @ localhost.localdomain on a i686 running Linux on 2006-10-18 18:35:57 UTC
Verbosity is at least 1

FreePBX 2.3.1.1 on 10.0.0.5


you missed a very important piece of info. What type of phones as that is really the issue.

You need to configure the phones to talk to a NTP time source. ntpd (the ntp deamon) should be installed on your trixbox and providing time to those devices that ask it. You can also use a windows server or your local cisco router assuming it has ntp support.

Every phone manufacture does it differently so without knowing who makes them and what model you have nobody can really help you yet.

What is trixbox, well there are many answers to that question. First off you are running a VERY, VERY old version so that you know. trixbox is called a distro it is a collection of many open source projects put together in a way that they all work with almost no real work from you on setup. The two main open source projects are asterisk (the phone engine) and FreePBX (the web GUI interface).

I think the best way to say it is trixbox is like a can of Chef Boyardee beef Ravioli a nice big “name brand”. But at the same time you can make it with some tomato sauce, Ravioli from the store, some seasoning and a full teaspoon (or is it a tablespoon) of sugar. Or better yet go and get one of the many other competitors cans. In the end you get the same basic thing with just a slightly different flavor.

For a full history on trixbox you’ll have to search this site and see all the issues and things surounding them but make sure you have some time to read it all.

fskrotzki,

Tnx for the quick reply. I really appreciate it. Sorry about the phone detail. The phones are PolyCom SoundPoint® IP 300/301 SIP 2.0 phones.

I have a manual for them. I have been into the phone config via the local phone, not at the server level. I presume that there is a .cfg file that is loaded into the phones from the server. (they are DHCP enabled).

If I look at the phone settings via the handset, menu/status/network/tcp/ip parameters, I see that there in fact is an SNTP IP setting. They are set for the IP address of the Trixbox server. 10.0.0.5. if I go into the handset via a different menu pick settings/advanced/password/admin settings/network config/ it shows me that DHCP is enabled, and most of the settings are 000.000.000.000. I presume this is because they are defaulted because of DHCP. Does anyone know what the diferent set of settings is? Am I correct that it is like a NIC in that if DHCP is enabled, it overrides the NIC settings?

In my travels here, I did see one phone that had a different SNTP setting 18.72.0.3 and that phone had the correct time. I have not rebooted that phone to see if it will still have the correct time afterwords.

Is there a way to see if the NTP daemon is running on my trixbox?

Yes my version is old. Until i get REAL familiar with the systems I don’t want to upgrade. As a single sysadmin here I have many hats to wear and not enough time to keep up with routine tasks let alone upgrades. If something goes wrong during the upgrade I will be feeling a lot of heat. For the time being “if it ain’t broke…”…

Your explanation of the trixbox was great. Thank you.

Any place else I might look to see why my phones aren’t getting the correct date and time?

Thanks again.

P.

Well the one phone that has a different IP seems to be pointing to a Level one time server at MIT and I’d bet they would not like it if you pointed another 29 of them at it. You are supposed to request permission before using that address or they have the right to refuse you service.

First off I’d do a service restart ntpd on the trixbox and that should restart the ntp service on the trixbox. If that is the case then the phones should start to become happy with the correct date and time. If the restart does not work then talk to your Linux person to get the service fixed and started.

In DHCP you can also specify the ntp server IP. it’s dhcp option 4.

Thanks again for the reply.

I rebooted the phone that had the correct time. It did not come back with the correct time. Based on this , I presume that at one time (before my time) the asterisk server had the correct time (as it does now) and was dishing it out properly (as it is NOT now).

Again, pardon my ignorance, I am doing my best to learn the system. Is there a command that I can use to see what services (or if this service is running)? Your suggestion of doing a “service restart ntpd”. Is this the actual command that I would type logged in as root? Do I need to be in a specific folder? Will the command affect any users on the system, or cause any interruption of service?

Thanks again for your patience and help.

P.

PS. Just to add a little more info: I left a vmail for one of my users and referenced real time. They retrieved the message and it was stamped with the correct time. To me this suggests that the trixbox has the correct time (we knew that) and that it is sending to the asterisk system on that box. So we don’t have a time acquisition issue with the trixbox or asterisk, just a breakdown in getting the correct time to the telephone handsets. Hmm. Where to go from here??? Tnx

The phones should be configured to use the NTP service and based on the info you provided it should be on the server.

ntp/ntpd is Network Time Protocol.

Yes that is the command and it needs to be run from root. The server having the correct time is good, it is just that the service that handles the requests from other systems is not running or not working properly. So issuing that command will stop and restart the service.

if you google for ntp ntpd linux you will get thousands of helpful pages that cover the topic better then we can in a quick forum post. At the same time you said “… have available to me (one of my users) a person that is familiar with various versions of Linux.” so you’ll probably get a lot further by spending 10 minutes with that person showing you around and checking on the system then attempting to learn basic linux 101 here as that is not our main purpose.

Is your Linux box able to see the internet or the time site? I would use the govt nist site.
It’s a common problem for the phones not getting out to the time servers because the gateway is not set. The gateway setup on the phone and server should match. Good luck!

He has stated above that the server has the correct date and time just not the phones. So the phones are either not talking to the server for NTP or the server is not providing the service and failing so starting the date time with the date of the firmware defaults.

Hello,

Me again. This time with a little more experience. I built my own trixbox at home and am waiting for the fxo/fxs cards to come in so I can connect it to my analog lines. Not exactly a duplicate of what I have here at work. But better than nothing.

To continue on this thread, I still have time issues. The same as before. when any of my phones reboot, they reset to Dec 30 at 7:00. The server has the correct time. That said, I DO get an error when starting the ntpd service. “Failed to Synch with Time Server”. The firewall allows ntp bidirectionally.

I did some looking around and I found (from the trixbox menu config edit) in /etc a file called ntp.conf. It looks like this:

servers generated by /sbin/dhclient-script

server bitsy.mit.edu
restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap

I can ping bitsy.mit.edu from the server.

I tried to edit this, but it said I had insufficient rights. I presume by the first line, that is can only be edited via a script (within FreePBX). I looked all over and could find no where where I could enter a time server.

Could this be the issue with the phones. I would think that if the ntp server were not available my trixbox would not be updated, but would still pass the existing trixbox time on to my phones. No?

Assuming that this is the problem with my phone time, where do I set this or how to I edit the ntp.conf file.

Thanks…

Paul…

If you can not edit ntp.conf then you are not root.

Hi fskrotzki,

Tnx for the reply. I guess I should clarify. I was attempting to edit it from the trixbox main menu (config edit). I was NOT in CLI mode. I was logged in to the trixbox gui as maint. I made the assumption that this had root access. Are you saying that if I am logged in to the trixbox gui as root, that I should be able to edit the script using the “config edit” link from the main menu?

What does it mean when it says: ???

servers generated by /sbin/dhclient-script

Now back to the issue at heart. Could this(the ntpd service failing to start) be the reason that my handsets aren’t getting the correct time?

Or put a different way. Probably a dumb question but I was under the impression that ntp is used primarily for servers that want to sync their time to a standard time source. That said, do I need the NTP service running on the trixbox just to hand out the server time to the handsets? The service does not appear to start if it can’t find a suitable time source. If it needed the service running to hand out the time to the handsets, I would think it would continue to start the service even though it couldn’t connect with a time source. How far off am I?

Thanks

Paul…

if ntpd service does not start then you don’t have a ntpd service running thus you are not handing out NTP data to the phones, so Yes.

Best place in the world to learn about ntpd is www.ntp.org. You’ll learn about what really needs to be in the config file, what stratum 1, stratum 2, etc. are how to use them properly and what you need to do to use them (like ask permission, or take a shot at getting blocked).

I am not sure what fixed it, but here’s what I did. At the console, I edited the ntp.conf to reflect pool.ntp.org instead of bitsy.mit.edu. using nano (not the trixbox config edit) because logging in with maint doesn’t give me the correct permissions)

Then I restarted the service.
service ntpd restart

I got on OK on the stop
I got a failed (failed to synchronize with time server) on the synch
I got an OK on ntpd started.

Then I did this

chkconfig ntpd on
ntpdate pool.ntp.org
ntpd start.

I received a correct response from the time server, that indicated I was around 4 microseconds off of the source time.

At this point I looked at my phones and they all had the correct time.
I am not sure which of the actions fixed the times.

I also learned that the trixbox gui (not freePBX) displays the time of the machine you are running the browser on. NOT the hardware clock or the application (freePBX clock).

So if I can synch to the pool.ntp.org manually, why does the NTP not synch when I do an:

service ntpd restart. Why is it failing with the same time source that works manually?

Thanks.

Paul

I’m also quite new and unfamiliar with using this system. I had a similar problem as you’ve described. Our phones were off by around 40 min.

I read through this post and used the service ntpd restart command to try and get it back in sync. When I ran the command I got an OK on the service stop and start. I didn’t get any messages about the sync failing.

When the phones rebooted I got Dec 31 7:00 PM.

I checked the /etc ntp.conf file and it has:

driftfile /var/lib/ntp/drift
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 127.127.1.0
fudge 127.127.1.0 stratum 10

I’m not sure what to try next really.

Any ideas?

Thanks.

checkout the command hwclock. man hwclock.

I used this to determine the various clocks on my systems and hardware. I ended up having to do a hwclock -s which copies (sets) the hardware clock (which I interpret as the BIOS clock) to the system clock.

I am as new at this as you are, so my info may be off. Take it for what it’s worth.

Hope this helps.

P…

The ntpd service will not change the time when it is off by more then a specific time (I think it’s 20 minutes).

There is a command that you have to run to force it to update when it’s way out of sync. The command is called ntpdate (type man ntpdate for full info). Note that this command in time will go away and that there is also a way to do it via the ntpd program using the -g switch, again see man ntpd).