diff --git a/Classes/WizardViewController.h b/Classes/WizardViewController.h
index 96d344846..e1a83726b 100644
--- a/Classes/WizardViewController.h
+++ b/Classes/WizardViewController.h
@@ -31,6 +31,7 @@
@private
UITextField *activeTextField;
UIView *currentView;
+ UIView *nextView;
NSMutableArray *historyViews;
}
diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m
index 30df13f3e..5362bb0a4 100644
--- a/Classes/WizardViewController.m
+++ b/Classes/WizardViewController.m
@@ -572,11 +572,10 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (void)loadWizardConfig:(NSString*)rcFilename {
- NSString* fullPath = [LinphoneManager bundleFile:rcFilename];
- LpConfig* current_conf = linphone_core_get_config([LinphoneManager getLc]);
- if( lp_config_read_file(current_conf, [fullPath cStringUsingEncoding:[NSString defaultCStringEncoding]]) != 0 ){
- [LinphoneLogger log:LinphoneLoggerError format:@"Couldn't push wizard file %@ to the Linphone config"];
- }
+ NSString* fullPath = [@"file://" stringByAppendingString:[LinphoneManager bundleFile:rcFilename]];
+ linphone_core_set_provisioning_uri([LinphoneManager getLc], [fullPath cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+ [[LinphoneManager instance] lpConfigSetInt:1 forKey:@"transient_provisioning" forSection:@"misc"];
+ [[LinphoneManager instance] resetLinphoneCore];
}
#pragma mark - UITextFieldDelegate Functions
@@ -652,19 +651,18 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (IBAction)onCreateAccountClick:(id)sender {
+ nextView = createAccountView;
[self loadWizardConfig:@"wizard_linphone_create.rc"];
- [self changeView:createAccountView back:FALSE animation:TRUE];
-
}
- (IBAction)onConnectAccountClick:(id)sender {
+ nextView = connectAccountView;
[self loadWizardConfig:@"wizard_linphone_existing.rc"];
- [self changeView:connectAccountView back:FALSE animation:TRUE];
}
- (IBAction)onExternalAccountClick:(id)sender {
+ nextView = externalAccountView;
[self loadWizardConfig:@"wizard_external_sip.rc"];
- [self changeView:externalAccountView back:FALSE animation:TRUE];
}
- (IBAction)onCheckValidationClick:(id)sender {
@@ -846,7 +844,12 @@ static UICompositeViewDescription *compositeDescription = nil;
switch (status) {
case LinphoneConfiguringSuccessful:
+ if( nextView == nil ){
[self fillDefaultValues];
+ } else {
+ [self changeView:nextView back:false animation:TRUE];
+ nextView = nil;
+ }
break;
case LinphoneConfiguringFailed:
{
diff --git a/Resources/wizard_external_sip.rc b/Resources/wizard_external_sip.rc
index c9d85310f..f427f2758 100644
--- a/Resources/wizard_external_sip.rc
+++ b/Resources/wizard_external_sip.rc
@@ -1,29 +1,37 @@
+
+
-[proxy_default_values]
+
+
+
+
+ 3600
+ 1
+ 0
+ 0
+
-reg_proxy=
-reg_route=
-reg_identity=
-reg_expires=3600
-reg_sendregister=1
-publish=0
-dial_escape_plus=0
+
-[wizard]
-service_url=
+
+ 0
+
+ 1
+ stun.linphone.org
+ 1
+
-[app]
-pushnotification_preference=0
-sharing_server_preference=
-ice_preference=1
-stun_preference=stun.linphone.org
-random_port_preference=1
+
-[net]
-firewall_policy=none
-stun_server=
+
-[sip]
-sip_port=-1
-sip_tcp_port=-1
-sip_tls_port=-1
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Resources/wizard_linphone_create.rc b/Resources/wizard_linphone_create.rc
index 52b713b70..563b0a1fa 100644
--- a/Resources/wizard_linphone_create.rc
+++ b/Resources/wizard_linphone_create.rc
@@ -1,29 +1,37 @@
+
+
-[proxy_default_values]
+
+ <sip:sip.linphone.org:5223;transport=tls>
+ <sip:sip.linphone.org:5223;transport=tls>
+ sip:?@sip.linphone.org
+ 604800
+ 1
+ 0
+ 0
+
-reg_proxy=
-reg_route=
-reg_identity=sip:?@sip.linphone.org
-reg_expires=604800
-reg_sendregister=1
-publish=0
-dial_escape_plus=0
+
+ https://www.linphone.org/wizard.php
+
-[wizard]
-service_url=https://www.linphone.org/wizard.php
+
+ 1
+ https://www.linphone.org:444/upload.php
+ 1
+ stun.linphone.org
+ 1
+
-[app]
-pushnotification_preference=1
-sharing_server_preference=https://www.linphone.org:444/upload.php
-ice_preference=1
-stun_preference=stun.linphone.org
-random_port_preference=1
+
+ ice
+ stun.linphone.org
+
-[net]
-firewall_policy=ice
-stun_server=stun.linphone.org
+
-[sip]
-sip_port=-1
-sip_tcp_port=-1
-sip_tls_port=-1
\ No newline at end of file
+
diff --git a/Resources/wizard_linphone_existing.rc b/Resources/wizard_linphone_existing.rc
index 21aa1a738..bef5384bc 100644
--- a/Resources/wizard_linphone_existing.rc
+++ b/Resources/wizard_linphone_existing.rc
@@ -1,29 +1,36 @@
+
+
-[proxy_default_values]
+
+ <sip:sip.linphone.org:5223;transport=tls>
+ <sip:sip.linphone.org:5223;transport=tls>
+ sip:?@sip.linphone.org
+ 604800
+ 1
+ 0
+ 0
+
-reg_proxy=
-reg_route=
-reg_identity=sip:?@sip.linphone.org
-reg_expires=604800
-reg_sendregister=1
-publish=0
-dial_escape_plus=0
+
-[wizard]
-service_url=
+
+ 1
+ https://www.linphone.org:444/upload.php
+ 1
+ stun.linphone.org
+ 1
+
-[app]
-pushnotification_preference=1
-sharing_server_preference=https://www.linphone.org:444/upload.php
-ice_preference=1
-stun_preference=stun.linphone.org
-random_port_preference=1
+
+ ice
+ stun.linphone.org
+
-[net]
-firewall_policy=ice
-stun_server=stun.linphone.org
-
-[sip]
-sip_port=-1
-sip_tcp_port=-1
-sip_tls_port=-1
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/Resources/wizard_remote.rc b/Resources/wizard_remote.rc
index 3bcb5442e..3df265ada 100644
--- a/Resources/wizard_remote.rc
+++ b/Resources/wizard_remote.rc
@@ -1,19 +1,24 @@
+
+
-[proxy_default_values]
+
+
+
+
+ 3600
+ 1
+ 0
+ 0
+
+
-reg_proxy=
-reg_route=
-reg_identity=
-reg_expires=3600
-reg_sendregister=1
-publish=0
-dial_escape_plus=0
+
-[wizard]
-service_url=
-
-[app]
-pushnotification_preference=0
-sharing_server_preference=
-ice_preference=
-stun_preference=
+
\ No newline at end of file