mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-05-18 02:59:27 +00:00
Merge branch 'contact_port_nr' into 'main'
Add port in Contact: on INVITE Closes #523 See merge request GNOME/calls!660
This commit is contained in:
commit
f521168219
|
@ -291,6 +291,7 @@ add_call (CallsSipOrigin *self,
|
|||
g_autoptr (GList) crypto_attributes = NULL;
|
||||
g_autoptr (CallsSdpCryptoContext) ctx =
|
||||
calls_sip_call_get_sdp_crypto_context (sip_call);
|
||||
g_autofree char *contact_url = NULL;
|
||||
|
||||
if (self->media_encryption == SIP_MEDIA_ENCRYPTION_FORCED) {
|
||||
if (!calls_sdp_crypto_context_generate_offer (ctx)) {
|
||||
|
@ -318,11 +319,15 @@ add_call (CallsSipOrigin *self,
|
|||
g_debug ("Setting local SDP for outgoing call to %s:\n%s", address, local_sdp);
|
||||
|
||||
/* TODO handle IPv4 vs IPv6 for nua_invite (SOATAG_TAG) */
|
||||
if (self->local_port && self->local_port != 5060)
|
||||
contact_url = g_strdup_printf("sip:%s@%s:%i", self->user, self->host, self->local_port);
|
||||
else
|
||||
contact_url = g_strdup_printf("sip:%s@%s", self->user, self->host);
|
||||
nua_invite (self->oper->call_handle,
|
||||
SOATAG_AF (SOA_AF_IP4_IP6),
|
||||
SOATAG_USER_SDP_STR (local_sdp),
|
||||
SIPTAG_TO_STR (address),
|
||||
TAG_IF (!!self->contact_header, SIPTAG_CONTACT_STR (self->contact_header)),
|
||||
TAG_IF (!!self->contact_header, SIPTAG_CONTACT_STR (contact_url)),
|
||||
SOATAG_RTP_SORT (SOA_RTP_SORT_REMOTE),
|
||||
SOATAG_RTP_SELECT (SOA_RTP_SELECT_ALL),
|
||||
TAG_END ());
|
||||
|
@ -418,6 +423,7 @@ sip_authenticate (CallsSipOrigin *self,
|
|||
sip_www_authenticate_t *www_auth = sip->sip_www_authenticate;
|
||||
sip_proxy_authenticate_t *proxy_auth = sip->sip_proxy_authenticate;
|
||||
|
||||
self->local_port = atoi(sip->sip_via->v_port);
|
||||
if (www_auth) {
|
||||
scheme = www_auth->au_scheme;
|
||||
realm = msg_params_find (www_auth->au_params, "realm=");
|
||||
|
|
Loading…
Reference in a new issue