forked from mirrors/linphone-iphone
Settings: add auto_answer for debugging purposes
This commit is contained in:
parent
f340644f63
commit
d5ed8a9d9e
3 changed files with 20 additions and 0 deletions
|
|
@ -91,6 +91,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if (call == acall && (astate == LinphoneCallEnd || astate == LinphoneCallError)) {
|
||||
[delegate incomingCallAborted:call];
|
||||
[self dismiss];
|
||||
} else if ([LinphoneManager.instance lpConfigBoolForKey:@"auto_answer"]) {
|
||||
LinphoneCallState state = linphone_call_get_state(call);
|
||||
if (state == LinphoneCallIncomingReceived || state == LinphoneCallIncomingEarlyMedia) {
|
||||
[self onAcceptClick:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,6 +161,8 @@ 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_avpf_enabled(cfg) forKey:@"avpf_preference"];
|
||||
[self setBool:linphone_core_video_enabled(lc) forKey:@"enable_video_preference"];
|
||||
[self setBool:[LinphoneManager.instance lpConfigBoolForKey:@"auto_answer"]
|
||||
forKey:@"enable_auto_answer_preference"];
|
||||
|
||||
// actually in Advanced section but proxy config dependent
|
||||
[self setInteger:linphone_proxy_config_get_expires(cfg) forKey:@"expire_preference"];
|
||||
|
|
@ -577,6 +579,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
bool enableVideo = [self boolForKey:@"enable_video_preference"];
|
||||
linphone_core_enable_video(lc, enableVideo, enableVideo);
|
||||
|
||||
bool enableAutoAnswer = [self boolForKey:@"enable_auto_answer_preference"];
|
||||
[LinphoneManager.instance lpConfigSetBool:enableAutoAnswer forKey:@"auto_answer"];
|
||||
}
|
||||
|
||||
// audio section
|
||||
|
|
|
|||
|
|
@ -288,6 +288,16 @@
|
|||
<key>Type</key>
|
||||
<string>IASKButtonSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Auto answer call immediately</string>
|
||||
<key>Key</key>
|
||||
<string>enable_auto_answer_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue