idle is a 4 letter word to a realtime application.<br><br>The core keeps a single high-priority thread to keep 1ms timing and expands that broadcasting<br>to hundreds or thousand of threads who need accurate timing.<br><br>
Your choppy audio is caused by linksys lying about the packet len that it&#39;s using and we set our timer<br>to the wrong speed.<br><br><br><div class="gmail_quote">On Tue, Dec 1, 2009 at 9:19 PM,  <span dir="ltr">&lt;<a href="mailto:erandr-junk@usa.net">erandr-junk@usa.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Wow... Thinking about this timer setting and about how it converted<br>
send()/recv() from non-blocking to blocking, I straced freeswitch when it was<br>
supposed to be idle. It never pauses! It keeps going in and out of select()<br>
every millisecond! Why??<br>
<div><div></div><div class="h5"><br>
------ Original Message ------<br>
Received: Tue, 01 Dec 2009 08:31:46 PM EST<br>
From: <a href="mailto:erandr-junk@usa.net">erandr-junk@usa.net</a><br>
To: &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
Subject: Re: [Freeswitch-users] Choppy sound with PCMU<br>
<br>
&gt; Thanks. I tried that... Just forcing SPA to 20ms didn&#39;t change anything.<br>
Just<br>
&gt; installing SVN trunk didn&#39;t fix it either, but setting that option<br>
afterwards<br>
&gt; surely did the trick.<br>
&gt;<br>
&gt; One thing I&#39;ve noticed while staring at the console is that it *looks like*<br>
&gt; that w/o the new setting the stuttering happens when FS either re-registers<br>
&gt; itself with the provider or one of the SPA&#39;s port re-registers with FS.<br>
&gt;<br>
&gt; ------ Original Message ------<br>
&gt; Received: Tue, 01 Dec 2009 05:33:26 PM EST<br>
&gt; From: Anthony Minessale &lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
&gt; Subject: Re: [Freeswitch-users] Choppy sound with PCMU<br>
&gt;<br>
&gt; &gt; linksys has had a bug for eons that can be fixed by setting the ptime (or<br>
&gt; &gt; rtp packet size in their terms)<br>
&gt; &gt; in it&#39;s firmware to .20 instead of .30<br>
&gt; &gt;<br>
&gt; &gt; Asterisk does not use async RTP like we do so it&#39;s never a problem<br>
&gt; &gt; you can disable the timer by setting the channel var rtp_timer_name=none<br>
or<br>
&gt; &gt; sofia param rtp-timer-name to none in the sofia profile.<br>
&gt; &gt;<br>
&gt; &gt; You should also test this on latest SVN trunk or wait for pre8<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Tue, Dec 1, 2009 at 3:52 PM, eaf &lt;<a href="mailto:erandr-junk@usa.net">erandr-junk@usa.net</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I should also add, after browsing through some topics here, that my SIP<br>
&gt; &gt; &gt; provider sends 172-byte RTP frames, which is in accordance with<br>
ptime:20<br>
&gt; &gt; &gt; that it gives to FreeSWITCH.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; eaf wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I&#39;m trying to migrate from Asterisk to FreeSWITCH (really like the<br>
way<br>
&gt; &gt; &gt; how<br>
&gt; &gt; &gt; &gt; it can be programmed), but ran into one issue with sound quality that<br>
I<br>
&gt; &gt; &gt; &gt; just cannot workaround by myself. I would describe the sound problem<br>
as<br>
&gt; &gt; &gt; &gt; being &quot;choppy&quot;. From time to time small portions of the other party&#39;s<br>
&gt; &gt; &gt; &gt; voice are dropped, so the voice kind of stutters. This is not too<br>
bad,<br>
&gt; &gt; &gt; but<br>
&gt; &gt; &gt; &gt; is really noticeable, happens in every call and I don&#39;t experience<br>
the<br>
&gt; &gt; &gt; &gt; same with Asterisk running on the same box. I attached two files:<br>
&gt; &gt; &gt; &gt; freeswitch.wav and asterisk.mp3 to illustrate my point.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Issue completely goes away, if I set inbound-proxy-media to true.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; The way how I test is to connect SPA-2000 via 10mbps LAN to the box<br>
&gt; &gt; &gt; &gt; directly exposed to internet, and then dial a toll-free via<br>
FutureNine<br>
&gt; (a<br>
&gt; &gt; &gt; &gt; SIP provider).<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; The codec in use is PCMU. Can&#39;t really try PCMA or anything else with<br>
&gt; &gt; &gt; this<br>
&gt; &gt; &gt; &gt; provider. Only PCMU. Tried to match ptime of provider (30) with ptime<br>
&gt; of<br>
&gt; &gt; &gt; &gt; the SPA, didn&#39;t get any improvement. Tried turning off recording, no<br>
&gt; &gt; &gt; &gt; change either.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; What puzzles me is that even with greedy codec negotiations and with<br>
&gt; PCMU<br>
&gt; &gt; &gt; &gt; on both sides of  FreeSWITCH, it&#39;s still saying that<br>
&gt; &gt; &gt; &gt; TRANSCODING_NECESSARY. I&#39;m attaching relevant portion of<br>
freeswitch.log<br>
&gt; &gt; &gt; to<br>
&gt; &gt; &gt; &gt; illustrate.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; The box isn&#39;t particularly fast: Linux (Debian 4), CPU - AMD Geode<br>
&gt; LX800<br>
&gt; &gt; &gt; &gt; with 997 bogomips. 256MB RAM. Only one call in progress, so I hope<br>
that<br>
&gt; &gt; &gt; &gt; it&#39;s not a performance issue.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;  <a href="http://old.nabble.com/file/p26594250/freeswitch.wav" target="_blank">http://old.nabble.com/file/p26594250/freeswitch.wav</a> freeswitch.wav<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;  <a href="http://old.nabble.com/file/p26594250/asterisk.mp3" target="_blank">http://old.nabble.com/file/p26594250/asterisk.mp3</a> asterisk.mp3<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;  <a href="http://old.nabble.com/file/p26594250/freeswitch.log" target="_blank">http://old.nabble.com/file/p26594250/freeswitch.log</a> freeswitch.log<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Tried both 1.0.4 and 1.0.5pre5. Same results.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; What should I do next? Calls are consistently bad with FreeSWITCH,<br>
and<br>
&gt; &gt; &gt; &gt; consistently show no glitches with Asterisk.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt; View this message in context:<br>
&gt; &gt; &gt; <a href="http://old.nabble.com/Choppy-sound-with-PCMU-tp26594250p26599565.html" target="_blank">http://old.nabble.com/Choppy-sound-with-PCMU-tp26594250p26599565.html</a><br>
&gt; &gt; &gt; Sent from the Freeswitch-users mailing list archive at Nabble.com.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; FreeSWITCH-users mailing list<br>
&gt; &gt; &gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; &gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; &gt;<br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; &gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Anthony Minessale II<br>
&gt; &gt;<br>
&gt; &gt; FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; &gt; ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt; &gt; Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
&gt; &gt;<br>
&gt; &gt; AIM: anthm<br>
&gt; &gt; <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a> &lt;<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>&gt;<br>
&gt; &gt;<br>
&gt;<br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a>&lt;<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a>&gt;<br>
&gt; &gt; IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
&gt; &gt;<br>
&gt; &gt; FreeSWITCH Developer Conference<br>
&gt; &gt; <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a> &lt;<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a>&gt;<br>
&gt; &gt; <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
&gt; &gt;<br>
&gt;<br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a>&lt;<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>&gt;<br>

&gt; &gt; pstn:213-799-1400<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; FreeSWITCH-users mailing list<br>
&gt; &gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
<br>
<br>
<br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>