From 47b86c03e35a6d0bb026d65c6eff9e73adfd5f66 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Fri, 22 Feb 2019 16:00:20 +0100 Subject: [PATCH] set correctly user-agent --- Classes/LinphoneManager.m | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index e9c99228a..147819568 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1822,13 +1822,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach NSString *device = [[NSMutableString alloc] initWithString:[NSString - stringWithFormat:@"%@_%@_iOS%@", - [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"], - [LinphoneUtils deviceModelIdentifier], - UIDevice.currentDevice.systemVersion]]; - device = [device stringByReplacingOccurrencesOfString:@"," withString:@"."]; - device = [device stringByReplacingOccurrencesOfString:@" " withString:@"."]; - linphone_core_set_user_agent(theLinphoneCore, device.UTF8String, LINPHONE_IOS_VERSION); + stringWithFormat:@"%@iOS/%@ (%@) LinphoneSDK", + [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"], + [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], + [LinphoneUtils deviceModelIdentifier]]]; + + linphone_core_set_user_agent(theLinphoneCore, device.UTF8String, "4.1-221-g241bbf9 (master)"); // TODO : update Linphone_sdk_version automatically _contactSipField = [self lpConfigStringForKey:@"contact_im_type_value" inSection:@"sip" withDefault:@"SIP"];