#include "OpForceAgentState.h" #include "ChanExten.h" #include "OperationReactor.h" #include "FsProxy.h" COpForceAgentState::COpForceAgentState(COperationReactor * pParent, long Instance) : COperation(pParent, Instance) { } COpForceAgentState::~COpForceAgentState(void) { } bool COpForceAgentState::start(LineOpParam * pParam) { m_OpTime = Util::CurTime(); m_CallerAgent = pParam->szParam1; m_Caller = pParam->nParam1; m_CalleeAgent = pParam->szParam2; m_Callee = pParam->szParam3; bool ret = pParam->nParam2; LOG_INFO("{COpForceAgentState}: 坐席[%s]-分机[%s]执行强制坐席状态, DestAgent = %s,DestExten = %s", m_CallerAgent.c_str(), m_Caller.c_str(), m_CalleeAgent.c_str(), m_Callee.c_str()); ChanExten* pDestExten = CFsProxy::GetInstance().getExten(atoi(m_Callee.c_str())); if (pDestExten) pDestExten->forceState(CHAN_LOGIC_STATE_FREE); else ret = false; _end(ret); return ret; } void COpForceAgentState::_end(bool IsSucceed) { SqlWrite::GetInstance()->addSql(toSql(IsSucceed, "强制坐席状态")); m_pParent->onOpResult(m_Instance, this, IsSucceed, m_Caller); }