Commit Graph
100 Commits
Author SHA1 Message Date
Evangelos Ribeiro Tzaras 69b615a2c2 sip: origin: Codestyle 2022-01-11 12:00:10 +00:00
Evangelos Ribeiro Tzaras eeb97c82c0 sip: origin: Purge own IP when uninitialising account
This will make sure that we're not using a stale IP address if we're resetting
the account after an IP change.
2022-01-10 08:27:08 +01:00
Evangelos Ribeiro Tzaras 38f9e0b608 sip: media-manager: Get rid of global session IP
Since we're now passing the IP to be used to retrieve the capabilities
for the SDP message body, this has become dead code.
2022-01-08 21:25:09 +00:00
Evangelos Ribeiro Tzaras 8b126484cb sip: Use per origin IP instead of a global IP
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
2022-01-08 21:25:09 +00:00
Evangelos Ribeiro Tzaras ae4053e1c9 sip: call: Remove unnecessary code
The call state depending on whether a call is inbound or not is handled in the
constructed() method of the CallsCall base class.
2022-01-08 21:25:09 +00:00
Evangelos Ribeiro Tzaras ba00665c36 sip: origin: Decouple TLS usage from target address
Since we cannot do encrypted media streams yet, we should hardcode whether or
not we want to use SRTP to FALSE, so that sips target URLs can be used in SIP
calls at all.
2022-01-07 16:34:25 +01:00
Evangelos Ribeiro Tzaras 8f85c42ba3 meson: Don't use deprecated meson.source_root()
This function is deprecated since 0.56.0:

WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since
'0.56.0': meson.source_root. use meson.project_source_root() or
meson.global_source_root() instead.
2021-12-29 11:10:21 +01:00
Evangelos Ribeiro Tzaras de834bcfe9 meson: Don't use deprecated meson.build_root()
This function is deprecated since 0.56.0:

WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since
'0.56.0': meson.build_root. use meson.project_build_root() or
meson.global_build_root() instead.
2021-12-29 11:10:21 +01:00
Evangelos Ribeiro Tzaras 112098405b meson: Don't use deprecated Dependency.get_pkgconfig_variable()
This function is deprecated since 0.56.0:

WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since
'0.56.0': Dependency.get_pkgconfig_variable.
use Dependency.get_variable(pkgconfig : ...) instead
2021-12-29 11:10:03 +01:00
Evangelos Ribeiro Tzaras 0cadf24ed0 sip: origin: Fix host being passed as number
Closes #389

Fixes e2acfd3794
2021-12-28 16:40:46 +01:00
Evangelos Ribeiro Tzaras e2acfd3794 sip: origin: Pass telephone number to the call object
If the origin is used for PSTN telephony extract the number from the
SIP dialstring (i.e. sip:+49160123456789@my-sip-host.de) and pass that
to call object for contact matching.
2021-12-26 17:57:14 +01:00
Evangelos Ribeiro Tzaras 992a243de6 sip-account-widget: Add switch to specify account can handle tel URI
Fixes #277
2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras fbbe17139d sip: origin: Add property tracking usage for tel URIs
Fixes #277
2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras 66224c9a48 origin: Get rid of "numeric-addresses" property 2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras 6d031e2ab6 new-call-box: Decide if numeric input is needed based on the origins protocol
The numeric addresses property conveys no additional information.
By changing the logic here we can get rid of the "numeric-addresses" property
alltogether.
2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras cd6917dcf6 sip: origin: Include address in warning when we cannot dial
This allows figuring out which call failed.
2021-12-21 14:52:14 +00:00
Evangelos Ribeiro Tzaras 8575adf998 media-manager: Take preferred audio codecs into account for SDP
Fixes #349
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras 0b8fb4a448 media-codecs: Clarify that codec availability should be checked before use 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras 27463212d9 media-codecs: Add codec availability check to public API
This will be useful for building a list of preferred audio codecs.
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras 7fe8a90d77 settings: Add GSetting for preferred audio codecs 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras da4434564d test: sip: Add debug messages 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras dc809e54e5 settings: Add docstring for autoload-plugins setter and getter 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras a63023e315 settings: Chain up to parents constructed() early
Not strictly necessary since we're not depending on anything the parents
constructed() might be doing, but it's a good practice.
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras b49041a3f2 sip: codecs: Fix transfer annotation of media_codecs_get_candidates() 2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras 4e09ada0df best-match: Fix header include
We only need gio.h here because of GLoadable.
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras 2026573e64 project: Do not allow deprecated gtk/gdk symbols
This will make sure that we're not introducing deprecated symbols which
could make it harder to migrate to Gtk4.
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras f068e20f68 ci: Use prebuilt debian images
This should speed up CI jobs.

Close #380
2021-12-21 14:16:49 +01:00
Evangelos Ribeiro Tzaras a21fded449 gitlab-ci: Use prebuilt containers
This image has all build dependencies to speed up build and tests.
Copied from
phosh (https://gitlab.gnome.org/World/Phosh/phosh/-/commit/d8b2e5651b837adb6698c9868a9d278ef7929400)
with minor modifications for Calls.

Use

 .gitlab-ci/run-docker.sh --base debian build --version 0.0.<date>
 .gitlab-ci/run-docker.sh --base debian push --version 0.0.<date>

to update.
2021-12-21 14:16:47 +01:00
Evangelos Ribeiro Tzaras c12b7a8c69 call: Use protocol fallback
We're falling back to "tel" as the default case.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras dbfa593a07 call: Move name property to base class
This let's us avoid some duplication in the derived classes.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras a1fefcdbac call: Move id property into base class
This allows us to avoid some duplication in the derived classes.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras a048b4c83d call: Move state property into base class
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.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras ddf1dd7349 call: Move inbound property into base class
This avoids some repetition in the derived classes.
2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras 88cd7ce222 call: Add unknown state
This is the default fallback state and is useful f.e. in the oFono plugin
if the GDBOVoiceCall doesn't provide a state in its' properties.
2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras cead5ada88 call-window: Use g_assert in private functions 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras a0942034de test: call: Codestyle 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras 797c9a0c46 mm: call: Codestyle 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras b3aff65822 dummy: call: Codestyle 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras aadf546472 ofono: call: Codestyle 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras 09699254c8 call: Codestyle 2021-12-20 12:25:18 +01:00
Evangelos Ribeiro Tzaras 08456c8043 in-app-notification: Use g_clear_* instead of emulating it 2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras 3e37870824 in-app-notification: Use unsigned integers for timeout property
It's used in g_timeout_add_seconds and that expects a guint.
Set the minimum timeout to 1 second.
2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras d7b4aff0d8 in-app-notification: Use DEFAULT_TIMEOUT_SECONDS as the default timeout
By setting the G_PARAM_CONSTRUCT flag for the timeout property we make sure
that the default value is set if it has not been given explicitly in
g_object_new().
2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras fd6fcbc3c0 in-app-notification: Codestyle 2021-12-16 06:39:38 +01:00
Evangelos Ribeiro Tzaras 73cf5081d0 sip: origin: Prevent dialing when not online
Setting up the nua context could have failed (see #379) and in that case
our nua_*() calls might derefence a NULL pointer.
2021-12-15 20:01:40 +01:00
Evangelos Ribeiro Tzaras e4f2ff105a Document and release 42.alpha.0 2021-12-14 10:00:12 +01:00
Evangelos Ribeiro Tzaras 4df3ea005d record-row: Only create popover when needed
Creating a popover for each CallsCallRecordRow comes with a big performance
hit when scrolling the history, so we should avoid doing this.

Fixes #198
2021-12-10 18:12:30 +01:00
Evangelos Ribeiro Tzaras 42b5b9d600 record-row: Use API to query call icon name
This makes sure we don't need to allocate icon string names for each record.
2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras a87c3eeb2e tests: util: Unit test call icon name function 2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras abdb601afa util: Add API to query call icon names
This can later be used in the call history or in the call details
instead of always constructing the name repeatedly in private functions.
2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras bbccb7667e tests: util: Codestyle 2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras 625b26be32 record-row: Codestyle 2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras c37e9d8462 dbus: Add method to silence ringing
Fixes #329
2021-12-07 07:56:02 +00:00
Evangelos Ribeiro Tzaras 2d18667ee7 call-window: Use g_clear_handle_id instead of emulating it 2021-12-05 16:51:26 +01:00
Evangelos Ribeiro Tzaras 8f6ca20a2c call-window: Clear handle id when hiding call window
This fixes GLib criticals like
GLib[464166]:CRITICAL: Source ID 17 was not found when attempting to remove it
2021-12-05 16:50:19 +01:00
Evangelos Ribeiro Tzaras 85c23cfc3d test: ringer: Test quiet ringing 2021-12-05 10:04:05 +01:00
Evangelos Ribeiro Tzaras 0f72780814 ringer: Restart ringer if quiet parameter changed
This makes sure the following sequence of events works:

- Call A incoming
- Rings loudly
- Call B incoming
- Still rings loudly
- Call A accepted
- Rings quietly
- Call A hung up
- Rings loudly again

Being able to restart the ringing is needed for this case because we cannot
retroactively change the feedback levels of a event that has already been
triggered.

Without this patch Calls would continue ringing for the scenario above even
after call A was accepted.
2021-12-05 10:04:05 +01:00
Evangelos Ribeiro Tzaras b89f6a6f17 ringer: Add is-quiet property and getter
This let's us query if the ringer is ringing quietly.
2021-12-05 10:04:03 +01:00
Evangelos Ribeiro Tzaras 7dadb3c50f tests: Add ringer tests
We mock libfeedback and CallsCall to test the ringer for the following
scenarios:
- Call state changes
- User requested silencing of ringer
- Multiple calls
2021-12-05 09:50:25 +01:00
Evangelos Ribeiro Tzaras f86162da03 flatpak: Add cmocka dependency 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 9cdf46617f d/control: Add cmocka dependency 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 410cf8945a ringer: Check if incoming call is silenced
Avoid ringing in this case.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 1587e4c78c call: Add API to silence ringing 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras f02d22150e ringer: Add debugging 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 9fff41fd53 ringer: Make sure to reset feedback profile if not set to "quiet" 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras e604779497 ringer: Don't warn if feedback triggering got cancelled 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 3e26294f3c ringer: Track ringer state
This allows to cancel triggered feedbacks.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 1e5edea855 ringer: Disconnect signal handlers on dispose 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras fd7193a525 ringer: Refactor to keep track of ongoing calls
This makes it easier to silence a call.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 17a2c94387 ringer: codestyle 2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras f206b7d257 call: Rename property from "number" to "id"
The term number is not necessarily accurate when dealing with f.e. SIP.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 3e22ef8c74 record-store: Get rid of unused code 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras edfb4455f8 application: Chain up shutdown 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras 85689dbb45 history-box: Codestyle 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras aad6b85a2b application: Codestyle 2021-12-02 05:52:44 +01:00
Evangelos Ribeiro Tzaras 079fdcf441 d/changelog: Post-release version bump
For the next releases we should update d/changelog sooner as this
ensures packages grabbed from CI will not be considered a downgrade
in Debian based distributions as can be seen below:

$ sudo dpkg -i gnome-calls_41.0+librem5ci338434.69db235c_arm64.deb
dpkg: warning: downgrading gnome-calls from 41.1-1pureos1 to 41.0+librem5ci338434.69db235c

Fixes #368
2021-12-01 21:37:47 +01:00
Evangelos Ribeiro Tzaras fe7ebf51ce ci: Use PKG_ONLY variable to exclude flatpak job
This makes sure we're not wasting computational resources when we only
want to build debian packages.
2021-11-30 12:54:41 +01:00
Evangelos Ribeiro Tzaras 3b377edc81 ci: Drop debian bookworm packaging job
It is very easy to either run locally with the run script or build
a package locally with `dpkg-buildpackage`.
2021-11-30 12:54:41 +01:00
Evangelos Ribeiro Tzaras 89fd506f7d ci: Drop pedantic metainfo validation job
And instead run them as a part of the regular tests.
2021-11-30 12:05:27 +01:00
Evangelos Ribeiro Tzaras afe732d9bc flatpak: Poke hole to talk to feedbackd
Without this ringtones and haptic feedback cannot work.

Fixes #363
2021-11-26 08:42:36 +00:00
Evangelos Ribeiro Tzaras 529b35656b flatpak: Poke hole to talk to callaudiod
Without this libcallaudio functionality (audio profile switching,
speakers and microphone muting cannot work.
2021-11-26 08:42:36 +00:00
Evangelos Ribeiro Tzaras 04f43b2ce2 call-window: Delay closing window
Fixes #301
2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras b083e588fa call-window: codestyle 2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras 989a52fac5 record-row: Removed unused define 2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras 56ec92d57f Update libcall-ui: Fix display showing number twice when not a contact
This update also brings german translations.
2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras 5b6b7a7563 project: Post release version bump
Fixes #364
2021-11-25 18:35:15 +01:00
Evangelos Ribeiro Tzaras 7402cae903 ci: Fix regex for reporting code coverage
We are now using gcovr instead of lcov after
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818
has been closed.

The difference in output format tripped up reported code coverage in CI.
2021-11-24 14:07:37 +01:00
Evangelos Ribeiro Tzaras a28d694623 dbus: Add API to send DTMF
Addresses the calls side of #343
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras 0761c4a53a dbus: Set can-dtmf property
This lets consumers on DBus know if this call is capable of sending DTMF.
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras 075dca5c35 tests: Add dtmf tone validity tests 2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras afd1034dd1 util: Make dtmf tone checking function public
Moves the function out of calls-call.c into util.c
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras 4c2717c362 dummy: Add dummy send_dtmf_tone function
This will allow DTMF to be tested UI wise when running the dummy plugin.
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras acec33bb6c call: Get rid of unnecessary cast to int 2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras a353a03d01 call: Get rid of tone_stop
It wasn't used by any plugin backend and helps getting rid of a lot of code.
2021-11-23 08:50:01 +00:00
Evangelos Ribeiro Tzaras 748f9c937c README: Add backend specific debugging information 2021-11-22 20:34:25 +00:00
Evangelos Ribeiro Tzaras 5a2727c0f4 README: Overhaul readme 2021-11-22 20:34:25 +00:00
Evangelos Ribeiro Tzaras d34a642f6e README: Mark oFono backend as not actively developed
The ofono section was a bit too prominent in the README considering that it's
not actively developed.

The section was moved to its own file.
2021-11-22 20:34:25 +00:00
Evangelos Ribeiro Tzaras cc7d83b26f README: Drop code coverage report
This is now included as a badge in Gitlab.
2021-11-22 20:34:25 +00:00
Evangelos Ribeiro Tzaras 2bbb923226 call-data: Notify on avatar changes
Otherwise the call display will not update.
2021-11-19 15:56:45 +01:00
Evangelos Ribeiro Tzaras 5919182c17 Update libcall-ui
This has the display name property of CuiCall wired up to CuiDisplay
so that property changes are reflected in the UI.
2021-11-19 15:56:45 +01:00