Age | Commit message (Collapse) | Author | Files | Lines |
|
ortp >= 0.24.0 doesn't differentiate between SO_REUSEADDR and
SO_REUSEPORT, and has both enabled by default. The latter means that
we can end up with non-unique port bindings as we will not fail to
bind the same port twice.
This should have caused visible problems not only when operating multiple
osmo-bts on one machine (rare), but also with a single osmo-bts. Once the range
(default 16384-17407 ) wraps, there is a risk of new sockets (for new cals)
colliding with old ones. As two ports (RTP+RTCP) are used per call, this means
every 512 voice calls we expect the BTS to wrap. And from that point onwards
there's a risk of overlapping with previously allocated sockets.
Change-Id: I4fc9eee561c7958c70c63b4ffdc6cb700b795e28
Closes: OS#4444
|
|
The bound RTP socket will wait for incoming RTP packets and as soon as it
sees one, will 'connect' to it, so all replies will go to that sources and
incoming messages from other sources will be discarded. This obviously only
works once.
Change-Id: I5b54ca4296901fcf37794faf29e0b2acca27bd1b
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Change-Id: Ib6df0df04cd6ba342753c84398274d04917ace40
|
|
We discovered that enabling the scheduler caused a segfault on the
ARM build of osmo-bts. So we have to revert the following two changes:
Change-Id I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Change-Id I4b8f0349d5503bbe53745cc8903beb26f149f219
This reverts commit 5a236ce1d414625476d0c0f652ecbe0eb2bbeaf1.
Change-Id: Ic81062d79a304038a50658b955f7d05edb3fa28e
Related: OS#3299
|
|
We discovered that enabling the scheduler caused a segfault on the
ARM build of osmo-bts. So we have to revert the following two changes:
Change-Id I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Change-Id I4b8f0349d5503bbe53745cc8903beb26f149f219
This reverts commit 7632278ea36c25eaa0d8e35fa0ee102ec05dc802.
Change-Id: Ie375b9eb0dc8ec4f8d4ca12940a7bc5dfc1f6235
Related: OS#3299
|
|
we use some functionalities of libortp that require to use rtp sessions
with the scheduled mode enabled. Since we do not enable the scheduled mode,
yet, we receive error messages in the log that complain about a non enabled
scheduled mode.
- Turn on scheduled mode using rtp_session_set_scheduling_mode() when
osmo_rtp_socket_create() is called.
Note: this patch is related to chane:
I3a63c23f5ede47773b6a249a48ecebd5d3b45ace Unfortunately we observed a
segfault with ortp version 0.25.0 (ARM), which seems to be related to an
unintialized scheduling mode. We expect this patch to fix the problem.
Change-Id: I4b8f0349d5503bbe53745cc8903beb26f149f219
Closes: OS#3299
|
|
libortp detects an ssrc jump using a packet count thresold. This
threshold is set to 50 by default. This means that libortp has
to see 50 rtp packets with the new SSRC before it accepts the
new stream. In our application we want to detect the changed
SSRC (Handover) as fast as possible. So we should change the
threshold to zero.
- use rtp_session_set_ssrc_changed_threshold() to set a thresold
of 0 packets when osmo_rtp_socket_create() is called.
Change-Id: Id88c2c44d29a409affc2e47fdb932e1187020593
Related: OS#3299
|
|
When libortp detects a timestamp jump, we resynchronize the session
in order to restore proper rtp frame reception. However, we do not
resynchronize on an SSRC change. An SSRC change usually indicates
the change of an RTP stream source, which is a much more profound
event than a timestamp change, so we should even reset the session
on SSRC changes.
Also, not resynchronizing the session on an SSRC change causes
problems when the jitter buffer feature is used. In those cases
it takes libortp a long time until it finally detects the timestamp
jump and the session resyhcornization happens late.
- reset the ession on SSRC changes by calling rtp_session_reset()
Change-Id: I8688a55cd20d0e14493c357db80754851e12f2fb
Related OS#3299
|
|
the function osmo_rtp_init() is initializing ortp at the start of the
application. However, it does not start the scheduler of ortp, which
leads into error log messages in some situatios.
- make sure that ortp_scheduler_init() is called with osmo_rtp_init()
Change-Id: I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Related: OS#3299
|
|
This allows the users of libosmotrau to set the content of the SDES
items to something more useful than their compile-time defaults.
Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82
Related: OS#2701
|
|
Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7
|
|
Duration of an RTP frames dictates the timestamp used for the next
frame, not for the one being sent now. It was done like this before to
account for possible losses.
Implementation wise, the duration was understood as "duration
between last frame was sent and now when current one is sent". It makes
more sense to use it as the duration in number of sampling ticks
as described on the function documentation, specially now that we can
account for extra time by means of osmo_rtp_skipped_frame.
Change-Id: Ib8f5fa5509059fe908c09a4381844c613d478548
|
|
This API will be used by osmo-bts to maintain the sampling clock of the
RTP socket whenever a frame should be sent but it is not available, for
instance due to low quality of signal.
Change-Id: Id6099372b6231c0a4b6ea0716f46f5daee7049e1
|
|
Since ortp commit 5ab29c50adc7948b11449e3aeee66010379ff7dc preceeding
ortp 0.24, the API is fixed and requests a pointer instead of an
unsigned long.
As we now require at least ortp 0.22 since libosmo-abis
15d9b7929d449e4138bcb003c614035bceadc3d1, we need to support both old
and new version of the API to continue having support for 0.22 but still
supporting new versions of the library.
Change-Id: I2dbd0498d75160358eca4336850e1a0ad2efdbeb
|
|
Explicitly state that we are using an internal API from ortp, and
define the function we are using to avoid printing a warning.
Change-Id: I9cadcb31ce7ade3632d83753be97fdc9ea518b5b
|
|
Duration passed to osmo_rtp_send_frame_ext function is based
on the last frame and the current one. Duration must then be
added to the timestamp before being transmitted.
Change-Id: I0593d6530c097cca34125a0ae2dd1b019b4dd80d
|
|
Commit 0c8d9ddaea8c1afdc0e9b8c37a31c9d158e57efd in ortp broke old API:
function ortp_set_log_level_mask requires one new parameter 'domain'.
This commit fixes compilation in my Archlinux box using ortp 1.0.1.
Change-Id: I46e565f1873c7baf3c3b0aafe73951d20ce083b4
|
|
* check RTP socket parameter and enable necessary jitter buffering
* return the status of requested jitter buffering instead of always
returning 0
* document function parameters and return value
Change-Id: I87d4d9fe990683adbb02b64cb39b78de533d8046
|
|
Change-Id: If8f87587227b09635361b758873f75d8b6aa3497
|
|
ortp: use extra parameter for network_error callback in log message as
it's described in oRTP documentation (error string).
Change-Id: I581db499d453b80230198d95000f0f6fc20752d1
|
|
Change-Id: I5c36bbc35e2ba794b5e446f52a0752bcf1367d11
|
|
Change-Id: I4969e0a9e7109d426066e6c2b80ed44c396b65b5
Fixes: Coverity CID 57631
|
|
Use separate pointer for payload to make sure mblk->b_rptr is not
advanced (which breaks the use of rtp_get_* macros that assume
mblk->b_rptr is pointing to the RTP header, not the payload).
Committed by: Max <msuraev@sysmocom.de>
Change-Id: I205630e1da98693ba0ac25e86e21780284185077
Related: OS#1802
|
|
* Remove code duplication
* Use return value of rtp_get_payload() instead of pointer arithmetic
Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef
|
|
While debugging low-level RTP issues it is handy to be able to match
exact RTP packet with the payload available to higher-level
functions. Having Sequence number and Timestamp RTP fields as parameter
to receiving callback is the easiest way to do so.
Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274
|
|
This will prevent the timestamp jump to occur between each call for DTX
if something goes wrong. It's handy as oRTP does not manage well
timestamp jump if it is not resynced.
Fixes: OS#1803
Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df
|
|
This reverts commit c77c2a6aa13accbc558888ab788d1148eb9aeb1a,
and explicitly sets connected mode to zero for set_remote_addr to work around
internal libortp problems. See https://osmocom.org/issues/1661#note-15.
Related: OS#1661
Change-Id: I9d146c3bd76e02685b09278167b56029152221a0
|
|
Require version 0.22.0 which matches Debian stable ATM to simplify
testing and maintenance across all supported BTS models and
corresponding toolchains.
Change-Id: I005d60bb50889edad3e6fc0cd9f7f180aeaf1dab
Fixes: SYS#2569
|
|
Previously rs->rtp_bfd.when and rs->rtcp_bfd.when value of BSC_FD_READ
was overridden by 0. Fix it.
Reported by coverity: CID 1357763.
Change-Id: I11940cbf50361c4ea262d7001a16f9a982392f27
|
|
Previously RTP receive callback ignored Marker bit from RTP
headers. Extend API to include it explicitly.
Change-Id: I3c2b6365d8a51bf98805614e07344d2639875fde
Related: OS#1750
|
|
In libortp, rtp_session_set_connected_mode() sets a flag that is used in
rtp_session_set_remote_addr().
The name rtp_session_set_remote_addr() is misleading: this function actually
does take a lot of action, including an attempt to connect to the remote
server. Thus the "connected mode" flag needs to be set before this.
Suggested-by: NuRan Wireless <nuranwireless.com>
Change-Id: I92308ddffc376af8d4d65e6b9cbeee222b7bff5e
|
|
Add osmo_rtp_send_frame_ext() which accept boolean parameter in addition
to arguments of osmo_rtp_send_frame() to explicitly set marker bit in
RTP header. Previously it was always unset which resulted in degradation
of speech quality for codecs with explicit talkspurt events (was tested
with AMR's ONSET).
Related: OS#1562
Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9
Reviewed-on: https://gerrit.osmocom.org/82
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
|
|
ortp: according to oRTP documentation rtp_session_set_connected_mode()
uses the address set by rtp_session_set_remote_addr() - move the
function call accordingly.
Fixes: OS#1661
|
|
Force use of RTCP port adjacend to random RTP port, if random RTP port
is used.
Before this patch, port 0 could be selected for RTCP.
|
|
Previously it was possible to send RTP data to port 0. This produce
multiple errors during the beginning of RTP transmission.
To address this OSMO_RTP_F_DISABLED flag was introduced. It's set by
default for all new RTP sessions. It can be manually unset after the
call to osmo_rtp_socket_create(). When the flag is set it prevents
transmission and reception of RTP frames for the session. The flag is
unset automatically in osmo_rtp_socket_connect() when session is bound
to non-zero remote port.
Fixes: OS#1662
|
|
ortp 0.18 has introduced the jitter_stats but we only check for
0.21 an later. It is okay that at some point the jitter stats
will be reported. For previous versions it is 0.
|
|
We might want to know how many things arrived at the BTS and
ortp is already counting for us. We don't intend to use RTCP
so I am not sure what the last "sender report" is and how
accurate the jitter is.
|
|
Pick a random timestamp when creating the session.
RFC 3550:
The initial value of the timestamp SHOULD be random, as for the
sequence number.
Fixes: SYS#403
|
|
The usage of random() is not that unpredictable but the closest
we can get right now.
RFC 3550:
The initial value of the sequence number SHOULD be random
(unpredictable) to make known-plaintext attacks on encryption
more difficult, even if the source itself does not encrypt
according to the method in Section 9.1, because the packets
may flow through a translator that does. Techniques for
choosing unpredictable numbers are discussed in [17].
Fixes: SYS#403
|
|
The second check used the cached result for ORTP. Store the result
in ORTP_VERSION and my system properly detects that it is running
on < 0.21.
The HAVE_ORTP_021 will always be defined so just use #if and not
the #ifdef to fix the build.
|
|
in libortp >= 0.21, rtp_session_set_local_addr() has one extra
argument for the RTCP port.
|
|
|
|
|
|
If we bind a local socket to INADDR_ANY, then getsockname() will always
return 0.0.0.0 for the local IP address _unless_ the socket was
previously connected to a specific remote IP/port using connect().
This will have the side effect that we only accept RTP packets from the
one IP/port that we have connect()ed to, but that is actually
intentional and useful in our applications.
|
|
This spares us another recursion, and allows a much higher
parallelisation, since trau is only one source unit and one standalone
library.
Incidentally, also make sure that the version specification for
libosmoabis is applied.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
|
Also contextually remove the AC_PROG_LIBTOOL call (which is an
obsolete name for what is now LT_INIT).
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
|
When many applications write to the stdout it is not clear that
'network_error' comes from osmo-bts due the usage of oRTP. At least
provide a hint that oRTP is involved.
|
|
|
|
|
|
|