call: Introduce protocol property

This commit is contained in:
Evangelos Ribeiro Tzaras
2021-04-26 12:00:02 +02:00
parent 503e5c2154
commit 53f69b06dd
7 changed files with 71 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
#include "calls-sip-media-manager.h"
#include "calls-sip-media-pipeline.h"
#include "calls-sip-util.h"
#include "util.h"
#include <glib/gi18n.h>
@@ -143,6 +144,15 @@ calls_sip_call_get_inbound (CallsCall *call)
}
static const char *
calls_sip_call_get_protocol (CallsCall *call)
{
CallsSipCall *self = CALLS_SIP_CALL (call);
return get_protocol_from_address (self->number);
}
static void
calls_sip_call_answer (CallsCall *call)
{
@@ -290,6 +300,7 @@ calls_sip_call_class_init (CallsSipCallClass *klass)
call_class->get_number = calls_sip_call_get_number;
call_class->get_state = calls_sip_call_get_state;
call_class->get_inbound = calls_sip_call_get_inbound;
call_class->get_protocol = calls_sip_call_get_protocol;
call_class->answer = calls_sip_call_answer;
call_class->hang_up = calls_sip_call_hang_up;

View File

@@ -224,6 +224,8 @@ add_call (CallsSipOrigin *self,
g_debug ("Setting local SDP for outgoing call to %s:\n%s", address, local_sdp);
/* TODO transform tel URI according to https://tools.ietf.org/html/rfc3261#section-19.1.6 */
/* TODO handle IPv4 vs IPv6 for nua_invite (SOATAG_TAG) */
nua_invite (self->oper->call_handle,
SOATAG_AF (SOA_AF_IP4_IP6),