mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Do not use linphone_core_get_identity() when creating a LinphoneAddress to prevent a random port to appear.
This commit is contained in:
parent
453f5bf5c4
commit
151efc7d71
3 changed files with 4 additions and 5 deletions
|
|
@ -354,7 +354,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
//possible valid config detected
|
||||
proxyCfg = linphone_core_create_proxy_config(lc);
|
||||
char normalizedUserName[256];
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity(lc));
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new("sip:user@domain.com");
|
||||
linphone_proxy_config_normalize_number(proxyCfg, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));
|
||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||
linphone_address_set_domain(linphoneAddress, [domain cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
|
|
|
|||
|
|
@ -1287,7 +1287,7 @@ static void audioRouteChangeListenerCallback (
|
|||
[error release];
|
||||
} else {
|
||||
char normalizedUserName[256];
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity(theLinphoneCore));
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new("sip:user@domain.com");
|
||||
linphone_proxy_config_normalize_number(proxyCfg,[address cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
|
||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||
if(displayName!=nil) {
|
||||
|
|
|
|||
|
|
@ -384,13 +384,12 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
- (void)addProxyConfig:(NSString*)username password:(NSString*)password domain:(NSString*)domain server:(NSString*)server {
|
||||
LinphoneCore *lc = [LinphoneManager getLc];
|
||||
[self clearProxyConfig];
|
||||
if(server == nil) {
|
||||
server = domain;
|
||||
}
|
||||
char normalizedUserName[256];
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity(lc));
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new("sip:user@domain.com");
|
||||
linphone_proxy_config_normalize_number(NULL, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));
|
||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||
linphone_address_set_domain(linphoneAddress, [domain UTF8String]);
|
||||
|
|
@ -416,7 +415,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (NSString*)identityFromUsername:(NSString*)username {
|
||||
char normalizedUserName[256];
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new("sip:user@domain.com");
|
||||
linphone_proxy_config_normalize_number(NULL, [username cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));
|
||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||
linphone_address_set_domain(linphoneAddress, [[[LinphoneManager instance] lpConfigStringForKey:@"domain" forSection:@"wizard"] UTF8String]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue