diff --git a/libs/ysig/sigcall.cpp b/libs/ysig/sigcall.cpp index 1c1953e7..7b256ccc 100644 --- a/libs/ysig/sigcall.cpp +++ b/libs/ysig/sigcall.cpp @@ -786,6 +786,7 @@ AnalogLine::AnalogLine(AnalogLineGroup* grp, unsigned int cic, const NamedList& m_acceptPulseDigit(true), m_answerOnPolarity(false), m_hangupOnPolarity(false), + m_polarityControl(false), m_callSetup(NoCallSetup), m_callSetupTimeout(0), m_noRingTimeout(0), @@ -823,6 +824,7 @@ AnalogLine::AnalogLine(AnalogLineGroup* grp, unsigned int cic, const NamedList& m_echocancel = tmp.toBoolean() ? 1 : -1; m_answerOnPolarity = params.getBoolValue("answer-on-polarity",false); m_hangupOnPolarity = params.getBoolValue("hangup-on-polarity",false); + m_polarityControl = params.getBoolValue("polaritycontrol",false); m_callSetup = (CallSetupInfo)lookup(params.getValue("callsetup"),s_csName,After); @@ -1090,7 +1092,7 @@ bool AnalogLineGroup::appendLine(AnalogLine* line, bool destructOnFail) } Lock lock(this); m_lines.append(line); - Debug(this,DebugAll,"Added line (%p) %s [%p]",line,line->address(),this); + DDebug(this,DebugAll,"Added line (%p) %s [%p]",line,line->address(),this); return true; } @@ -1112,7 +1114,7 @@ void AnalogLineGroup::removeLine(AnalogLine* line) return; Lock lock(this); if (m_lines.remove(line,false)) - Debug(this,DebugAll,"Removed line %p %s [%p]",line,line->address(),this); + DDebug(this,DebugAll,"Removed line %p %s [%p]",line,line->address(),this); } // Find a line by its circuit diff --git a/libs/ysig/yatesig.h b/libs/ysig/yatesig.h index da6de41e..30e951aa 100644 --- a/libs/ysig/yatesig.h +++ b/libs/ysig/yatesig.h @@ -2122,6 +2122,13 @@ public: inline bool hangupOnPolarity() const { return m_hangupOnPolarity; } + /** + * Check if the line polarity change should be used + * @return True if the line polarity change should be used + */ + inline bool polarityControl() const + { return m_polarityControl; } + /** * Check if the line is processing (send/receive) the setup info (such as caller id) and when it does it * @return Call setup info processing as enumeration @@ -2317,6 +2324,7 @@ private: bool m_acceptPulseDigit; // Accept incoming pulse digits bool m_answerOnPolarity; // Answer on line polarity change bool m_hangupOnPolarity; // Hangup on line polarity change + bool m_polarityControl; // Set line polarity flag CallSetupInfo m_callSetup; // Call setup management u_int64_t m_callSetupTimeout; // FXO: timeout period for received call setup data before first ring u_int64_t m_noRingTimeout; // FXO: timeout period with no ring received on incoming calls