Commit 47f23dd8 authored by Alexandre Bourget's avatar Alexandre Bourget
Browse files

IAX: Allow to save the Full Name in the configuration, to use when calling outside.

parent 3c4bb197
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
#include "iaxvoiplink.h" #include "iaxvoiplink.h"
#include "manager.h" #include "manager.h"
#define IAX_HOST "IAX.host" #define IAX_FULL_NAME "IAX.fullName"
#define IAX_USER "IAX.user" #define IAX_HOST "IAX.host"
#define IAX_PASS "IAX.pass" #define IAX_USER "IAX.user"
#define IAX_PASS "IAX.pass"
IAXAccount::IAXAccount(const AccountID& accountID) IAXAccount::IAXAccount(const AccountID& accountID)
: Account(accountID) : Account(accountID)
...@@ -54,6 +55,7 @@ IAXAccount::registerAccount() ...@@ -54,6 +55,7 @@ IAXAccount::registerAccount()
unregisterAccount(); unregisterAccount();
IAXVoIPLink* tmplink = dynamic_cast<IAXVoIPLink*> (_link); IAXVoIPLink* tmplink = dynamic_cast<IAXVoIPLink*> (_link);
if (tmplink) { if (tmplink) {
// Stuff needed for IAX registration
tmplink->setHost(Manager::instance().getConfigString(_accountID,IAX_HOST)); tmplink->setHost(Manager::instance().getConfigString(_accountID,IAX_HOST));
tmplink->setUser(Manager::instance().getConfigString(_accountID,IAX_USER)); tmplink->setUser(Manager::instance().getConfigString(_accountID,IAX_USER));
tmplink->setPass(Manager::instance().getConfigString(_accountID,IAX_PASS)); tmplink->setPass(Manager::instance().getConfigString(_accountID,IAX_PASS));
...@@ -106,6 +108,7 @@ IAXAccount::initConfig(Conf::ConfigTree& config) ...@@ -106,6 +108,7 @@ IAXAccount::initConfig(Conf::ConfigTree& config)
// IAX specific // IAX specific
config.addConfigTreeItem(section, Conf::ConfigTreeItem(CONFIG_ACCOUNT_TYPE, "IAX", type_str)); config.addConfigTreeItem(section, Conf::ConfigTreeItem(CONFIG_ACCOUNT_TYPE, "IAX", type_str));
config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_FULL_NAME, "", type_str));
config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_HOST, "", type_str)); config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_HOST, "", type_str));
config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_USER, "", type_str)); config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_USER, "", type_str));
config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_PASS, "", type_str)); config.addConfigTreeItem(section, Conf::ConfigTreeItem(IAX_PASS, "", type_str));
......
...@@ -59,7 +59,8 @@ SIPAccount::registerAccount() ...@@ -59,7 +59,8 @@ SIPAccount::registerAccount()
unregisterAccount(); unregisterAccount();
SIPVoIPLink* tmplink = dynamic_cast<SIPVoIPLink*> (_link); SIPVoIPLink* tmplink = dynamic_cast<SIPVoIPLink*> (_link);
if (tmplink) { if (tmplink) {
tmplink->setProxy(Manager::instance().getConfigString(_accountID,SIP_PROXY)); // Stuff needed for SIP registration.
tmplink->setProxy (Manager::instance().getConfigString(_accountID,SIP_PROXY));
tmplink->setUserPart(Manager::instance().getConfigString(_accountID,SIP_USER_PART)); tmplink->setUserPart(Manager::instance().getConfigString(_accountID,SIP_USER_PART));
tmplink->setAuthName(Manager::instance().getConfigString(_accountID,SIP_AUTH_NAME)); tmplink->setAuthName(Manager::instance().getConfigString(_accountID,SIP_AUTH_NAME));
tmplink->setPassword(Manager::instance().getConfigString(_accountID,SIP_PASSWORD)); tmplink->setPassword(Manager::instance().getConfigString(_accountID,SIP_PASSWORD));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment