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'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"><<a href="mailto:erandr-junk@usa.net">erandr-junk@usa.net</a>></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: <<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
Subject: Re: [Freeswitch-users] Choppy sound with PCMU<br>
<br>
> Thanks. I tried that... Just forcing SPA to 20ms didn't change anything.<br>
Just<br>
> installing SVN trunk didn't fix it either, but setting that option<br>
afterwards<br>
> surely did the trick.<br>
><br>
> One thing I've noticed while staring at the console is that it *looks like*<br>
> that w/o the new setting the stuttering happens when FS either re-registers<br>
> itself with the provider or one of the SPA's port re-registers with FS.<br>
><br>
> ------ Original Message ------<br>
> Received: Tue, 01 Dec 2009 05:33:26 PM EST<br>
> From: Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>><br>
> To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
> Subject: Re: [Freeswitch-users] Choppy sound with PCMU<br>
><br>
> > linksys has had a bug for eons that can be fixed by setting the ptime (or<br>
> > rtp packet size in their terms)<br>
> > in it's firmware to .20 instead of .30<br>
> ><br>
> > Asterisk does not use async RTP like we do so it's never a problem<br>
> > you can disable the timer by setting the channel var rtp_timer_name=none<br>
or<br>
> > sofia param rtp-timer-name to none in the sofia profile.<br>
> ><br>
> > You should also test this on latest SVN trunk or wait for pre8<br>
> ><br>
> ><br>
> ><br>
> > On Tue, Dec 1, 2009 at 3:52 PM, eaf <<a href="mailto:erandr-junk@usa.net">erandr-junk@usa.net</a>> wrote:<br>
> ><br>
> > ><br>
> > > I should also add, after browsing through some topics here, that my SIP<br>
> > > provider sends 172-byte RTP frames, which is in accordance with<br>
ptime:20<br>
> > > that it gives to FreeSWITCH.<br>
> > ><br>
> > ><br>
> > > eaf wrote:<br>
> > > ><br>
> > > > Hi,<br>
> > > ><br>
> > > > I'm trying to migrate from Asterisk to FreeSWITCH (really like the<br>
way<br>
> > > how<br>
> > > > it can be programmed), but ran into one issue with sound quality that<br>
I<br>
> > > > just cannot workaround by myself. I would describe the sound problem<br>
as<br>
> > > > being "choppy". From time to time small portions of the other party's<br>
> > > > voice are dropped, so the voice kind of stutters. This is not too<br>
bad,<br>
> > > but<br>
> > > > is really noticeable, happens in every call and I don't experience<br>
the<br>
> > > > same with Asterisk running on the same box. I attached two files:<br>
> > > > freeswitch.wav and asterisk.mp3 to illustrate my point.<br>
> > > ><br>
> > > > Issue completely goes away, if I set inbound-proxy-media to true.<br>
> > > ><br>
> > > > The way how I test is to connect SPA-2000 via 10mbps LAN to the box<br>
> > > > directly exposed to internet, and then dial a toll-free via<br>
FutureNine<br>
> (a<br>
> > > > SIP provider).<br>
> > > ><br>
> > > > The codec in use is PCMU. Can't really try PCMA or anything else with<br>
> > > this<br>
> > > > provider. Only PCMU. Tried to match ptime of provider (30) with ptime<br>
> of<br>
> > > > the SPA, didn't get any improvement. Tried turning off recording, no<br>
> > > > change either.<br>
> > > ><br>
> > > > What puzzles me is that even with greedy codec negotiations and with<br>
> PCMU<br>
> > > > on both sides of FreeSWITCH, it's still saying that<br>
> > > > TRANSCODING_NECESSARY. I'm attaching relevant portion of<br>
freeswitch.log<br>
> > > to<br>
> > > > illustrate.<br>
> > > ><br>
> > > > The box isn't particularly fast: Linux (Debian 4), CPU - AMD Geode<br>
> LX800<br>
> > > > with 997 bogomips. 256MB RAM. Only one call in progress, so I hope<br>
that<br>
> > > > it's not a performance issue.<br>
> > > ><br>
> > > > <a href="http://old.nabble.com/file/p26594250/freeswitch.wav" target="_blank">http://old.nabble.com/file/p26594250/freeswitch.wav</a> freeswitch.wav<br>
> > > ><br>
> > > > <a href="http://old.nabble.com/file/p26594250/asterisk.mp3" target="_blank">http://old.nabble.com/file/p26594250/asterisk.mp3</a> asterisk.mp3<br>
> > > ><br>
> > > > <a href="http://old.nabble.com/file/p26594250/freeswitch.log" target="_blank">http://old.nabble.com/file/p26594250/freeswitch.log</a> freeswitch.log<br>
> > > ><br>
> > > > Tried both 1.0.4 and 1.0.5pre5. Same results.<br>
> > > ><br>
> > > > What should I do next? Calls are consistently bad with FreeSWITCH,<br>
and<br>
> > > > consistently show no glitches with Asterisk.<br>
> > > ><br>
> > > ><br>
> > ><br>
> > > --<br>
> > > View this message in context:<br>
> > > <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>
> > > Sent from the Freeswitch-users mailing list archive at Nabble.com.<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>
> > ><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>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Anthony Minessale II<br>
> ><br>
> > FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> > ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
> > Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">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> <<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>><br>
> ><br>
><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a>><br>
> > IRC: <a href="http://irc.freenode.net" target="_blank">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> <<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a>><br>
> > <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
> ><br>
><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>><br>
> > pstn:213-799-1400<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>
> ><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>
><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>