Make caller id per account option available. Needs to wipe out the ~/.fscomm/conf/freeswitch.xml file, sorry.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16529 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
João Mesquita
2010-01-28 03:13:57 +00:00
parent 8a3001e611
commit 6a939c199a
6 changed files with 330 additions and 249 deletions

View File

@@ -485,3 +485,22 @@ void FSHost::printEventHeaders(switch_event_t *event)
}
qDebug() << "\n\n";
}
QSharedPointer<Account> FSHost::getAccountByName(QString accStr)
{
foreach(QSharedPointer<Account> acc, _accounts.values())
{
if (acc.data()->getName() == accStr)
return acc;
}
return QSharedPointer<Account>();
}
QSharedPointer<Account> FSHost::getCurrentDefaultAccount()
{
QSettings settings;
settings.beginGroup("FreeSWITCH/conf/globals");
QString accString = settings.value("default_gateway").toString();
settings.endGroup();
return getAccountByName(accString);
}