sip: origin: do not use hardcoded ports for RTP

This commit is contained in:
Evangelos Ribeiro Tzaras
2021-02-26 17:29:21 +01:00
parent 6681077886
commit a53f07dfd3
4 changed files with 22 additions and 4 deletions

View File

@@ -29,6 +29,7 @@
#include "calls-message-source.h"
#include "calls-sip-media-manager.h"
#include "calls-sip-media-pipeline.h"
#include "calls-sip-util.h"
#include "calls-call.h"
#include <glib/gi18n.h>
@@ -73,6 +74,7 @@ answer (CallsCall *call)
{
CallsSipCall *self;
g_autofree gchar *local_sdp = NULL;
guint local_port = get_port_for_rtp ();
g_assert (CALLS_IS_CALL (call));
g_assert (CALLS_IS_SIP_CALL (call));
@@ -87,10 +89,10 @@ answer (CallsCall *call)
}
/* XXX dynamically get free ports */
calls_sip_call_setup_local_media (self, 19042, 19043);
calls_sip_call_setup_local_media (self, local_port, local_port + 1);
local_sdp = calls_sip_media_manager_static_capabilities (self->manager,
19042,
local_port,
FALSE);
g_assert (local_sdp);