mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix a bunch of settings
This commit is contained in:
parent
8ce4c7d15c
commit
911b526564
6 changed files with 40 additions and 21 deletions
|
|
@ -103,6 +103,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
[self setString: linphone_address_get_username(addr) forKey:@"username_preference"];
|
||||
[self setString: linphone_address_get_domain(addr) forKey:@"domain_preference"];
|
||||
[self setInteger: linphone_proxy_config_get_expires(cfg) forKey:@"expire_preference"];
|
||||
[self setString:linphone_proxy_config_get_dial_prefix(cfg) forKey:@"prefix_preference"];
|
||||
if (strcmp(linphone_address_get_domain(addr),linphone_address_get_domain(proxy_addr))!=0
|
||||
|| port!=NULL){
|
||||
char tmp[256]={0};
|
||||
|
|
@ -115,6 +116,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
linphone_address_destroy(proxy_addr);
|
||||
|
||||
[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"];
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -332,11 +334,11 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
const char* proxy = [proxyAddress cStringUsingEncoding:[NSString defaultCStringEncoding]];
|
||||
|
||||
NSString* prefix = [self stringForKey:@"prefix_preference"];
|
||||
bool substitute_plus_by_00 = [self boolForKey:@"substitute_+_by_00_preference"];
|
||||
|
||||
|
||||
//possible valid config detected
|
||||
|
||||
proxyCfg = linphone_proxy_config_new();
|
||||
proxyCfg = linphone_core_create_proxy_config(lc);
|
||||
|
||||
// add username password
|
||||
LinphoneAddress *from = linphone_address_new(identity);
|
||||
|
|
@ -356,19 +358,30 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
if (isWifiOnly && lLinphoneMgr.connectivity == wwan) {
|
||||
linphone_proxy_config_expires(proxyCfg, 0);
|
||||
} else {
|
||||
int expire = [self integerForKey:@"expire_preference"];
|
||||
if(expire < lLinphoneMgr.defaultExpires)
|
||||
expire = lLinphoneMgr.defaultExpires;
|
||||
linphone_proxy_config_expires(proxyCfg, expire);
|
||||
if ([self objectForKey:@"expire_preference"]) {
|
||||
int expire = [self integerForKey:@"expire_preference"];
|
||||
/*if(expire < lLinphoneMgr.defaultExpires)
|
||||
expire = lLinphoneMgr.defaultExpires;*/
|
||||
linphone_proxy_config_expires(proxyCfg, expire);
|
||||
}
|
||||
//else not set
|
||||
|
||||
}
|
||||
|
||||
if (isOutboundProxy)
|
||||
linphone_proxy_config_set_route(proxyCfg,proxy);
|
||||
|
||||
if ([prefix length]>0) {
|
||||
linphone_proxy_config_set_dial_prefix(proxyCfg, [prefix cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
if ([self objectForKey:@"prefix_preference"]) {
|
||||
NSString* prefix = [self stringForKey:@"prefix_preference"];
|
||||
if ([prefix length]>0) {
|
||||
linphone_proxy_config_set_dial_prefix(proxyCfg, [prefix cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
}
|
||||
}
|
||||
linphone_proxy_config_set_dial_escape_plus(proxyCfg,substitute_plus_by_00);
|
||||
if ([self objectForKey:@"substitute_+_by_00_preference"]) {
|
||||
bool substitute_plus_by_00 = [self boolForKey:@"substitute_+_by_00_preference"];
|
||||
linphone_proxy_config_set_dial_escape_plus(proxyCfg,substitute_plus_by_00);
|
||||
}
|
||||
|
||||
|
||||
[[LinphoneManager instance ]addPushTokenToProxyConfig : proxyCfg ];
|
||||
|
||||
|
|
|
|||
|
|
@ -612,6 +612,7 @@ static LinphoneCoreVTable linphonec_vtable = {
|
|||
/* Initialize linphone core*/
|
||||
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"Create linphonecore"];
|
||||
linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
|
||||
theLinphoneCore = linphone_core_new (&linphonec_vtable
|
||||
, [confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]
|
||||
, [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,19 @@ sip_tcp_random_port=1
|
|||
sip_tls_random_port=1
|
||||
contact="Linphone iPhone" <sip:linphone.iphone@unknown-host>
|
||||
keepalive_period=30000
|
||||
default_proxy=0
|
||||
|
||||
[rtp]
|
||||
audio_rtp_port=7076
|
||||
video_rtp_port=9078
|
||||
video_rtp_port=9078
|
||||
|
||||
[video]
|
||||
display=1
|
||||
capture=1
|
||||
show_local=0
|
||||
enabled=1
|
||||
size=qvga
|
||||
display_filter_auto_rotate=1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@ dtmf_player_amp=0.007
|
|||
history_max_size=30
|
||||
max_calls=3
|
||||
|
||||
[video]
|
||||
display=1
|
||||
capture=1
|
||||
show_local=0
|
||||
enabled=1
|
||||
size=qvga
|
||||
display_filter_auto_rotate=1
|
||||
|
||||
[default_values]
|
||||
reg_expires=600
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@
|
|||
<false/>
|
||||
<key>Key</key>
|
||||
<string>prefix_preference</string>
|
||||
<key>KeyboardType</key>
|
||||
<string>NumberPad</string>
|
||||
<key>Title</key>
|
||||
<string>Prefix</string>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e1f018f274274d7574ebadd27659098453d8d1b5
|
||||
Subproject commit 4e847d24ca5c3a5012cb62beee4248667428b24c
|
||||
Loading…
Add table
Reference in a new issue