Edit gateway works too. Now we need to start parsing events right.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16301 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
João Mesquita
2010-01-14 04:54:03 +00:00
parent b88a016962
commit bc835175ba
5 changed files with 69 additions and 6 deletions

View File

@@ -57,6 +57,45 @@ void AccountDialog::addExtraParam()
ui->sofiaExtraParamTable->setItem(ui->sofiaExtraParamTable->rowCount()-1,1,paramValItem);
}
void AccountDialog::readConfig()
{
_settings->beginGroup("FreeSWITCH/conf/sofia.conf/profiles/profile/gateways");
_settings->beginGroup(_accId);
_settings->beginGroup("gateway/attrs");
ui->sofiaGwNameEdit->setText(_settings->value("name").toString());
_settings->endGroup();
_settings->beginGroup("gateway/params");
ui->sofiaGwUsernameEdit->setText(_settings->value("username").toString());
ui->sofiaGwRealmEdit->setText(_settings->value("realm").toString());
ui->sofiaGwPasswordEdit->setText(_settings->value("password").toString());
ui->sofiaGwExtensionEdit->setText(_settings->value("extension").toString());
ui->sofiaGwExpireSecondsSpin->setValue(_settings->value("expire-seconds").toInt());
ui->sofiaGwRegisterCombo->setCurrentIndex(ui->sofiaGwRegisterCombo->findText(_settings->value("register").toString(),
Qt::MatchExactly));
ui->sofiaGwRegisterTransportCombo->setCurrentIndex(ui->sofiaGwRegisterTransportCombo->findText(_settings->value("register-transport").toString(),
Qt::MatchExactly));
ui->sofiaGwRetrySecondsSpin->setValue(_settings->value("retry-seconds").toInt());
_settings->endGroup();
_settings->beginGroup("gateway/customParams");
int row = 0;
foreach(QString k, _settings->childKeys())
{
row++;
ui->sofiaExtraParamTable->setRowCount(row);
QTableWidgetItem *varName = new QTableWidgetItem(k);
QTableWidgetItem *varVal = new QTableWidgetItem(_settings->value(k).toString());
ui->sofiaExtraParamTable->setItem(row-1, 0,varName);
ui->sofiaExtraParamTable->setItem(row-1, 1,varVal);
}
_settings->endGroup();
_settings->endGroup();
_settings->endGroup();
}
void AccountDialog::writeConfig()
{
_settings->beginGroup("FreeSWITCH/conf/sofia.conf/profiles/profile/gateways");
@@ -91,8 +130,6 @@ void AccountDialog::writeConfig()
_settings->endGroup();
_settings->endGroup();
QString res;
if (g_FSHost.sendCmd("sofia", "profile softphone rescan", &res) != SWITCH_STATUS_SUCCESS)
{