Replace with hand-rolled requests made via libcurl.
Background: libxmlrpc-core-c3-dev packaging is currently broken in
Debian Sid and this is a good opportunity to move away from it.
Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1102554
Change-Id: I8a09452220993afdac19654edf13d7f3f6ba64c9
(cherry picked from commit 5d985372d8)
The newest module comes with a version string of "15.0.1" which makes
the conversion to float fail. Use string operations to fix.
Change-Id: Ia13534e9eeab451261d4c48fa782b116652b6904
(cherry picked from commit 9542cc0f3f)
With reuse-codecs, we still need to place the codec from the SDP into
our prefs list, even if it's already present, as the format options may
have changed. Update one affected test case.
Closes#1921
Change-Id: I688c57a8c45ec4c3bf159fe2193a0e00bbceeda2
(cherry picked from commit 65bfe22d40)
Use the correct media object (the source media) to obtain media-level i=
lines from. Adapt OSRTP output function to do the same.
Change-Id: I9ba4db286cf9d822b8986a7da2cb4f4aa1c69646
(cherry picked from commit 3385191049)
Just add the make target. Don't run it as part of the test suite as it's
quite extensive. Update the script a bit as well.
Change-Id: I192e90413bd7ffde842571324c816e4271367b42
(cherry picked from commit 0f55781a58)
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
This allows us to deallocate all held strings in one go without having
to iterate much.
Requires adjusting tests, Makefiles and dependencies.
Change-Id: Ic214f9dd2cd9609cb472301f52bb10d1918d859e
Introduce global generic memory arena variable, instead of having just
a call-specific memory arena. This makes it possible to use memory arena
outside of call contexts. Define previous call-specific functions in
terms of the generic ones.
Change-Id: Icde4f63f02dacbf8abfbaf107ea8b5bbe18d5eb8
Add a couple of tests for the following cases:
- use both zero-connection + mode sendrecv flags
at the same time
- answerer puts on hold (instead of offerer)
Change-Id: I5f849aa6b79a2e7e31512fbad9d2b82a6f5b0027
Sendrecv mode flag controls whether the sendrecv
state is forced to sendrecv, instead of the default
one sendonly, in the SDP body going towards recipient
(the one who will receive the MoH media).
Is declared as: moh=[mode=sendrecv]
Can be useful for corner cases, where the remote side
wants to see sendrecv state for whatever reason,
when getting MoH media and hence also remain in sendrecv
state in regards of the MoH originator.
Must be advertised once during the session origination,
nd then will affect the SDP body as soon as SDP sendonly
body is received (from the behalf of one, who advertised MoH
capabilities).
Backwards compatibility: doesn't affect non-MoH calls.
And doesn't affect offer/answer exchanges within MoH calls,
which do not put the remote side on hold.
Additionally: introduce a common function for the MoH flags
handling: `call_ml_moh_handle_flags()`, which does all
the required iterations/checks for the whole bunch of flags
at once.
Additionally: previously existing MoH tests adopted.
Additionally: new test introduced to check the SDP content,
when using mode sendrecv flag.
Remark: this flag is not mutually exclusive with
the zero-connection MoH flag.
Change-Id: I5bf6699f6890d8b927107cc143a18116efe45087
Zero-connection flag controls whether the connection
address offered in the SDP body going towards recipient
(the one who will receive the MoH media), is set
to all zeroes.
Is declared as: moh=[connection=zero]
Can be useful for older client implementations,
who want to see zeroed media when receiving sendonly
and getting put on hold.
Must be advertised once during the session origination,
and then will affect the SDP body as soon as SDP sendonly
body is received (from the behalf of one, who advertised MoH
capabilities).
SDP body recovers to the real IP addresses being inserted
into recipient's SDP, as soon as the media gets unheld.
Backwards compatibility: doesn't affect non-MoH calls.
And doesn't affect offer/answer exchanges within MoH calls,
which do not put the remote side on hold.
Additionally: previously existing MoH test adopted.
Additionally: new test introduced to check the SDP content,
when using zero-connection flag.
Change-Id: If0c38a3d294e6d5fe3886bee19ff2382e5705f9a
Introduced Music on Hold functionality:
- available only for the offer/answer model,
no other scenarios (publish, subscriber etc.)
are covered with it
- it gets advertised always at the beginning of
the call (original offer/answer exchange)
- can be added for both sides: offerer/answerer
- the one who advertises its MoH capabilities
with its SDP offer or answer, can later trigger
MoH using sendonly SDP and unhold remote
party using sendrecv SDP
- MoH covers only audio type of media sessions
- there is no specific selection of media sections
to be held, thus, if one audio media puts the
call on hold, the whole call is held
- list of parameters to be given when advertising
MoH capabilities: a sound source (file, blob or db source);
sendonly/sendrecv hold; zero-connection hold;
At least an audio file source must be given
- MoH cannot be mixed with the play media functionality,
the last one triggered will override previous one
- MoH must be unheld to stop the media being sent
towards a recipient, otherwise only a termination
of monologues will stop this packets stream
Change-Id: Iefd83ced79c14dadad936348a1d529007d6e7b3b
Fix for "opus<>opus+DTMF" auto test.
Receive when port is already known.
Fixes:
Use of uninitialized value $port in numeric eq (==) at ../perl/NGCP/Rtpengine/AutoTest.pm line 239.
Change-Id: Ic0089bae769ccafeb7145e703a6e21029da85a97
To support scenarios with mismatched media sections between two sides of
a call that aren't based on explicit SDP manipulations, attempt to
lookup the peer media based on an existing subscription also for offers.
Add extra checks (media type, media ID, monologue pointer) to make sure
that the obtained media object is actually the correct one.
Use a fallback on the existing index-based lookup in case no matching
media can be found.
As a side effect, the numbering and ordering of media objects created
during offer/answer is now reversed as the function is called in a
different order. Adapt tests as needed.
Change-Id: Ia5351f7d4fed03098c6be6bea3d4c74f52b8a76b
The `answer` processing empties out the list of codecs and leaves only
those that were accepted in the answer. Side effect of this is that if
another answer with a different list of codecs comes through, them the
codec-accept function is missing the original list of offered codecs and
can yield an incorrect result.
Fix this by storing a copy of the offered codecs at the end of the
`offer` processing, and then restore this list at the beginning of each
`answer` message.
Change-Id: I3c714e80689f3c5689637cc7d1eb2f203c292a15
In some cases, in particular when multiple input codecs are transcoding
to the same output codec (e.g. audio + DTMF -> audio), it's possible
that one of the input decoders produces frames in a format different
from the one expected by the encoder. Add an encoder-side resampler to
compensate for that.
Change-Id: I74d55edf47ac2fa65f950e68f4a5975f1ab947bb
There is enough overlap between the two enums that it doesn't make sense
to carry along both. Unify.
Change-Id: I9de8fbdb8d78a2002d8c1b62cea57188c937d61d
In order to be able to control, which media types
one wants to have in the call session,
add support of the "sdp-media-remove" flag.
Syntax:
"sdp-media-remove" : ["<media-type>", "<media-type>", ...]
Additionally, add according unit tests.
Change-Id: Ic52456f8124319992ea9ca8c161daefb1df46b59
These are too sensitive to timing and random events to run them on a
regular basis. Turn them into tests that must be enabled explicitly.
Change-Id: I574e3cbe140234362079ad9fd5fdc9d3c85697c8