Add an option to enable bundle mode in account parameters.

This commit is contained in:
Julien Wadel 2023-05-04 09:20:18 +02:00
parent 8780076d9e
commit 9f587cb196
19 changed files with 194 additions and 3 deletions

View file

@ -3400,6 +3400,16 @@ Klikněte zde: <a href="%1">%1</a>
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation>Pokud je zadáno číslo, aplikuje se na něj předčíslí</translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Klik her: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3388,6 +3388,16 @@ Click here: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation>If a number is entered, apply the prefix to number</translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation>Advanced</translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation>Bundle mode</translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation>Quand un nombre est saisi, applique le préfixe</translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3350,6 +3350,16 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3350,6 +3350,16 @@
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3376,6 +3376,16 @@ Spustelėkite čia: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation>Se um número for inserido, aplique o prefixo ao número</translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3376,6 +3376,16 @@
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3363,6 +3363,16 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3350,6 +3350,16 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3376,6 +3376,16 @@
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -3350,6 +3350,16 @@
<extracomment>&apos;If a number is entered, apply the prefix to number&apos; : tooltip for an option to applying the country prefix to numbers.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>advancedTitle</source>
<extracomment>&apos;Advanced&apos; : Option title for advanced option in account parameters.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>enableBundleMode</source>
<extracomment>&apos;Bundle mode&apos; : Option title to enable the RTP bundle mode.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsTunnel</name>

View file

@ -175,6 +175,7 @@ QVariantMap AccountSettingsModel::getAccountDescription (const shared_ptr<linpho
map["dialPrefix"] = Utils::coreStringToAppString(accountParams->getInternationalPrefix());
map["dialPrefixCallChat"] = accountParams->getUseInternationalPrefixForCallsAndChats();
map["dialEscapePlus"] = accountParams->dialEscapePlusEnabled();
map["rtpBundleEnabled"] = accountParams->rtpBundleEnabled();
shared_ptr<linphone::NatPolicy> natPolicy = accountParams->getNatPolicy();
bool createdNat = !natPolicy;
@ -183,6 +184,7 @@ QVariantMap AccountSettingsModel::getAccountDescription (const shared_ptr<linpho
map["iceEnabled"] = natPolicy->iceEnabled();
map["turnEnabled"] = natPolicy->turnEnabled();
const string &turnUser(natPolicy->getStunServerUsername());
const string &stunServer(natPolicy->getStunServer());
@ -355,7 +357,7 @@ bool AccountSettingsModel::addOrUpdateAccount(
if(data.contains("avpfInterval"))
accountParams->setAvpfRrInterval(uint8_t(data["avpfInterval"].toInt()));
if(data.contains("registerEnabled"))
accountParams->enableRegister(data.contains("registerEnabled") ? data["registerEnabled"].toBool() : true);
accountParams->enableRegister(data["registerEnabled"].toBool());
if(data.contains("publishPresence")) {
newPublishPresence = accountParams->publishEnabled() != data["publishPresence"].toBool();
accountParams->enablePublish(data["publishPresence"].toBool());
@ -372,6 +374,8 @@ bool AccountSettingsModel::addOrUpdateAccount(
accountParams->setUseInternationalPrefixForCallsAndChats(data["dialPrefixCallChat"].toBool());
if(data.contains("dialEscapePlus"))
accountParams->enableDialEscapePlus(data["dialEscapePlus"].toBool());
if(data.contains("rtpBundleEnabled"))
accountParams->enableRtpBundle(data["rtpBundleEnabled"].toBool());
shared_ptr<linphone::NatPolicy> natPolicy = accountParams->getNatPolicy();

View file

@ -69,6 +69,8 @@ function initForm (account) {
stunServer.text = config.stunServer
turnPassword.text = config.turnPassword
turnUser.text = config.turnUser
rtpBundleEnabled.checked = config.rtpBundleEnabled
if (account) {
dialog._sipAddressOk = true
@ -107,7 +109,8 @@ function validAccount (account) {
turnEnabled: turnEnabled.checked,
stunServer: stunServer.text,
turnUser: turnUser.text,
turnPassword: turnPassword.text
turnPassword: turnPassword.text,
rtpBundleEnabled: rtpBundleEnabled.checked
}
if (gAccount && Linphone.AccountSettingsModel.addOrUpdateAccount(gAccount, data)
@ -132,7 +135,9 @@ function handleVideoConferenceUriChanged (uri) {
}
function handleLimeServerUrlChanged (uri) {
dialog._limeServerUrlOk = uri=='' || Linphone.SipAddressesModel.addressIsValid(uri)
dialog._limeServerUrlOk = uri=='' || Linphone.SipAddressesModel.addressIsValid(uri)
if(!dialog._limeServerUrlOk)
console.log("Bad URI: " +uri)
}
function handleServerAddressChanged (address) {

View file

@ -381,6 +381,28 @@ DialogPlus {
}
}
}
// -----------------------------------------------------------------------
// Advanced
// -----------------------------------------------------------------------
Form {
//: 'Advanced' : Option title for advanced option in account parameters.
title: qsTr('advancedTitle')
width: parent.width
FormLine {
FormGroup {
//: 'Bundle mode' : Option title to enable the RTP bundle mode.
label: qsTr('enableBundleMode')
Switch {
id: rtpBundleEnabled
onClicked: checked = !checked
}
}
}
}
}
}
}