diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m
index 022a3c665..d776a0d59 100644
--- a/Classes/LinphoneCoreSettingsStore.m
+++ b/Classes/LinphoneCoreSettingsStore.m
@@ -111,6 +111,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
[self setBool: (linphone_proxy_config_get_route(cfg)!=NULL) forKey:@"outbound_proxy_preference"];
[self setBool:linphone_proxy_config_get_dial_escape_plus(cfg) forKey:@"substitute_+_by_00_preference"];
+ [self setBool:linphone_proxy_config_is_avpf_enabled(cfg) forKey:@"avpf_preference"];
}
} else {
@@ -121,6 +122,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
[self setObject:@"" forKey:@"password_preference"];
[self setBool:FALSE forKey:@"outbound_proxy_preference"];
[self setString:"udp" forKey:@"transport_preference"];
+ [self setBool:FALSE forKey:@"avpf_preference"];
}
@@ -326,6 +328,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
linphone_core_enable_ipv6(lc, enable_ipv6);
}
+
//configure sip account
//mandatory parameters
@@ -334,7 +337,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
NSString* transport = [self stringForKey:@"transport_preference"];
NSString* accountHa1 = [self stringForKey:@"ha1_preference"];
NSString* accountPassword = [self stringForKey:@"password_preference"];
- bool isOutboundProxy = [self boolForKey:@"outbound_proxy_preference"];
+ bool isOutboundProxy = [self boolForKey:@"outbound_proxy_preference"];
+ BOOL use_avpf = [self boolForKey:@"avpf_preference"];
//clear auth info list
linphone_core_clear_all_auth_info(lc);
@@ -377,6 +381,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
linphone_proxy_config_set_identity(proxyCfg, identity);
linphone_proxy_config_set_server_addr(proxyCfg, proxy);
linphone_proxy_config_enable_register(proxyCfg, true);
+
+ linphone_proxy_config_enable_avpf(proxyCfg, use_avpf);
// add username password
LinphoneAddress *from = linphone_address_new(identity);
@@ -485,6 +491,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|| [self valueChangedForKey:@"prefix_preference"]
|| [self valueChangedForKey:@"substitute_+_by_00_preference"]
|| [self valueChangedForKey:@"use_ipv6"]
+ || [self valueChangedForKey:@"avpf_preference"]
|| [self valueChangedForKey:@"pushnotification_preference"];
if (account_changed)
diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m
index 54eeb9600..998016232 100644
--- a/Classes/LinphoneManager.m
+++ b/Classes/LinphoneManager.m
@@ -1093,6 +1093,24 @@ static LinphoneCoreVTable linphonec_vtable = {
linphone_core_set_chat_database_path(theLinphoneCore, [chatDBFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
+ /* AVPF migration */
+ if( [self lpConfigBoolForKey:@"avpf_migration_done" forSection:@"app"] == FALSE ){
+ const MSList* proxies = linphone_core_get_proxy_config_list(theLinphoneCore);
+ while(proxies){
+ LinphoneProxyConfig* proxy = (LinphoneProxyConfig*)proxies->data;
+ const char* addr = linphone_proxy_config_get_addr(proxy);
+ // we want to enable AVPF for the proxies
+ if( addr && strstr(addr, "sip.linphone.org") != 0 ){
+ linphone_proxy_config_enable_avpf(proxy, TRUE);
+ }
+ proxies = proxies->next;
+ }
+ [self lpConfigSetBool:TRUE forKey:@"avpf_migration_done"];
+ } else {
+ ;
+ }
+
+
[self setupNetworkReachabilityCallback];
NSString* path = [LinphoneManager bundleFile:@"nowebcamCIF.jpg"];
diff --git a/Settings/InAppSettings.bundle/Root.plist b/Settings/InAppSettings.bundle/Root.plist
index d81fdf4bc..edbd83561 100644
--- a/Settings/InAppSettings.bundle/Root.plist
+++ b/Settings/InAppSettings.bundle/Root.plist
@@ -113,12 +113,22 @@
+ Title
+ Outbound proxy
DefaultValue
Key
outbound_proxy_preference
+ Type
+ PSToggleSwitchSpecifier
+
+
Title
- Outbound proxy
+ AVPF
+ DefaultValue
+
+ Key
+ avpf_preference
Type
PSToggleSwitchSpecifier
@@ -158,34 +168,34 @@
Type
PSChildPaneSpecifier
-
- Key
- call_menu
- File
- Call
- Title
- Call
- Type
- PSChildPaneSpecifier
-
-
- Key
- network_menu
- File
- Network
- Title
- Network
- Type
- PSChildPaneSpecifier
-
- Key
- tunnel_menu
- File
- Tunnel
- Title
- Tunnel
- Type
+ Key
+ call_menu
+ File
+ Call
+ Title
+ Call
+ Type
+ PSChildPaneSpecifier
+
+
+ Key
+ network_menu
+ File
+ Network
+ Title
+ Network
+ Type
+ PSChildPaneSpecifier
+
+
+ Key
+ tunnel_menu
+ File
+ Tunnel
+ Title
+ Tunnel
+ Type
PSChildPaneSpecifier