Project

General

Profile

Actions

Bug #3297

closed

Properly deal with SSRC changes

Added by laforge almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
05/28/2018
Due date:
% Done:

100%

Spec Reference:

Description

From #3104, we found out that osmo-bts (with osmo-ortp) seems to be dropping RTP packets when the SSRC changes.

I also had a look at the BTS side and it seems that rtp_session_recvm_with_ts() in
osmo_ortp.c (libosmo-abis, recv_with_cb()) does not return anything. Presumably ortp
already decides that the received packets are not valid.

Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(102880): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(103040): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(103200): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(103360): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(103520): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(103680): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(103840): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(104000): ERROR!
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:0 Cannot use the scheduled mode: the scheduler is not started. Call ortp_scheduler_init() at the begginning of the application.Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:0 can't guess current timestamp because session is not scheduled.Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:143 osmo-ortp(16384): timestamp_jump, new TS 0, resyncing
Fri May 25 17:28:50 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(104160): ERROR!
Fri May 25 17:28:51 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(104320): ERROR!
Fri May 25 17:28:51 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(104480): ERROR!
Fri May 25 17:28:51 2018 <0015> trau/osmo_ortp.c:190 osmo_rtp_socket_poll(104640): ERROR!

The question is now what exactly is the problem here. When looking at RFC 3550,
8.2 Collision Resolution and Loop Detection. I find the following:

"In this algorithm, packets from a newly conflicting source address will be ignored and packets
from the original source address will be kept. If no packets arrive from the original source for an
extended period, the table entry will be timed out and the new source will be able to take over.
This might occur if the original source detects the collision and moves to a new source identifier,
but in the usual case an RTCP BYE packet will be received from the original source to delete the
state without having to wait for a timeout."

When I get this correct, then this is not really a bug in osmo-bts. When the
SSRC suddenly changes, ortp discards the packets that contain the new SSRC
because it assumes that these packets were send in error. RFC 3550 also states
that when the original source remained silent for some time, the stream from
the new source may be accepted.

This fits in the picture. Presumably we just need to add some logic to the MGW
that it sends an RTCP BYE when the stream gets switched. This might fix the
problem.

At the moment I can not see any RTCP BYE in the RTCP stream:
(no_ssrc_patchin_and_no_rtcp_omit_filtered_by_rtcp.pcapng)


Related issues

Related to OsmoBTS - Bug #3104: sysmobts with 201705 image no audio first seconds after call is acceptedResolveddexter03/23/2018

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)