This triggers an initial "no carrier" indication if the sender is slow
to start PCM.
Change-Id: I3513efafae06f992b3c9abd58b8ec797320c3b56
(cherry picked from commit dafb68ef80)
If the receiver of a previously passthrough T.30 stream gets switched to
a generated PCM stream from a T.38 gateway, continue the sequencing of
the previous SSRC. Technically this is not necessary as the generated
PCM stream gets a new SSRC, but at least Asterisk seems to ignore this
and expect sequencing to continue, and will ignore PCM if the sequence
jump is too large.
Change-Id: Ia4656770db11f5fa1a1e9bf5bd71a0398deb1e00
(cherry picked from commit 18579227a9)
Add a simple function that acts as an encryption callback to just update
the ext_seq (index) of the egress SSRC context. The kernel module
already does this, but the daemon only did it when SRTP was involved.
This now tracks egress packet indexes in all cases.
Change-Id: I9460744de55ead4b05aceb322fd8482442ff2b41
(cherry picked from commit 0da49000ba)
A call that gets created but then doesn't get initialised would have its
Redis DB left at zero. At destruction it would then try to switch to DB
zero. Fix this by using an appropriate initial value.
Closes#1905
Change-Id: I852e48c5a06b732b37d2ccd5c478de4760aacd4e
(cherry picked from commit add46f265a)
Some components (the timer thread used by the codec handlers in
particular) may hold references to components owned by the codeclib (the
.so handles in particular). Move codeclib cleanup towards the end.
Change-Id: Ic581588c27b69c025576c14a69e999c9ca5d1597
(cherry picked from commit 43cc9cc06d)
Fixes a corner case that happens when trying to delete a call created with
ng offer and no-redis-update flag and for which no ng answer was received.
In such cases, one would receive warning messages from Redis
"ERR DB index is out of range".
What happens is that on call creation redis_hosted_db defaults to -1. This
value is changed when writing to Redis, but the writing is not done for a
ng offer with no-redis-update.
Kudos go to Pawel Kuzak.
Closes#1910
Change-Id: Iad19ec8ac69b169e6352662697b17eb23e6970fb
(cherry picked from commit bba9625b25)
These are potentially computed from inside each subdir, and in addition
due to what appears to be a regression in GNU make 4.4, where it is
reevaluating variables that contain $(shell) functions, many times (in
the order of thousands, this was slowing down the build, were on the
Debian amd64 build daemons it went from 5m with GNU make 4.3 to 2h40m
with GNU make 4.4. Although the bulk of the slow down has been fixed
with previous commits, the remaining optimizations are only to avoid
this potentially happening again in the future, and to reduce useless
duplicate work.
Instead of trying to cache the values from within make itself, where
programming this there is extremely painful, and does not seem to be
able to greatly reduce the number of calls, because the build system
is going to be called multiple times for different targets. Simply
externalize the generation into several shell scripts, that we call
to generate a make fragment that then we include from the various
Makefiles.
For a Debian build with GNU make 4.3, this reduces the amount of total
pkg-config calls from around ~1600 to 128, for dpkg-buildflags from
~1100 down to 6, and for dpkg-parsechangelog from ~56 to 17, but the
slow down is not as significant there anyway.
For a Debian build with GNU make 4.4, this reduces the amount of total
pkg-config calls from around ~2600 to 128, for dpkg-buildflags from
~2800 down to 6, and for dpkg-parsechangelog from ~350 to 21.
For a Debian build with GNU make 4.4, this reduces the build time
on this system from 2m10s to ~ 1m30s.
Change-Id: I427d0ea5106dc6ed1ff9e664ccdba2fa0725b7d0
(cherry picked from commit 7dbe24e4e5)
Starting with GNU make 4.4, build time have massively regressed
where before they would take 5m on amd64 now can take 2h40m. While this
seems clearly broken, the release notes are filled with notices for
breaking changes, and in particular the one for passing all make
variables down to the invoked programs executed via the «shell» GNU make
function, so it is not clear what is expected breakage and what is not.
This has been reported in Debian, but not yet upstream, and while it
seems like a clear regression, it's not clear what will be the upstream
take on it. For now apply workarounds that do not change semantics, and
which do not regress with older GNU make versions.
Use the GNU make «origin» function instead of «?=» which defaults to
defining a variable as a recursive one. Coerce already defined variables
into simple ones to avoid GNU make re-evaluating these variables for
each «shell» function invocation.
Ref: https://bugs.debian.org/1092051
Change-Id: I076fc05dd616918473a22e7e942fecfdc9851d47
(cherry picked from commit 887fb40f3f)
Make sure we properly return a failure if no supported payload type is
present.
Change-Id: Ia483e0819b2d8ca0c2c5184c929dfe3d05c96ca1
(cherry picked from commit 5f6609de5d)
Make sure a codec is not only known to us, but that it can actually be
used, in places where it makes sense. This is partially redundant
because ensure_codec_def_type already takes care of this, but a codec
definition may come from a different source, so it doesn't help to
double check.
Change-Id: I91af84afc2477840f1400674b2538ad8fb7746ee
(cherry picked from commit 7b60e85970)
NGCP-Flow: mr12.5
Only meant for mr12.5+ branches.
Add a support of session level connection replacement by default,
avoiding flag.
This is due to the fact: we've managed to deprecate
the replace-session-connection functionality, but the switch
to the SDP create approach hadn't been done that time around,
when branching the master to the mr12.5 branch.
Change-Id: Ic5230180e3ba83cda59e62c567414c71b2d2f1aa
A matching payload type number in an answer might not be enough to
establish compatible codecs. Also check the format parameters. Reject
and ignore answer codecs that are not compatible.
Change-Id: I12a1287216886926ec4b3c704029c923f815b429
(cherry picked from commit 9c00f30475)
(cherry picked from commit 71ff9210ce)
HTTP/WS init creates worker threads, which would be terminated by a fork
to background. Reverse the order.
Closes#1896
Possibly also relevant to #1895
Change-Id: I30b61e07ad3bed41b6b241e8943ed479277c1474
(cherry picked from commit dd04af1163)
Some compilers seem to think that there is some uninitialised usage
here. Work around this.
Closes#1891
Change-Id: Ic97a4b589fd2a0c33418a209557b7ce29009c7bf
(cherry picked from commit 4b614d8ce0)
If recording-method is pcap, then proc is zero-initialized, so
meta_filepath is empty. This shows many logs such as:
[core] Failed to open recording metadata file '(null)' for writing: Bad address
Prevent them by returning earlier.
Closes#1889
Change-Id: Ifeb3038f9a5c0bd6a9b7dd92842dd61783b40263
(cherry picked from commit 759fd72dc6)
Some of the earlier cleanup functions may still refer to some of the
options.
Change-Id: I5b6db886fe58891b3f737e7a0f3b31b0425699b9
(cherry picked from commit dafd71fd98)
The `if` block ends with a goto, so the indent for the `else` block is
not needed. Remove it for readability.
Change-Id: I0ab88246cfebf105c2256d129890925706917618
(cherry picked from commit a6775d3ca7)
These strings are not null terminated. Use the correct string length.
Change-Id: I15d7541af0d9cc09401180a7d45edbec9b915aa2
(cherry picked from commit 0a1d658766)
under normal circumstances, the rtp sink enters this function first
and updates the reti->local.family var to AF_INET so that when the
function is called for an rtcp sink, it exits the function early.
However, if media is being blocked the rtcp sink is the first to
enter the function and does so with a NULL payload type. this NULL
check is therefore required to prevent a sefgault on the call to `assert`.
closes#1876
Change-Id: Id95cbbc9ae388f50dd51417c351f4a9ba09eb5f0
(cherry picked from commit 8e04c44b86)
Re-move misleading log line to another place.
In the `sdp_manipulate_remove()` function:
- true - means remove
- false - means don't remove
Correct logging accordingly.
Change-Id: I3e0c08552a0192f3985da990b5f0c96cc31ece94
(cherry picked from commit ac488e3e10)
Explicitly set log context to the outgoing socket when sending packets
Change-Id: Iae17951654b09b3c48de724aeded70cdb6ce7a40
(cherry picked from commit b8468ec042)
Make sure stats are always added to the `delete` message.
Fixes stats being missing in case of `delete` without from-tag.
Change-Id: I635cc87b91d3e488696f33380b12dc68a24e51ad
(cherry picked from commit 7b28ec4402)
The pcre2 API was changed from
pcre2_substring_list_free(PCRE2_SPTR *)
to
pcre2_substring_list_free(PCRE2_UCHAR **)
in 10.43. The difference is a `const` qualifier. Work around this.
Closes#1869
Change-Id: Ib3dd3003352f6c3155bb47d69ecb7a1b02f4647a
(cherry picked from commit 4ebebe08d8)
We use int or unsigned int everywhere, except in a few leftover places.
Unify to (unsigned) int.
Change-Id: I0896b2f177957c17b30a3d0cb6b3fb2beb4bd684
(cherry picked from commit f60ee917c9)
If we remove a session that is not the session we're looking for
(re-used session ID after a removal race), we must return the incorrect
session to the hash table.
Change-Id: Iab73e1994251e5be766406b4e537a954b0e81f07
(cherry picked from commit 164f688fc1)
Release object reference when key is removed. Only relevant at shutdown.
Change-Id: Idc18890bb34d7e584dc5b4816553c759c3c663e2
(cherry picked from commit 7b9fcae055)
Use a BIO WRITE callback instead of BIO_read'ing from the BIO after each
operation. This is a more direct way to intercept data that needs to be
sent out.
Implement MTU-related BIO callbacks.
Deduct the assumed IP MTU overhead from the configured MTU during
startup.
Unlike the previous code, this does not necessarily send DTLS from the
same socket that received a message, nor to the same address that sent
one, and instead always uses the selected_sfd and ->endpoint. This may
or may not be a regression.
Closes#1806
Change-Id: I4d4456df3f378d00782cbfa64afdb2a038217e6c
(cherry picked from commit 08332161cf)
Add `break` statement. Fixes:
*** CID 1600019: Control flow issues (MISSING_BREAK)
/daemon/call_interfaces.c: 1162 in call_ng_flags_flags()
1156 out->strip_extmap = 1;
1157 break;
1158 case CSH_LOOKUP("symmetric-codecs"):
1159 ilog(LOG_INFO, "Ignoring obsolete flag `symmetric-codecs`");
1160 break;
1161 case CSH_LOOKUP("to-tag"):
>>> CID 1600019: Control flow issues (MISSING_BREAK)
>>> The case for value "155" is not terminated by a "break" statement.
1162 case CSH_LOOKUP("to_tag"):
1163 /* including the To tag in the delete message allows to be more selective
1164 * about monologues within a dialog to be torn down. */
1165 out->to_tag_flag = 1;
1166 case CSH_LOOKUP("trickle-ICE"):
1167 case CSH_LOOKUP("trickle-ice"):
Change-Id: I0195341ec70ea623ea7fece3782cfdc030ee4eaf
(cherry picked from commit ac4a1bab38)
Add `call_ng_process_flags()` based parsing
as for other opmodes, like offer and answer.
This keeps the backwards compatibility with
the older "flags" parsing approach on the
module side, as well as adds the possibility
to parse rtpp-flags on the daemon side.
As an advantage, there is no need to use
specific local parsing for things like
to/from tags, call-id, delete-delay etc.
Additionally:
- this commit introduces flags-flags parsing
for the "fatal" flag.
However, as before is only taken into account
by the `call_delete_ng()` processing,
so no functional change.
- this commit introduces main-flags parsing
for the "delete-delay" flag, which is also
only taken into account by the `call_delete_ng()`
processing, so no functional change.
- this commit adds To-tag options flag prasing
into the `call_ng_flags_flags()` function,
and is used by `call_delete_ng()` specificially,
for cases when more specific identification of
monologues to be deleted is used.
Change-Id: Ia992e5375a2f86318d9ad193a7857dd589038eed
(cherry picked from commit d31d49370f)
If media type doesn't match, assume a change in a=mid and ignore it.
Change-Id: Id0c8d7b9163445266e4179f4388109954226c4fa
(cherry picked from commit 2aa11c2a2a)
Fix zero c= line when first m= line has a zero port.
Add matching tests.
Change-Id: I1472b8101ffb3647e6aa092995672788510ee117
(cherry picked from commit 5b69e419d5)
Remove all codecs that cannot be transcoded to when the audio player is in
use.
Add safety to make_transcoder to return failure in case an unsupported
codec is requested for transcoding.
Convert leftover passthrough handlers to SSRC passthrough if there are
any (shouldn't be).
closes#1858
Change-Id: I1822e48723622d550624c7355a1acfbf8ca38eb8
(cherry picked from commit 4573f32d9b)