From c025fe5bfe3295b21d8d2d874301279f686cb8e8 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Tue, 20 May 2014 18:36:40 +0200 Subject: [PATCH] sdpmsg: don't send farsight-send-profile codec property Another instance of a Lync client being picky about SDP parameters. Some versions of Lync AVMCU (conferencing server) reject messages that contain the send profile property added by Farstream, likely because they treat spaces or exclamation marks as illegal characters. --- src/core/sdpmsg.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/core/sdpmsg.c b/src/core/sdpmsg.c index 46f10fb1..972eab08 100644 --- a/src/core/sdpmsg.c +++ b/src/core/sdpmsg.c @@ -378,15 +378,30 @@ codecs_to_string(GSList *codecs) c->clock_rate); if (params) { - g_string_append_printf(result, "a=fmtp:%d", c->id); + GString *param_str = g_string_new(NULL); + int written_params = 0; + + g_string_append_printf(param_str, "a=fmtp:%d", c->id); for (; params; params = params->next) { struct sipnameval* par = params->data; - g_string_append_printf(result, " %s=%s", + if (sipe_strequal(par->name, "farsight-send-profile")) { + // Lync AVMCU doesn't like this property. + continue; + } + + g_string_append_printf(param_str, " %s=%s", par->name, par->value); + ++written_params; } - g_string_append(result, "\r\n"); + g_string_append(param_str, "\r\n"); + + if (written_params > 0) { + g_string_append(result, param_str->str); + } + + g_string_free(param_str, TRUE); } } -- 2.11.4.GIT