forked from mirrors/linphone-iphone
Add ICE configuration parameter.
This commit is contained in:
parent
4c0d7a533b
commit
b3f5d7f260
2 changed files with 19 additions and 1 deletions
|
|
@ -155,6 +155,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
}
|
||||
{
|
||||
[self setString: linphone_core_get_stun_server(lc) forKey:@"stun_preference"];
|
||||
[self
|
||||
setInteger:lp_config_get_int(linphone_core_get_config(lc),"app","ice_preference"
|
||||
, 0) forKey:@"ice_preference"];
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -429,7 +432,12 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
NSString* stun_server = [self stringForKey:@"stun_preference"];
|
||||
if ([stun_server length] > 0){
|
||||
linphone_core_set_stun_server(lc,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
|
||||
BOOL ice_preference = [self boolForKey:@"ice_preference"];
|
||||
if(ice_preference) {
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyUseIce);
|
||||
} else {
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
|
||||
}
|
||||
} else {
|
||||
linphone_core_set_stun_server(lc, NULL);
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyNoFirewall);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@
|
|||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>ICE</string>
|
||||
<key>Key</key>
|
||||
<string>ice_preference</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue