<div dir="ltr">See<div><a href="https://wiki.freeswitch.org/wiki/Fsctl#sync_clock">https://wiki.freeswitch.org/wiki/Fsctl#sync_clock</a><br></div><div>and</div><div><a href="https://wiki.freeswitch.org/wiki/Fsctl#sync_clock_when_idle">https://wiki.freeswitch.org/wiki/Fsctl#sync_clock_when_idle</a><br>
</div><div>(the latter being much better to avoid incorrect durations in CDRs)</div><div><br></div><div>FS initiates an internal clock from the time at start then uses the monotonic clock to run it. The result is it can diverge from the system clock in some cases.</div>
<div><br></div><div>The reason your're seeing two different times is probably that one (SIP trace) is using the system time and the other (log messages) is using the internal FreeSWITCH one.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 17 June 2014 18:11, Phil Quesinberry <span dir="ltr"><<a href="mailto:philq@qsystemsengineering.com" target="_blank">philq@qsystemsengineering.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Looking into an intermittent problem</font></span><span lang="en-us"> <font face="Calibri">that</font></span><span lang="en-us"> <font face="Calibri">we</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">re having with one of our DIDs, I just noticed</font></span><span lang="en-us"> <font face="Calibri">that some of the</font></span><span lang="en-us"> <font face="Calibri">logged</font></span><span lang="en-us"> <font face="Calibri">timestamps don</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">t</font></span><span lang="en-us"> <font face="Calibri">seem to make sense, it</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">s like there are two different clocks at work here.</font></span><span lang="en-us"><font face="Calibri"> </font></span><span lang="en-us"> <font face="Calibri">What</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">s interesting is that</font></span><span lang="en-us"> <font face="Calibri">I</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">m seeing this wrong time in</font></span><span lang="en-us"> <font face="Calibri">received</font></span><span lang="en-us"> <font face="Calibri">contact header info as well</font></span><span lang="en-us"><font face="Calibri"> but</font></span><span lang="en-us"><font face="Calibri"> I</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">m guessing that</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">s coming</font></span><span lang="en-us"> <font face="Calibri">back to us</font></span><span lang="en-us"> <font face="Calibri">from our</font></span><span lang="en-us"> <font face="Calibri">own NTP timestamp in the SDP we send back to them</font></span><span lang="en-us"><font face="Calibri"> after the initial invite</font></span><span lang="en-us"><font face="Calibri">.</font></span><span lang="en-us"><font face="Calibri"> The system time is set correctly.</font></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Here is a short excerpt of</font></span><span lang="en-us"> <font face="Calibri">the console log with</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"> <font face="Calibri">siptrace enabled on the external profile</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"> <font face="Calibri">demonstrating</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"> <font face="Calibri">this behavior</font></span><span lang="en-us"><font face="Calibri">:</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">recv 939 bytes from udp/<a href="tel:%5B209.216.2.202" value="+12092162202" target="_blank">[209.216.2.202</a>]:5060 at</font></span><span lang="en-us"> <font color="#00B050" face="Calibri">16:10:58.987966</font></span><span lang="en-us"><font face="Calibri">:</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> ------------------------------------------------------------------------</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> INVITE sip:1410</font></span><span lang="en-us"><font face="Calibri">xxx</font></span><span lang="en-us"><font face="Calibri">7612@173.59.</font></span><span lang="en-us"><font face="Calibri">xxx.xxx</font></span><span lang="en-us"><font face="Calibri">:5080;transport=udp SIP/2.0</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Via: SIP/2.0/UDP <a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a>:5060;branch=z9hG4bK68239f89;rport</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> From: "+1410</font></span><span lang="en-us"><font face="Calibri">xxx</font></span><span lang="en-us"><font face="Calibri">3048" <sip:+1410</font></span><span lang="en-us"><font face="Calibri">xxx</font></span><span lang="en-us"><font face="Calibri">3048@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a>>;tag=as0e92c0c82014-06-17</font></span><span lang="en-us"> <font color="#FF0000" face="Calibri">12:07:58.767052</font></span><span lang="en-us"><font face="Calibri"> [DEBUG] switch_core_session.c:1034 Send signal sofia/external/+1410</font></span><span lang="en-us"><font face="Calibri">xxx</font></span><span lang="en-us"><font face="Calibri">3048@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a> [BREAK]</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> To: <sip:1</font></span><span lang="en-us"><font face="Calibri">410xxx7612</font></span><span lang="en-us"><font face="Calibri">@</font></span><span lang="en-us"><font face="Calibri">voip.ourdomain.</font></span><span lang="en-us"><font face="Calibri">com:5080>;tag=Hj722eXX0yj8S</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Contact: <sip:+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a>>2014-06-17</font></span><span lang="en-us"> <font color="#FF0000" face="Calibri">12:07:58.767052</font></span><span lang="en-us"><font face="Calibri"> [DEBUG] switch_core_session.c:1034 Send signal sofia/external/+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a> [BREAK]</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Call-ID: 63cd75ae5caa77be67d5a6944e86f5fe@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a></font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> CSeq: 103 INVITE</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> User-Agent: DidForSale-GW</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Max-Forwards: 70</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Remote-Party-ID: "+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">" <sip:+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a>>;privacy=off;screen=no</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Content-Type: application/sdp</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Content-Length: 289</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> v=0</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> o=root 2802 2803 IN IP4 207.223.69.137</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> s=session</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> c=IN IP4 207.223.69.137</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> t=0 0</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> m=audio 51480 RTP/AVP 0 8 18 101</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=rtpmap:0 PCMU/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=rtpmap:8 PCMA/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=rtpmap:18 G729/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=fmtp:18 annexb=no</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=rtpmap:101 telephone-event/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=fmtp:101 0-16</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> a=silenceSupp:off - - - -</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> ------------------------------------------------------------------------</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">send 405 bytes to udp/<a href="tel:%5B209.216.2.202" value="+12092162202" target="_blank">[209.216.2.202</a>]:5060 at</font></span><span lang="en-us"> <font color="#00B050" face="Calibri">16:10:58.988281</font></span><span lang="en-us"><font face="Calibri">:</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> ------------------------------------------------------------------------</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> SIP/2.0 100 Trying</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Via: SIP/2.0/UDP <a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a>:5060;branch=z9hG4bK68239f89;rport=5060</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> From: "+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">" <sip:+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a>>;tag=as0e92c0c8</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> To: <sip:1</font></span><span lang="en-us"><font face="Calibri">410xxx7612</font></span><span lang="en-us"><font face="Calibri">@</font></span><span lang="en-us"><font face="Calibri">voip.ourdomain.</font></span><span lang="en-us"><font face="Calibri">com:5080>;tag=Hj722eXX0yj8S</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Call-ID: 63cd75ae5caa77be67d5a6944e86f5fe@<a href="tel:209.216.2.202" value="+12092162202" target="_blank">209.216.2.202</a></font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> CSeq: 103 INVITE</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> User-Agent: FreeSWITCH-mod_sofia/1.5.6b+git~20131022T212715Z~20a55d3cc6</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> Content-Length: 0</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri"> ------------------------------------------------------------------------</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">2014-06-17</font></span><span lang="en-us"> <font color="#FF0000" face="Calibri">12:07:58.787035</font></span><span lang="en-us"><font face="Calibri"> [DEBUG] sofia.c:5863 Channel sofia/external/+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">@<a href="http://209.216.2.202" target="_blank">209.216.2.202</a> entering state [ready][200]</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">2014-06-17 12:07:58.787035 [DEBUG] sofia.c:5863 Channel sofia/external/+1</font></span><span lang="en-us"><font face="Calibri">410xxx3048</font></span><span lang="en-us"><font face="Calibri">@<a href="http://209.216.2.202" target="_blank">209.216.2.202</a> entering state [received][100]</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">2014-06-17 12:07:58.787035 [DEBUG] sofia.c:5873 Remote SDP:</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">v=0</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">o=root 2802 2803 IN IP4 207.223.69.137</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">s=session</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">c=IN IP4 207.223.69.137</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">t=0 0</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">m=audio 51480 RTP/AVP 0 8 18 101</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=rtpmap:0 PCMU/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=rtpmap:8 PCMA/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=rtpmap:18 G729/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=fmtp:18 annexb=no</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=rtpmap:101 telephone-event/8000</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=fmtp:101 0-16</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">a=silenceSupp:off - - - -</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">2014-06-17</font></span><span lang="en-us"> <font color="#FF0000" face="Calibri">12:07:58.787035</font></span><span lang="en-us"><font face="Calibri"> [DEBUG] switch_core_media.c:2990 Audio Codec Compare [PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">2014-06-17 12:07:58.787035 [DEBUG] switch_core_media.c:1879 Already using PCMU</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">2014-06-17 12:07:58.787035 [DEBUG] switch_core_media.c:3161 Set 2833 dtmf send/recv payload to 101</font></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Is this expected behavior</font></span><span lang="en-us"><font face="Calibri"> or is this a bug in the version we</font></span><span lang="en-us"><font face="Calibri">’</font></span><span lang="en-us"><font face="Calibri">re using</font></span><span lang="en-us"><font face="Calibri">?</font></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Thanks.</font></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><i></i></span><span lang="en-us"><i></i></span><i><span lang="en-us"></span></i><i><span lang="en-us"><font face="Times New Roman">Phil Quesinberry</font></span></i><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Arial">Q Systems Engineering, Inc.</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Arial">Embedded Hardware</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font face="Arial"> and</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"> <font face="Arial">Software Development</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font face="Arial">(410) 969-8002</font></span></p>
<p dir="LTR"><span lang="en-us"></span><a href="http://www.qsystemsengineering.com/" target="_blank"><span lang="en-us"></span><span lang="en-us"><u></u></span><u><span lang="en-us"></span></u><u><span lang="en-us"><font color="#0000FF" face="Arial">http://www.qsystemsengineering.com</font></span></u><span lang="en-us"></span></a><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>