diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index f114c51cd..5dcbd0c6b 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -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);