mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
Better bis
This commit is contained in:
parent
a63542cd03
commit
19b54bad8c
1 changed files with 18 additions and 1 deletions
|
|
@ -75,8 +75,25 @@
|
|||
while( logs ){
|
||||
LinphoneCallLog* log = logs->data;
|
||||
if( linphone_call_log_get_dir(log) == LinphoneCallOutgoing ){
|
||||
LinphoneProxyConfig* def_proxy = NULL;
|
||||
LinphoneAddress* to = linphone_call_log_get_to(log);
|
||||
char *bis_address = linphone_address_as_string_uri_only(to);
|
||||
const char* domain = linphone_address_get_domain(to);
|
||||
char* bis_address = NULL;
|
||||
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc], &def_proxy);
|
||||
|
||||
// if the 'to' address is on the default proxy, only present the username
|
||||
if( def_proxy ){
|
||||
const char* def_domain = linphone_proxy_config_get_domain(def_proxy);
|
||||
if( def_domain && domain && !strcmp(domain, def_domain) ){
|
||||
bis_address = ms_strdup(linphone_address_get_username(to));
|
||||
}
|
||||
}
|
||||
|
||||
if( bis_address == NULL ) {
|
||||
bis_address = linphone_address_as_string_uri_only(to);
|
||||
}
|
||||
|
||||
[addressField setText:[NSString stringWithUTF8String:bis_address]];
|
||||
ms_free(bis_address);
|
||||
// return after filling the address, let the user confirm the call by pressing again
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue