From 95935194838dc895d35ef2d828c2a3a50d3e34d0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 16 Mar 2015 08:50:05 -0400 Subject: [PATCH] Leave unsupported (non-RTP) protocols alone when translation is requested Fixes #80 --- daemon/call.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index ceb1258bf..d67ad1370 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2434,11 +2434,14 @@ int monologue_offer_answer(struct call_monologue *other_ml, GQueue *streams, * but also lets endpoints re-negotiate. */ media->protocol = NULL; } + /* default is to leave the protocol unchanged */ + if (!media->protocol) + media->protocol = other_media->protocol; /* allow override of outgoing protocol even if we know it already */ - if (flags && flags->transport_protocol) + /* but only if this is an RTP-based protocol */ + if (flags && flags->transport_protocol + && other_media->protocol && other_media->protocol->rtp) media->protocol = flags->transport_protocol; - else if (!media->protocol) - media->protocol = other_media->protocol; /* copy parameters advertised by the sender of this message */ bf_copy_same(&other_media->media_flags, &sp->sp_flags,