From 4f95673254677278c3d7d8b1c8b79be58d4d7ea5 Mon Sep 17 00:00:00 2001 From: REIS Benjamin Date: Fri, 14 Oct 2016 09:15:44 +0200 Subject: [PATCH] add params pn-silent=1 --- Classes/LinphoneManager.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index ad1d62f4a..1bd7f1109 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2431,11 +2431,18 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { } else { timeout = @""; } - + + NSString *silent; + if (floor(NSFoundationVersionNumber) >= NSFoundationVersionNumber_iOS_8_0) { + silent = @";pn-silent=1"; + } else { + silent = @""; + } + NSString *params = [NSString stringWithFormat:@"app-id=%@%@.%@;pn-type=apple;pn-tok=%@;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-" - @"call-snd=%@;pn-msg-snd=msg.caf%@", - [[NSBundle mainBundle] bundleIdentifier], notif_type, APPMODE_SUFFIX, tokenString, ring, timeout]; + @"call-snd=%@;pn-msg-snd=msg.caf%@%@", + [[NSBundle mainBundle] bundleIdentifier], notif_type, APPMODE_SUFFIX, tokenString, ring, timeout, silent]; LOGI(@"Proxy config %s configured for push notifications with contact: %@", linphone_proxy_config_get_identity(proxyCfg), params);