mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user