[Freeswitch-dev] Rare audio "clicks" inside mod_conference

Anthony Minessale anthony.minessale at gmail.com
Wed Aug 15 20:44:46 MSD 2012


Add some debugging to the places in switch_core_io.c that do memset,
maybe its from that.


On Wed, Aug 15, 2012 at 7:57 AM, Peter Olsson
<peter.olsson at visionutveckling.se> wrote:
> Before anyone mentions it (since I’m usually one of those who does), I will
> submit this to Jira, but I would appreciate some more input before doing so
> :)
>
>
>
> /Peter
>
>
>
> Från: freeswitch-dev-bounces at lists.freeswitch.org
> [mailto:freeswitch-dev-bounces at lists.freeswitch.org] För Peter Olsson
> Skickat: den 15 augusti 2012 14:50
> Till: freeswitch-dev at lists.freeswitch.org
> Ämne: [Freeswitch-dev] Rare audio "clicks" inside mod_conference
>
>
>
> I’m not really sure where to ask about this, but I’ll give it a try on the
> dev-list for starters..
>
>
>
> I sometimes (very rarely, but often enough to want to find the cause) get
> audio “clicks” in the audio stream on devices connected to a FS conference.
> I have samples from wireshark showing the problem. In L16 format it seems
> there are a few bytes set to 32767 (max int16 value), that is causing the
> actual audio.
>
>
>
> The strange thing is that when this occurs, there is actually no one that
> sends this audio (but all members except one will get this audio, so it has
> been put into the buffer by the member without the click), so I’m starting
> to think if this is a generated packet inside FS, that is not initialized
> correctly, or if the decoding from PCMA/PCMU to L16 fails for some reason.
>
>
>
> I’ve traced it down so far that I know how to handle it (at least work
> around it), but I don’t know how to reproduce it, and I don’t know the real
> cause. With the help of lots of debugging I’ve seen that this occurs when a
> partial frame is read from a member (however, according to wireshark, this
> partial frame was never sent over the network). We have 8khz conferences,
> and the connected members use PCMA and/or PCMU, so normally when audio from
> a member is appended to the audio buffer, the length of the data is 320
> bytes (I guess this is L16). When the click occurs, I’ve seen that the
> datasize is only 160 bytes instead, which would more indicate a undecoded
> PCMA/PCMU frame. And as I said, there is no packet with half the payload
> size anywhere in wireshark, so I’m not really sure where this is coming
> from. I’ve looked through most of the code in switch_rtp.c and mod_sofia.c
> (that’s related to RTP), but I can’t really find any good reason.
>
>
>
> Right now I’ve added a check (if read_frame->datalen !=
> member->read_impl.encoded_bytes_per_packet), and when using this it works as
> expected (at least so far – as I said, it happens rarely), but I guess I
> might miss a frame of audio. I will try to look into this further, but if
> anyone have any suggestions I’m open for ideas :)
>
>
>
> /Peter
>
> !DSPAM:502b98ee32764854613503!
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list