From 515f2ee61e9616e3244eb76b96587f699e1d4a44 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Thu, 22 Mar 2012 21:11:14 +0100 Subject: [PATCH] media: detect incompatible encryption levels error with Lync 2010 Reported in #3510001 Also make the error message consistent in all situations. --- src/core/sipe-media.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/core/sipe-media.c b/src/core/sipe-media.c index fbebad8a..d1a847ae 100644 --- a/src/core/sipe-media.c +++ b/src/core/sipe-media.c @@ -1050,7 +1050,25 @@ process_invite_call_response(struct sipe_core_private *sipe_private, title = _("Call rejected"); g_string_append_printf(desc, _("User %s rejected call"), with); break; - case 488: + case 488: { + /* Check for incompatible encryption levels error. + * + * MS Lync 2010: + * 488 Not Acceptable Here + * ms-client-diagnostics: 52017;reason="Encryption levels dont match" + * + * older clients (and SIPE itself): + * 488 Encryption Levels not compatible + */ + const gchar *ms_diag = sipmsg_find_header(msg, "ms-client-diagnostics"); + + if (sipe_strequal(msg->responsestr, "Encryption Levels not compatible") || + (ms_diag && g_str_has_prefix(ms_diag, "52017;"))) { + title = _("Unable to establish a call"); + g_string_append(desc, _("Encryption settings of peer are incompatible with ours.")); + break; + } + if (call_private->ice_version == SIPE_ICE_RFC_5245 && sip_transaction_cseq(trans) == 1) { gchar *with = g_strdup(call_private->with); @@ -1065,6 +1083,7 @@ process_invite_call_response(struct sipe_core_private *sipe_private, return TRUE; } // Break intentionally omitted + } default: title = _("Error occured"); g_string_append(desc, _("Unable to establish a call")); -- 2.11.4.GIT