Commit 3ba718de authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Allow account creator to configure proxy config if no default value was loaded but set by API

parent 7eb344ca
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment