04-01-2019 01:35 PM
Hello,
I tried to configure an NTP server on my SPA112 device to sync the time, but it keeps displaying wrong time. When I configure the NTP server (pool.ntp.org), the time is synced well immediately, but when the device re-registers itself to my voip provider's SIP server, it rewrites the datetime to a wrong value (+1 hours and 57 minutes). I think this time is provided by the SIP server what would be ok for me, if it would send correct value.
I had to set the 'Resync Timer' to 300s as a workaround, but it is an overkill I guess.
Could you please help me what should I configure to sync the time only with the NTP server and not with the SIP server
Thank you very much in advance!
04-01-2019 10:36 PM
@Tothdav wrote:
it rewrites the datetime to a wrong value (+1 hours and 57 minutes)
That to me says that the SPA has the wrong timezone configured.
@Tothdav wrote:
I tried to configure an NTP server on my SPA112 device to sync the time, but it keeps displaying wrong time. When I configure the NTP server (pool.ntp.org), the time is synced well immediately
This tells me the NTP server you've manually configured is not sync or is not "trusted". If the router is synchronized to a trusted time source, configure the router's IP address as the NTP server.
What firmware is the SPA running on?
04-02-2019 12:26 AM
Thanks for your response!
The ATA is running on the latest firmware: 1.4.1 SR1
I tried at least 5 NTP servers on my network and all of my devices can sync (SPA112 is included as well), but only the ATA looses the correct time and only when it registers itself to the SIP server. That is why I set the timer to 300s, because with this setting I can resync the time between two registration at least once (SIP registration expires after 600s).
If I remember well I tried the NTP configuration with my router before, but I guess it cannot work as an NTP server. I will check it again when I am home today and get back to you with the answer.
04-02-2019 02:05 AM
@Tothdav wrote:
but only the ATA looses the correct time and only when it registers itself to the SIP server.
All my Cisco phones and SPA 122 point to my Asterisk as NTP without an issue.
Can you ensure that the NTP deamon is running on your SIP server?
04-02-2019 06:03 AM
Unfortunately it is not my SIP server, so I cannot check it. This is my internet provider's server who provides me voip service. That is why I wanted to use different NTP server.
04-02-2019 08:03 AM
You can, of course. Just catch SIP packets (PBX's response to REGISTER request) and check the date inside (SIP protocol is text protocol, so you can just read the text).
By the way, date/time provided by NTP and date/time provided by PBX via SIP are unrelated ways to set phone's internal clock. Thus no NTP server change will solve your issue - date/time from SIP packets still will be honored by phone.
It's why you should analyze the issue source - if PBX provide correct date/time to you, then it's configuration on your side that causes the issue. If PBX provide incorrect date/time there's only solution - contact PBX owner and report the issue ...
04-02-2019 12:15 PM
Thank you for your help!
You can, of course. Just catch SIP packets (PBX's response to REGISTER request) and check the date inside (SIP protocol is text protocol, so you can just read the text).
It seems my provider sends an almost correct time (-3 minutes), but with GMT timezone. Can it be a problem if I am in the UTC+2 timezone?
By the way, date/time provided by NTP and date/time provided by PBX via SIP are unrelated ways to set phone's internal clock. Thus no NTP server change will solve your issue - date/time from SIP packets still will be honored by phone.
If you are referring to the SPA112's internal clock here, then why do we have NTP configuration in this device?
if it is about the connected phone's internal clock, then I found that our cordless phone can sync its clock to the ATA box's clock when it receives calls. So it was annoying that the time on the phone's display was reverted to the wrong time with the +2 hours every time when we used the phone. This is why I wanted to play with the NTP configuration.
04-02-2019 11:40 PM - edited 04-02-2019 11:48 PM
Don't be satisfied with "it seem". Look into packet to know facts instead. ;-)
Relevant line of SIP packet look like this:
Date: Wed, 03 Apr 2019 05:43:16 GMT
It contain not only date/time but also timezone of it. It may be either correct or incorrect. In the second case, we need to know what's incorrect with it. We can seek for solution then.
why do we have NTP configuration in this device
You need not to have NTP configured, if you wish not to use NTP. Or I missed the matter of the question ?
our cordless phone can sync its clock to the ATA box's clock when it receives calls
It's part of CallerID transmitted during ring. You can disable it, but target phone will not receive caller number.
I wish to to stay away from speculative solutions until the true cause will be identified. Just look into SIP packets and disclose the "Date:" header.
04-03-2019 01:31 AM
Sorry, the 'it seems' were not the best words :) I have checked the SIP packages and in them I found that the time has 3 minutes difference and timezone difference. So I think if I cannot turn off the SIP date applying, I can only get the correct datetime on my phone when I set the time manually in the SPA112, because I do not want to skip the callerID displaying.
why do we have NTP configuration in this device
This question was due to I thought that you said that I should not use NTP configuration at all in this line:
By the way, date/time provided by NTP and date/time provided by PBX via SIP are unrelated ways to set phone's internal clock
04-03-2019 04:23 AM - edited 04-03-2019 04:25 AM
the time has 3 minutes difference and timezone difference.
The timezone claimed in Date: header have nothing to do with the timezone of area you are living in. SIP server must provide time in GMT only, no other zone is allowed in Date: header of SIP packet. SPA112 will derive local time from it.
You mentioned you are living in +0200. Assuming your local time is 13:23:00, SIP response should claim date 11:23:00 GMT. Is it true in your particular case ? Or - just show me the value of Date: header (and disclose your local time of capture).
04-07-2019 11:16 AM
Sorry for the late answer.
Here are the dates from the SIP package:
This was in the Frame group in Wireshark and this is the package arrival time on the PC:
Arrival time: Apr 7, 2019 20:08:38.770537000 Central European Summer Time
And this date was in SIP message header within the same frame:
Date: Sun, 07 Apr 2019 20:06:12 GMT
04-08-2019 04:39 PM
It mean the VoIP operator is sending CEST time, but claim it as GMT. In short - it sends wrong time.
Bad news for you. PBX is considered critical (and trusted) component of VoIP. SPA112 will just honor the date/time provided by it. And PBX administrator have no reason to maintain incorrect time - so complain to it ...
04-02-2019 04:24 AM
Synchronization against PBX can't be disabled as far as I know. PBX administrator shall either set time correctly, ortime should not be published in response requests at all.
But you didn't verify yet the time supplied is incorrect - may be just time offset or zone is reconfigured on your phone.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide