mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
Configuration is more mature now. We can add and remove several accounts. Still have to edit account and start doing some work on the events to treat them right.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16298 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "ui_accountdialog.h"
|
||||
#include "fshost.h"
|
||||
|
||||
AccountDialog::AccountDialog(int accId, QWidget *parent) :
|
||||
AccountDialog::AccountDialog(QString accId, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
_accId(accId),
|
||||
ui(new Ui::AccountDialog)
|
||||
@@ -61,7 +61,7 @@ void AccountDialog::writeConfig()
|
||||
{
|
||||
_settings->beginGroup("FreeSWITCH/conf/sofia.conf/profiles/profile/gateways");
|
||||
|
||||
_settings->beginGroup(QString::number(_accId));
|
||||
_settings->beginGroup(_accId);
|
||||
|
||||
_settings->beginGroup("gateway/attrs");
|
||||
_settings->setValue("name", ui->sofiaGwNameEdit->text());
|
||||
@@ -77,6 +77,9 @@ void AccountDialog::writeConfig()
|
||||
_settings->setValue("register", ui->sofiaGwRegisterCombo->currentText());
|
||||
_settings->setValue("register-transport", ui->sofiaGwRegisterTransportCombo->currentText());
|
||||
_settings->setValue("retry-seconds", ui->sofiaGwRetrySecondsSpin->value());
|
||||
_settings->endGroup();
|
||||
|
||||
_settings->beginGroup("gateway/customParams");
|
||||
for (int i = 0; i< ui->sofiaExtraParamTable->rowCount(); i++)
|
||||
{
|
||||
_settings->setValue(ui->sofiaExtraParamTable->item(i, 0)->text(),
|
||||
@@ -97,6 +100,27 @@ void AccountDialog::writeConfig()
|
||||
emit gwAdded();
|
||||
}
|
||||
|
||||
void AccountDialog::clear()
|
||||
{
|
||||
ui->sofiaExtraParamTable->clearContents();
|
||||
ui->sofiaExtraParamTable->setRowCount(0);
|
||||
|
||||
ui->sofiaGwNameEdit->clear();
|
||||
ui->sofiaGwUsernameEdit->clear();
|
||||
ui->sofiaGwRealmEdit->clear();
|
||||
ui->sofiaGwPasswordEdit->clear();
|
||||
ui->sofiaGwExtensionEdit->clear();
|
||||
ui->sofiaGwExpireSecondsSpin->setValue(60);
|
||||
ui->sofiaGwRegisterCombo->setCurrentIndex(0);
|
||||
ui->sofiaGwRegisterTransportCombo->setCurrentIndex(0);
|
||||
ui->sofiaGwRetrySecondsSpin->setValue(30);
|
||||
}
|
||||
|
||||
void AccountDialog::setAccId(QString accId)
|
||||
{
|
||||
_accId = accId;
|
||||
}
|
||||
|
||||
void AccountDialog::changeEvent(QEvent *e)
|
||||
{
|
||||
QDialog::changeEvent(e);
|
||||
|
Reference in New Issue
Block a user