From ffc9e34e14812e1b7c1c185b5df8022770a143ae Mon Sep 17 00:00:00 2001 From: balajeesv Date: Mon, 1 Feb 2021 11:20:04 -0500 Subject: [PATCH] TT#14008 Squashed commit of the following: closes #1134 commit 1cdf8d50844baa27513c51a552504a8406ca17a4 Merge: 2fc54462 cc4d049f Author: Richard Fuchs Date: Mon Feb 1 11:19:43 2021 -0500 Merge branch 'jb_disable' of https://github.com/balajeesv/rtpengine into balajeesv-jb_disable Change-Id: Ic01bbeb776d8ac0f3ebb46ae0a263243828443bb commit cc4d049fabad5f961f676bb93db557f5c7ba6764 Merge: 2f935206 9deedea1 Author: balajeesv Date: Fri Dec 11 23:15:48 2020 +0530 Merge branch 'jb_disable' of https://github.com/balajeesv/rtpengine into jb_disable commit 2f935206de98ce2c01113351750fa395c26703bc Merge: f553a9e5 7c3d2e01 Author: Balajee SV <41125423+balajeesv@users.noreply.github.com> Date: Fri Dec 11 23:12:27 2020 +0530 Merge branch 'master' into jb_disable commit 9deedea1c4e2cb204662b65703a2d8f0c1fc10ed Merge: f553a9e5 7c3d2e01 Author: Balajee SV <41125423+balajeesv@users.noreply.github.com> Date: Fri Dec 11 23:12:27 2020 +0530 Merge branch 'master' into jb_disable commit f553a9e5828835606ceeddecdd7e5ca8c4fadca2 Author: balajeesv Date: Fri Dec 11 22:47:46 2020 +0530 rtpengine: Disable jitter-buffer per call in offer Change-Id: Ib4443a0d66c78749e24f3d2cb48c991e408e21fd --- daemon/call.c | 5 ++++- daemon/call_interfaces.c | 3 +++ include/call.h | 1 + include/call_interfaces.h | 3 ++- utils/rtpengine-ng-client | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index dd8551533..6ba3d138c 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -967,7 +967,7 @@ struct packet_stream *__packet_stream_new(struct call *call) { recording_init_stream(stream); stream->send_timer = send_timer_new(stream); - if (rtpe_config.jb_length) + if (rtpe_config.jb_length && !call->disable_jb) stream->jb = jitter_buffer_new(call); return stream; @@ -2264,6 +2264,9 @@ int monologue_offer_answer(struct call_monologue *other_ml, GQueue *streams, goto error_ports; } + if(flags->disable_jb && media->call) + media->call->disable_jb=1; + __num_media_streams(media, num_ports); __assign_stream_fds(media, &em->intf_sfds); diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 1bbbdab28..3694c875a 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -852,6 +852,9 @@ static void call_ng_flags_flags(struct sdp_ng_flags *out, str *s, void *dummy) { case CSH_LOOKUP("no-passthrough"): out->passthrough_off = 1; break; + case CSH_LOOKUP("no-jitter-buffer"): + out->disable_jb = 1; + break; default: // handle values aliases from other dictionaries if (call_ng_flags_prefix(out, s, "SDES-no-", call_ng_flags_str_ht, &out->sdes_no)) diff --git a/include/call.h b/include/call.h index fe5e8580c..dd45ddefc 100644 --- a/include/call.h +++ b/include/call.h @@ -417,6 +417,7 @@ struct call { int rec_forwarding:1; int drop_traffic:1; int foreign_call:1; // created_via_redis_notify call + int disable_jb:1; }; diff --git a/include/call_interfaces.h b/include/call_interfaces.h index 56e19cf20..cce7f2871 100644 --- a/include/call_interfaces.h +++ b/include/call_interfaces.h @@ -122,7 +122,8 @@ struct sdp_ng_flags { drop_traffic_start:1, drop_traffic_stop:1, passthrough_on:1, - passthrough_off:1; + passthrough_off:1, + disable_jb:1; }; diff --git a/utils/rtpengine-ng-client b/utils/rtpengine-ng-client index 6fd3ce49e..87e7e9cb3 100755 --- a/utils/rtpengine-ng-client +++ b/utils/rtpengine-ng-client @@ -81,6 +81,7 @@ GetOptions( 'inject-DTMF' => \$options{'inject DTMF'}, 'DTLS-fingerprint=s' => \$options{'DTLS-fingerprint'}, 'ICE-lite=s' => \$options{'ICE-lite'}, + 'no-jitter-buffer' => \$options{'no jitter buffer'}, 'generate-RTCP' => \$options{'generate RTCP'}, 'single-codec' => \$options{'single codec'}, ) or die;