fix third party connection #LINQT-2180 #LINQT-2181

This commit is contained in:
Gaelle Braud 2025-11-18 08:33:13 +01:00
parent bfbafab84b
commit 72e32ec160
5 changed files with 31 additions and 23 deletions

View file

@ -104,43 +104,43 @@
<context> <context>
<name>AccountManager</name> <name>AccountManager</name>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="93"/> <location filename="../../model/account/AccountManager.cpp" line="101"/>
<source>assistant_account_login_already_connected_error</source> <source>assistant_account_login_already_connected_error</source>
<extracomment>&quot;The account is already connected&quot;</extracomment> <extracomment>&quot;The account is already connected&quot;</extracomment>
<translation>Das Konto ist bereits verbunden</translation> <translation>Das Konto ist bereits verbunden</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="115"/> <location filename="../../model/account/AccountManager.cpp" line="123"/>
<source>assistant_account_login_proxy_address_error</source> <source>assistant_account_login_proxy_address_error</source>
<extracomment>&quot;Unable to create proxy address. Please check the domain name.&quot;</extracomment> <extracomment>&quot;Unable to create proxy address. Please check the domain name.&quot;</extracomment>
<translation>Proxy-Adresse konnte nicht erstellt werden. Bitte überprüfen Sie den Domänenname.</translation> <translation>Proxy-Adresse konnte nicht erstellt werden. Bitte überprüfen Sie den Domänenname.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="128"/> <location filename="../../model/account/AccountManager.cpp" line="136"/>
<source>assistant_account_login_address_configuration_error</source> <source>assistant_account_login_address_configuration_error</source>
<extracomment>&quot;Unable to configure address: `%1`.&quot;</extracomment> <extracomment>&quot;Unable to configure address: `%1`.&quot;</extracomment>
<translation>Folgende Adresse konnte nicht konfiguriert werden: `%1`.</translation> <translation>Folgende Adresse konnte nicht konfiguriert werden: `%1`.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="135"/> <location filename="../../model/account/AccountManager.cpp" line="143"/>
<source>assistant_account_login_params_configuration_error</source> <source>assistant_account_login_params_configuration_error</source>
<extracomment>&quot;Unable to configure account settings.&quot;</extracomment> <extracomment>&quot;Unable to configure account settings.&quot;</extracomment>
<translation>Kontoeinstellungen konnten nicht konfiguriert werden.</translation> <translation>Kontoeinstellungen konnten nicht konfiguriert werden.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="159"/> <location filename="../../model/account/AccountManager.cpp" line="167"/>
<source>assistant_account_login_forbidden_error</source> <source>assistant_account_login_forbidden_error</source>
<extracomment>&quot;Username and password do not match&quot;</extracomment> <extracomment>&quot;Username and password do not match&quot;</extracomment>
<translation>Benutzername und Passwort stimmen nicht überein</translation> <translation>Benutzername und Passwort stimmen nicht überein</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="161"/> <location filename="../../model/account/AccountManager.cpp" line="169"/>
<source>assistant_account_login_error</source> <source>assistant_account_login_error</source>
<extracomment>&quot;Error during connection, please verify your parameters&quot;</extracomment> <extracomment>&quot;Error during connection, please verify your parameters&quot;</extracomment>
<translation>Fehler bei der Verbindung</translation> <translation>Fehler bei der Verbindung</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="175"/> <location filename="../../model/account/AccountManager.cpp" line="183"/>
<source>assistant_account_add_error</source> <source>assistant_account_add_error</source>
<extracomment>&quot;Unable to add account.&quot;</extracomment> <extracomment>&quot;Unable to add account.&quot;</extracomment>
<translation>Konto konnte nicht hinzugefügt werden.</translation> <translation>Konto konnte nicht hinzugefügt werden.</translation>

View file

@ -104,43 +104,43 @@
<context> <context>
<name>AccountManager</name> <name>AccountManager</name>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="93"/> <location filename="../../model/account/AccountManager.cpp" line="101"/>
<source>assistant_account_login_already_connected_error</source> <source>assistant_account_login_already_connected_error</source>
<extracomment>&quot;The account is already connected&quot;</extracomment> <extracomment>&quot;The account is already connected&quot;</extracomment>
<translation>The account is already connected</translation> <translation>The account is already connected</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="115"/> <location filename="../../model/account/AccountManager.cpp" line="123"/>
<source>assistant_account_login_proxy_address_error</source> <source>assistant_account_login_proxy_address_error</source>
<extracomment>&quot;Unable to create proxy address. Please check the domain name.&quot;</extracomment> <extracomment>&quot;Unable to create proxy address. Please check the domain name.&quot;</extracomment>
<translation>Unable to create proxy address. Please check the domain name.</translation> <translation>Unable to create proxy address. Please check the domain name.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="128"/> <location filename="../../model/account/AccountManager.cpp" line="136"/>
<source>assistant_account_login_address_configuration_error</source> <source>assistant_account_login_address_configuration_error</source>
<extracomment>&quot;Unable to configure address: `%1`.&quot;</extracomment> <extracomment>&quot;Unable to configure address: `%1`.&quot;</extracomment>
<translation>Unable to configure address: `%1`.</translation> <translation>Unable to configure address: `%1`.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="135"/> <location filename="../../model/account/AccountManager.cpp" line="143"/>
<source>assistant_account_login_params_configuration_error</source> <source>assistant_account_login_params_configuration_error</source>
<extracomment>&quot;Unable to configure account settings.&quot;</extracomment> <extracomment>&quot;Unable to configure account settings.&quot;</extracomment>
<translation>Unable to configure account settings.</translation> <translation>Unable to configure account settings.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="159"/> <location filename="../../model/account/AccountManager.cpp" line="167"/>
<source>assistant_account_login_forbidden_error</source> <source>assistant_account_login_forbidden_error</source>
<extracomment>&quot;Username and password do not match&quot;</extracomment> <extracomment>&quot;Username and password do not match&quot;</extracomment>
<translation>Username and password do not match</translation> <translation>Username and password do not match</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="161"/> <location filename="../../model/account/AccountManager.cpp" line="169"/>
<source>assistant_account_login_error</source> <source>assistant_account_login_error</source>
<extracomment>&quot;Error during connection, please verify your parameters&quot;</extracomment> <extracomment>&quot;Error during connection, please verify your parameters&quot;</extracomment>
<translation>Error during connection</translation> <translation>Error during connection</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="175"/> <location filename="../../model/account/AccountManager.cpp" line="183"/>
<source>assistant_account_add_error</source> <source>assistant_account_add_error</source>
<extracomment>&quot;Unable to add account.&quot;</extracomment> <extracomment>&quot;Unable to add account.&quot;</extracomment>
<translation>Unable to add account.</translation> <translation>Unable to add account.</translation>

View file

@ -104,43 +104,43 @@
<context> <context>
<name>AccountManager</name> <name>AccountManager</name>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="93"/> <location filename="../../model/account/AccountManager.cpp" line="101"/>
<source>assistant_account_login_already_connected_error</source> <source>assistant_account_login_already_connected_error</source>
<extracomment>&quot;The account is already connected&quot;</extracomment> <extracomment>&quot;The account is already connected&quot;</extracomment>
<translation>Le compte est déjà connecté</translation> <translation>Le compte est déjà connecté</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="115"/> <location filename="../../model/account/AccountManager.cpp" line="123"/>
<source>assistant_account_login_proxy_address_error</source> <source>assistant_account_login_proxy_address_error</source>
<extracomment>&quot;Unable to create proxy address. Please check the domain name.&quot;</extracomment> <extracomment>&quot;Unable to create proxy address. Please check the domain name.&quot;</extracomment>
<translation>Impossible de créer l&apos;adresse proxy. Merci de vérifier le nom de domaine.</translation> <translation>Impossible de créer l&apos;adresse proxy. Merci de vérifier le nom de domaine.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="128"/> <location filename="../../model/account/AccountManager.cpp" line="136"/>
<source>assistant_account_login_address_configuration_error</source> <source>assistant_account_login_address_configuration_error</source>
<extracomment>&quot;Unable to configure address: `%1`.&quot;</extracomment> <extracomment>&quot;Unable to configure address: `%1`.&quot;</extracomment>
<translation>Impossible de configurer l&apos;adresse : `%1`.</translation> <translation>Impossible de configurer l&apos;adresse : `%1`.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="135"/> <location filename="../../model/account/AccountManager.cpp" line="143"/>
<source>assistant_account_login_params_configuration_error</source> <source>assistant_account_login_params_configuration_error</source>
<extracomment>&quot;Unable to configure account settings.&quot;</extracomment> <extracomment>&quot;Unable to configure account settings.&quot;</extracomment>
<translation>Impossible de configurer les paramètres du compte.</translation> <translation>Impossible de configurer les paramètres du compte.</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="159"/> <location filename="../../model/account/AccountManager.cpp" line="167"/>
<source>assistant_account_login_forbidden_error</source> <source>assistant_account_login_forbidden_error</source>
<extracomment>&quot;Username and password do not match&quot;</extracomment> <extracomment>&quot;Username and password do not match&quot;</extracomment>
<translation>Le couple identifiant mot de passe ne correspond pas</translation> <translation>Le couple identifiant mot de passe ne correspond pas</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="161"/> <location filename="../../model/account/AccountManager.cpp" line="169"/>
<source>assistant_account_login_error</source> <source>assistant_account_login_error</source>
<extracomment>&quot;Error during connection, please verify your parameters&quot;</extracomment> <extracomment>&quot;Error during connection, please verify your parameters&quot;</extracomment>
<translation>Erreur durant la connexion, veuillez vérifier vos paramètres</translation> <translation>Erreur durant la connexion, veuillez vérifier vos paramètres</translation>
</message> </message>
<message> <message>
<location filename="../../model/account/AccountManager.cpp" line="175"/> <location filename="../../model/account/AccountManager.cpp" line="183"/>
<source>assistant_account_add_error</source> <source>assistant_account_add_error</source>
<extracomment>&quot;Unable to add account.&quot;</extracomment> <extracomment>&quot;Unable to add account.&quot;</extracomment>
<translation>Impossible d&apos;ajouter le compte.</translation> <translation>Impossible d&apos;ajouter le compte.</translation>

View file

@ -65,6 +65,14 @@ bool AccountManager::login(QString username,
QString outboundProxyAddress, QString outboundProxyAddress,
QString connectionId) { QString connectionId) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
qDebug() << "login with parameters :";
qDebug() << "username" << username;
qDebug() << "password" << password;
qDebug() << "displayName" << displayName;
qDebug() << "domain" << domain;
qDebug() << "registrarUri" << registrarUri;
qDebug() << "outboundProxyAddress" << outboundProxyAddress;
qDebug() << "connectionId" << connectionId;
auto core = CoreModel::getInstance()->getCore(); auto core = CoreModel::getInstance()->getCore();
auto factory = linphone::Factory::get(); auto factory = linphone::Factory::get();
QString assistantFile = (!QString::compare(domain, "sip.linphone.org", Qt::CaseInsensitive) || domain.isEmpty()) QString assistantFile = (!QString::compare(domain, "sip.linphone.org", Qt::CaseInsensitive) || domain.isEmpty())
@ -102,7 +110,7 @@ bool AccountManager::login(QString username,
} }
if (!outboundProxyAddress.isEmpty()) { if (!outboundProxyAddress.isEmpty()) {
auto linOutboundProxyAddress = ToolModel::interpretUrl(outboundProxyAddress); auto linOutboundProxyAddress = ToolModel::interpretUrl(outboundProxyAddress);
params->setRoutesAddresses({linOutboundProxyAddress}); if (linOutboundProxyAddress) params->setRoutesAddresses({linOutboundProxyAddress});
} }
if (!domain.isEmpty()) { if (!domain.isEmpty()) {
identity->setDomain(Utils::appStringToCoreString(domain)); identity->setDomain(Utils::appStringToCoreString(domain));

View file

@ -361,7 +361,7 @@ LoginLayout {
} }
console.debug("[SIPLoginPage] User: Log in") console.debug("[SIPLoginPage] User: Log in")
LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text, LoginPageCpp.login(usernameEdit.text, passwordEdit.text, displayName.text, domainEdit.text,
transportCbox.currentValue, serverAddressEdit.text, connectionIdEdit.text); transportCbox.currentValue, registrarUriEdit.text, outboundProxyUriEdit.text, connectionIdEdit.text);
connectionButton.enabled = false connectionButton.enabled = false
connectionButtonContent.currentIndex = 1 connectionButtonContent.currentIndex = 1
} }