As Calls cannot deal with call waiting we should disable it entirely.
This works around issues where call audio get's completely broken once
the waiting call is disconnected on the BM818 modem shipped with the
Librem 5.
See https://source.puri.sm/Librem5/OS-issues/-/issues/311
gst_debug_bin_to_dot_file() NOOPs if GStreamer was initialized without
the enviroment variable GST_DEBUG_DUMP_DOT_DIR.
If SIGUSR2 was signalled we want to have a dot file dumped no matter
what. Functions for asynchronously writing the graph as obtained by
gst_debug_bin_dot_data() to a temporary file and print the path to
stdout.
Note: Usage of GST_DEBUG_BIN_DOT_FILE() on pipeline state change is left
as is, because we don't want to dump graphs for every change on every
pipeline.
IPv4 keeps working through the magic of IPv4 mapped IPv6 addresses.
Without this change errors about invalid address family will be raised
when trying to connect to a IPv6 host.
Bail out! CallsSipMediaPipeline-FATAL-WARNING: Error on the message bus: Could not get/set settings from/on resource. (../gst/udp/gstmultiudpsink.c(1228): gst_multiudpsink_configure_client (): /GstPipeline:media-pipeline/GstUDPSink:rtcp-udp-sink:
Invalid address family (got 10))
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019292
Plugins could no longer be found because we installed the plugins
outside the search path:
The directory structure uses singular 'provider', not plural
'providers'.
Fixes 11ba83c16e
Since we will introduce another type of plugin for the policy engine
we want to have each plugin type in separate directories.
We also have to adjust:
- plugin search directories
- po file location
- update paths for calls-doc target
Bail out! CallsSipMediaPipeline-FATAL-WARNING: Error trying to setup codecs for pipeline: Could not create 'decoder' element of type avdec_g722
stderr:
(gst-plugin-scanner:196349): GLib-GObject-WARNING **: 07:29:24.149: type name '-a-png-encoder-pred' contains invalid characters
See
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1055
This avoids the following warning:
../plugins/sip/calls-sip-origin.c: In function ‘sip_r_register’:
../plugins/sip/calls-sip-origin.c:483:26: warning: the comparison will always evaluate as ‘true’ for the address of ‘m_url’ will never be NULL [-Waddress]
483 | if (sip->sip_contact && sip->sip_contact->m_url && sip->sip_contact->m_url->url_host) {
| ^~
In file included from /usr/include/sofia-sip-1.12/sofia-sip/nua.h:47,
from ../plugins/sip/calls-sip-util.h:28,
from ../plugins/sip/calls-sip-call.h:30,
from ../plugins/sip/calls-sip-origin.c:31:
/usr/include/sofia-sip-1.12/sofia-sip/sip.h:477:23: note: ‘m_url’ declared here
477 | url_t m_url[1]; /**< SIP URL */
| ^~~~~
../plugins/sip/calls-sip-origin.c: In function ‘sip_callback’:
../plugins/sip/calls-sip-origin.c:779:23: warning: the comparison will always evaluate as ‘true’ for the address of ‘a_url’ will never be NULL [-Waddress]
779 | if (sip->sip_from && sip->sip_from->a_url &&
| ^~
/usr/include/sofia-sip-1.12/sofia-sip/sip.h:386:22: note: ‘a_url’ declared here
386 | url_t a_url[1]; /**< URL */
| ^~~~~
This enables proper negotiation of the codec when answering calls, which
previously also responded with codecs that were not part of the users
preferred ones.
Fixes: #413
A property of type SipMediaEncryption is added to both the origin and
the call which allows to state if we want the media session to be
encrypted with SRTP.
Logic is added to interact with the CallsSdpCryptoContext if encryption
is desired.
Objects of this type keep track of SDP of the local and remote peers,
allow generating offers and answers and codify default policy used for
cryptographic parameters.
Allows setting up cryptographic parameters with
calls_sip_media_pipeline_set_crypto() and use them to set GstCaps for
GstSrtpDec and GObject properties for GstSrtpEnc
by adding functions to the public API which determine if state changes
should be shown to the user and use them (instead of duplicating similar
logic).
We only have a single source of settings, so we should reflect that by
using a singleton. This also reduces our LoC.
This doesn't impair our ability to run tests because there we run with
GSETTINGS_BACKEND=memory
The rtpbin will request GstSrtpDec and GstSrtpEnc elements using the
"request-{rtp,rtcp}-{de,en}coder" family of signals.
The newly added boolean use_srtp controls whether the srtp elements are
returned in the signal handler and thus decides if SRTP is used or not.
Ust GST_DEBUG_BIN_TO_DOT_FILE to generate a dot graph of a pipeline for
debugging purposes when SIGUSR2 is received.
Note the same signal is also used within the dummy plugin to simulate an
incoming call from an unknown number, so when testing you probably want either
the sip plugin or the dummy plugin, but not both.
We were using two distinct pipelines, one for receiving and one for
sending. The receive pipeline was set to the playing state to allocate
the sockets which we would reuse for the sending direction for our NAT
traversal scheme.
The rework to a single pipeline broke reusing sockets subtly.
This happened because the state of the GstUDPSrc could be reset leading
to newly allocated sockets once the pipeline is set to play.
This is now fixed by locking the state of the GstUDPSrc in the ready
state during socket reuse setup and while the pipeline is paused.
Additionally get rid of the "close-socket" property on the udp sources
because it was never needed.
Fixes aa446f82
sq
Using a single pipeline makes implementing encryption easier because we don't
need to duplicate srtpenc and srtpdec elements for each direction.
It also makes it easier to switch to using farstream down the line (see #426).