CallListener::CallListener(): source_(0),
closeConnection_(false), initialized_(false), box_(0), label_(0),
-retries_(-1), timer_(0), currentCall_(0)
+retries_(-1), timer_(0), currentCall_(0), ignoreFirstZero_(false)
{
}
sourceConfig_ = tmpConfig;
delete config;
+ ignoreFirstZero_ = (Settings::instance()->get("ignore_first_zero") == "1");
+
systemBus_.connect(CALL_SERVICE_NAME,
CALL_SERVICE_PATH,
CALL_SERVICE_INTERFACE,
return;
}
+ // If the call has come through some kind of switch board
+ // there might be a leading zero added
+ if(ignoreFirstZero_)
+ {
+ number = number.replace(QRegExp("^00"), "0");
+ }
+
ContactManager cm;
if(!cm.numberExists(number))