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
When setting up a binding between GSettings and GObject properties the
CallsSetting used to set the value from the GSetting to the property and
back to the GSetting.
While the value was still the default value it was marked as non default
because it had explicitly been set without any user interaction.
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
We're not setting the desired ports from the outside anymore, but rather
querying the ports that have been allocated by the operating system.
Therefore the lport-rtp and lport-rtcp property have become superfluous and are
being removed. We also adapt to changes outside of the pipeline code.
The id property will be used to keep track of which origin was used for a call,
so that we can default to reusing the same origin when placing a call from the
history.
Fixes the deprecation warning from meson:
DEPRECATION: target sip links against shared module sip, which is incorrect.
This will be an error in the future, so please use shared_library() for sip instead.
If shared_module() was used for sip because it has references to undefined symbols,
use shared_libary() with `override_options: ['b_lundef=false']` instead.
This gives us a better separation of concerns and it will make it a bit easier
to move the sip independent media pieces out of the plugin in the mid to long
term.
This makes sure that a NULL id will return a NULL contact and additionally
asserts that even a NULL contact will give us sensible primary/secondary display
information.
This was handled explicitly in the Call window.
By changing the logic to delay the emission of "ui-call-removed" we make sure
that the Call UI and the exported DBus object is consistent.
We also need to change the test cases to use run a GMainLoop because we now have
to wait until signal comes in.
This simplifies the code quite a bit by removing the supported protocols from
being determined dynamically via the loaded plugins.
It was previously used to add/remove a GListStore to origins_by_protocol.
This is a prerequisite for having per protocol dial actions.
Introduce a state-changed signal which also gives a reason for why the state
changed. This will allow the UI to give some meaningful feedback to the user.
Additionally we can get rid of a number of things that were not really states,
but rather reasons for why a state changed (f.e. authentication failures).
Sofia detects a NAT by presence of the "received" parameter in the Via header in
the response to a REGISTER. Sofia will then update the Contact header to use the
IP as reported by the registrar.
The "received" parameter MUST be included in the response according to
https://datatracker.ietf.org/doc/html/rfc3261#section-18.2.1
when the registrar detects a difference between the domain part of the top Via
header and the packet source address but practice has shown that this will not
always be the case.
Addditionally this change allows us to have origins bound to different network
interfaces which would be useful when a registrar can only be accessed through a
VPN.
This also fixes an issue with SDP introduced in
36880c3d34 which was only seen on some SIP
providers:
The session name ("s=") line is not relevant for establishing a connection,
the connection data (c=") line is.
See https://datatracker.ietf.org/doc/html/rfc4566 section 5.3 and 5.7
This let's us get rid of a lot of duplication in the derived classes.
Additionally we set the initial state to CALLS_CALL_STATE_INCOMING if
inbound is TRUE and CALLS_CALL_STATE_DIALING otherwise.
We mock libfeedback and CallsCall to test the ringer for the following
scenarios:
- Call state changes
- User requested silencing of ringer
- Multiple calls