mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Allow account creator to configure proxy config if no default value was loaded but set by API
This commit is contained in:
parent
7eb344cabd
commit
3ba718de5f
1 changed files with 12 additions and 1 deletions
|
|
@ -91,7 +91,18 @@ static char* _get_identity(const LinphoneAccountCreator *creator) {
|
|||
LinphoneAddress* addr;
|
||||
|
||||
addr = linphone_proxy_config_normalize_sip_uri(proxy, creator->username ? creator->username : creator->phone_number);
|
||||
if (addr == NULL) goto end;
|
||||
if (addr == NULL) {
|
||||
if (creator->username && creator->domain) {
|
||||
char *url = ms_strdup_printf("sip:%s@%s", creator->username, creator->domain);
|
||||
addr = linphone_address_new(url);
|
||||
ms_free(url);
|
||||
if (addr == NULL) {
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
identity = linphone_address_as_string(addr);
|
||||
linphone_address_unref(addr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue