This is an exact copy from GTK4.
as grabbed by chattys commit 1ed5084fb965908e3ee0304781b0de06479c869b
Slightly adapted for Calls.
Based on GTKs 01bd4cc4e18a1ea697fe61791ba710d0d55e8290
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 */
| ^~~~~
Tag messages have been a bit inconsistent in the past, because we
created signed tags by hand.
With this change we can just `gbp tag` and get consistently named tags
and messages.
It's common to have spaces or other separator characters in telephone
numbers. If tel: link (example: tel:+1 855-698-1150) is clicked in browser all
unsupported characters are escaped (example: tel:+1%20(855)%20698-11-50).
15 ms does not seem to be enough time for phosh-antispam to be able
to hang up before the incoming call screen shows up. In my experiement,
90 looks to be the minimum time needed for the incoming call to not show up.
I put it to 100 ms just to be safe.
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