[Freeswitch-dev] question about CNG on late packages

Anthony Minessale anthony.minessale at gmail.com
Tue Feb 5 18:35:02 MSK 2013


Don't negotiate CNG in the SDP and it won't use it or disable it with
suppress_cng=true in your channel or global vars.



On Tue, Feb 5, 2013 at 4:32 AM, Steven Ayre <steveayre at gmail.com> wrote:

> Because if a RTP packet is due and hasn't arrived yet you need something
> to play. Audio isn't like TCP where you dropped packets can be
> retransmitted, if it hasn't arrived by the time you want to play it it's
> too late and you have to play silence to handle it.
>
> Your audio problems are more likely due to packet loss or jitter which is
> why the RTP packet is overdue, not the CNG itself.
>
> It jitter's the problem enabling the jitterbuffer might help (at the
> expense of increased lag). If loss is the problem there's no way to handle
> that except as silence for the missing interval, you need to fix whatever
> is causing the loss.
>
> -Steve
>
>
> On 5 February 2013 10:23, Xijing Dai <dxj19831029 at gmail.com> wrote:
>
>> Hey all,
>>
>>
>> Inside code
>>
>> switch_rtp.c file:
>>
>>    static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t
>> *payload_type, switch_frame_flag_t *flags, switch_io_flag_t io_flags)
>>                  ................
>>                  if (check || (bytes && !switch_test_flag(rtp_session,
>> SWITCH_RTP_FLAG_USE_TIMER))) {
>> if (!bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)) { /*
>> We're late! We're Late! */
>>  if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK) && status
>> == SWITCH_STATUS_BREAK) {
>> switch_cond_next();
>>  continue;
>> }
>>
>> return_cng_frame();  <------- this lane to return cng frame if late.
>>  }
>> }
>>
>>
>> Could someone explain why we want to return cng frame when package is
>> late? this is caused for me to hear very bad noise audio.
>>
>> Can I disable return CNG frame?
>>
>>
>> Cheers
>>
>>
>>
>>
>>
>>
>> _________________________________________________________________________
>> 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
>>
>>
>
> _________________________________________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130205/6eb07c78/attachment.html 


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