Skip to content
Snippets Groups Projects
Commit 99ad29ad authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3742] Fix IAX accounts no longer register in the daily builds

parent fdabcfc9
No related branches found
No related tags found
No related merge requests found
...@@ -202,9 +202,9 @@ int IAXAccount::registerVoIPLink() ...@@ -202,9 +202,9 @@ int IAXAccount::registerVoIPLink()
_link->init(); _link->init();
// Stuff needed for IAX registration // Stuff needed for IAX registration
setHostname (Manager::instance().getConfigString (_accountID, HOSTNAME)); setHostname (_hostname);
setUsername (Manager::instance().getConfigString (_accountID, USERNAME)); setUsername (_username);
setPassword (Manager::instance().getConfigString (_accountID, PASSWORD)); setPassword (_password);
_link->sendRegister (_accountID); _link->sendRegister (_accountID);
......
...@@ -413,14 +413,18 @@ IAXVoIPLink::sendRegister (AccountID id) ...@@ -413,14 +413,18 @@ IAXVoIPLink::sendRegister (AccountID id)
IAXAccount *account; IAXAccount *account;
bool result; bool result;
_debug("IAX: Sending registration");
result = false; result = false;
account = dynamic_cast<IAXAccount *> (getAccountPtr()); account = dynamic_cast<IAXAccount *> (getAccountPtr());
if (account->getHostname().empty()) { if (account->getHostname().empty()) {
_error("IAX: Error: Account hostname is empty");
return false; return false;
} }
if (account->getUsername().empty()) { if (account->getUsername().empty()) {
_error("IAX: Error: Account username is empty");
return false; return false;
} }
...@@ -435,11 +439,11 @@ IAXVoIPLink::sendRegister (AccountID id) ...@@ -435,11 +439,11 @@ IAXVoIPLink::sendRegister (AccountID id)
_regSession = iax_session_new(); _regSession = iax_session_new();
if (!_regSession) { if (!_regSession) {
_debug ("Error when generating new session for register"); _debug ("IAX: Error when generating new session for register");
} else { } else {
_debug ("IAX Sending registration to %s with user %s", account->getHostname().c_str() , account->getUsername().c_str()); _debug ("IAX: Sending registration to %s with user %s", account->getHostname().c_str() , account->getUsername().c_str());
int val = iax_register (_regSession, account->getHostname().data(), account->getUsername().data(), account->getPassword().data(), 120); int val = iax_register (_regSession, account->getHostname().data(), account->getUsername().data(), account->getPassword().data(), 120);
_debug ("Return value: %d", val); _debug ("IAX: Return value: %d", val);
// set the time-out to 15 seconds, after that, resend a registration request. // set the time-out to 15 seconds, after that, resend a registration request.
// until we unregister. // until we unregister.
_nextRefreshStamp = time (NULL) + 10; _nextRefreshStamp = time (NULL) + 10;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment