mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
Fix DTMF for outbound calls, default settings on startup and dialplan correctly set. We must be ready to go and really test this thing.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16350 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -25,7 +25,6 @@ void PrefAccounts::addAccountBtnClicked()
|
||||
}
|
||||
_accDlg = new AccountDialog(uuid);
|
||||
connect(_accDlg, SIGNAL(gwAdded(QString)), this, SLOT(readConfig()));
|
||||
connect(_accDlg, SIGNAL(gwAdded(QString)), this, SLOT(applyNewGw(QString)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -44,26 +43,6 @@ void PrefAccounts::addAccountBtnClicked()
|
||||
_accDlg->activateWindow();
|
||||
}
|
||||
|
||||
void PrefAccounts::applyNewGw(QString accId)
|
||||
{
|
||||
QString res;
|
||||
if (g_FSHost.sendCmd("sofia", "profile softphone rescan", &res) != SWITCH_STATUS_SUCCESS)
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not rescan the softphone profile.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_ui->accountsTable->rowCount() == 1)
|
||||
{
|
||||
_settings->beginGroup("FreeSWITCH/conf/globals");
|
||||
_settings->setValue("default_gateway",_settings->value("/attrs/name"));
|
||||
_settings->endGroup();
|
||||
_settings->beginGroup(QString("FreeSWITCH/conf/sofia.conf/profiles/profile/gateways/%1/gateway").arg(accId));
|
||||
switch_core_set_variable("default_gateway",_settings->value("/attrs/name").toByteArray().data());
|
||||
_settings->endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
void PrefAccounts::editAccountBtnClicked()
|
||||
{
|
||||
QList<QTableWidgetSelectionRange> selList = _ui->accountsTable->selectedRanges();
|
||||
@@ -113,6 +92,7 @@ void PrefAccounts::remAccountBtnClicked()
|
||||
if (offset > 0)
|
||||
{
|
||||
QString res;
|
||||
_settings->sync();
|
||||
if (g_FSHost.sendCmd("sofia", "profile softphone rescan", &res) != SWITCH_STATUS_SUCCESS)
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not rescan the softphone profile.\n");
|
||||
@@ -153,4 +133,23 @@ void PrefAccounts::readConfig()
|
||||
}
|
||||
|
||||
_settings->endGroup();
|
||||
|
||||
QString res;
|
||||
_settings->sync();
|
||||
if (g_FSHost.sendCmd("sofia", "profile softphone rescan", &res) != SWITCH_STATUS_SUCCESS)
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not rescan the softphone profile.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_ui->accountsTable->rowCount() == 1)
|
||||
{
|
||||
QString default_gateway = _settings->value(QString("/FreeSWITCH/conf/sofia.conf/profiles/profile/gateways/%1/gateway/attrs/name").arg(_ui->accountsTable->item(0,0)->data(Qt::UserRole).toString())).toString();
|
||||
_settings->beginGroup("FreeSWITCH/conf/globals");
|
||||
qDebug() << QString("Fucking gw: %1").arg(default_gateway);
|
||||
_settings->setValue("default_gateway", default_gateway);
|
||||
_settings->endGroup();
|
||||
switch_core_set_variable("default_gateway", default_gateway.toAscii().data());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user