diff --git a/daemon/call.c b/daemon/call.c index 4dcb54966..33f10f8b9 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -963,7 +963,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; @@ -2249,6 +2249,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 991911d8c..7c5b32497 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -831,6 +831,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 12f8ea4b7..28c9228ff 100644 --- a/include/call.h +++ b/include/call.h @@ -414,6 +414,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 1601fdee7..ed94d99fb 100644 --- a/include/call_interfaces.h +++ b/include/call_interfaces.h @@ -117,7 +117,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 be51376c4..7a08dc743 100755 --- a/utils/rtpengine-ng-client +++ b/utils/rtpengine-ng-client @@ -79,6 +79,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'}, ) or die; my $cmd = shift(@ARGV) or die;