| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625 |
- #include "OperationReactor.h"
- #include "Operation.h"
- #include "ChanExten.h"
- #include "ChanTrunk.h"
- #include "Log.h"
- #include "OpMakeCall.h"
- #include "OpTransfer.h"
- #include "OpMeeting.h"
- #include "OpHoldon.h"
- #include "OpHangup.h"
- #include "OpListen.h"
- #include "OpInsert.h"
- #include "OpInstead.h"
- #include "OpIntercept.h"
- #include "OpMute.h"
- #include "OpRecord.h"
- #include "OpMyd.h"
- #include "OpAutoCall.h"
- #include "VirtualChan.h"
- #include "FsProxy.h"
- #include "JsonStringMaker.h"
- COperationReactor::COperationReactor()
- {
- }
- COperationReactor::~COperationReactor()
- {
- }
- bool COperationReactor::procOperation(long Instance, uint32_t OpType, uint32_t ResID, LineOpParam * pParam)
- {
- LOG_INFO("{OperationReactor}: 通道操作, OpType = %lu,通道[%lu]", OpType, ResID);
- bool Res = false;
- switch (OpType)
- {
- case LINE_OP_MAKE_CALL: // 座席外呼
- Res = __procOpMakeCall(Instance, ResID, pParam);
- break;
- case LINE_OP_HANG_UP: // 挂机
- Res = __procOpHangUp(Instance, ResID, pParam);
- break;
- case LINE_OP_TRANSFER: // 呼叫转移
- Res = __procOpTransfer(Instance, ResID, pParam);
- break;
- case LINE_OP_CONFERENCE: // 单步会议
- Res = __procOpMeeting(Instance, ResID, pParam);
- break;
- case LINE_OP_HOLD: // 保持
- Res = __procOpHold(Instance, ResID, pParam);
- break;
- case LINE_OP_TAKEBACK: // 接回
- Res = __procOpTakeBack(Instance, ResID, pParam);
- break;
- case LINE_OP_LISTEN: // 监听
- Res = __procOpListen(Instance, ResID, pParam);
- break;
- case LINE_OP_INSERT: // 强插
- Res = __procOpInsert(Instance, ResID, pParam);
- break;
- case LINE_OP_INSTEAD: // 代接
- Res = __procOpInstead(Instance, ResID, pParam);
- break;
- case LINE_OP_GRAB : // 强截
- Res = __procOpIntercept(Instance, ResID, pParam);
- break;
- case LINE_OP_RECORD: // 录音
- Res = __procOpRecord(Instance, ResID, pParam);
- break;
- case LINE_OP_TURNIVR: // 满意度
- Res = __procOpMyd(Instance, ResID, pParam);
- break;
- case LINE_OP_MUTE_BEGIN: // 静音开始
- Res = __procOpMuteOn(Instance, ResID, pParam);
- break;
- case LINE_OP_MUTE_END: // 静音结束
- Res = __procOpMuteOff(Instance, ResID, pParam);
- break;
- case LINE_OP_AUTO_CALL: // 自动外呼
- Res = __procOpAutoCall(Instance, ResID, pParam);
- break;
- default:
- break;
- }
- return Res;
- }
- void COperationReactor::onOpProcess(long Instance, uint32_t HostChanNo, uint32_t AssoChanNo, DEV_RES_TYPE AssoChanType, std::string CallerNum, std::string CalleeNum)
- {
- }
- void COperationReactor::onOpResult(long Instance, bool IsSucceed)
- {
- // 通知操作结果
- }
- void COperationReactor::onOpResult(long Instance, COperation * pOp, bool IsSucceed, std::string DestNum, std::string CurOpType)
- {
- if (pOp == nullptr) return;
- int OpType = pOp->type();
- //if (CurOpType != "MuteOn" && (CurOpType != "Hold")) // 静音,保持操作时不能释放op
- //{
- // if (__delOperation(pOp)) // 非取消操作的返回结果
- // {
- // LOG_DEBUG("释放操作[%d]", pOp->type());
- // // 关闭线路关联
- // pOp->detachHostChan();
- // // 释放操作
- // FS_LINK_DELETE(pOp);
- // } // end if
- //}
- if ((CurOpType != "MuteOn" && (CurOpType != "Hold")) || IsSucceed == false) // 静音,保持操作时不能释放op
- {
- if (__delOperation(pOp)) // 非取消操作的返回结果
- {
- LOG_DEBUG("释放操作[%d]", pOp->type());
- // 关闭线路关联
- pOp->detachHostChan();
- // 释放操作
- FS_LINK_DELETE(pOp);
- } // end if
- }
- std::string data;
- switch (OpType)
- {
- case LINE_OP_MAKE_CALL: // 外呼
- data = CFsProxy::GetInstance().creatJson("MakeCall", IsSucceed);
- break;
- case LINE_OP_HANG_UP: // 挂机
- data = CFsProxy::GetInstance().creatJson("DropCall", IsSucceed);
- break;
- case LINE_OP_HOLD: // 保持
- data = CFsProxy::GetInstance().creatJson("Hold", IsSucceed);
- break;
- //case LINE_OP_TAKEBACK: // 接回
- // data = CFsProxy::GetInstance().creatJson("Retrieve", IsSucceed);
- // break;
- case LINE_OP_TRANSFER: // 转移
- data = CFsProxy::GetInstance().creatJson("Transfer", IsSucceed);
- break;
- case LINE_OP_CONFERENCE: // 会议
- data = CFsProxy::GetInstance().creatJson("Meeting", IsSucceed);
- break;
- case LINE_OP_LISTEN: // 监听
- data = CFsProxy::GetInstance().creatJson("Listen", IsSucceed);
- break;
- case LINE_OP_INSERT: // 强插
- data = CFsProxy::GetInstance().creatJson("Insert", IsSucceed);
- break;
- case LINE_OP_INSTEAD: // 代接
- data = CFsProxy::GetInstance().creatJson("Instead", IsSucceed);
- break;
- case LINE_OP_GRAB: // 强截
- data = CFsProxy::GetInstance().creatJson("Intercept", IsSucceed);
- break;
- case LINE_OP_RECORD: // 录音
- data = CFsProxy::GetInstance().creatJson("Record", IsSucceed);
- break;
- case LINE_OP_MUTE_BEGIN: // 静音开始
- {
- data = CFsProxy::GetInstance().creatJson("MuteOn", IsSucceed);
- if (CurOpType == "MuteOff")
- data = CFsProxy::GetInstance().creatJson("MuteOff", IsSucceed);
- }
- break;
- //case LINE_OP_MUTE_END: // 静音结束
- // data = CFsProxy::GetInstance().creatJson("MuteOff", IsSucceed);
- // break;
- default:
- break;
- }
- if (CurOpType == "Break" || CurOpType == "Retrieve")
- data = CFsProxy::GetInstance().creatJson(CurOpType, IsSucceed);
-
- if(!data.empty())
- CFsProxy::GetInstance().send2Agent(DestNum, data);
- }
- void COperationReactor::onOpFromDev(VirtualChan * pChan, DEV_OP OpType, std::string CallerNum, std::string CalleeNum)
- {
- }
- bool COperationReactor::onExtenCallFromDev(VirtualChan * pHostChan, PCHAN_EVENT_NOTIFY pNotify)
- {
- COpMakeCall* pMakeCall = new COpMakeCall(this, FS_LINK_INSTANCE_INVALID);
- pMakeCall->attachHostChan(pHostChan);
- if (pMakeCall->start(pNotify))
- {
- __addOperation(pMakeCall);
- return true;
- }
- else
- {
- pMakeCall->detachHostChan();
- FS_LINK_DELETE(pMakeCall);
- return false;
- }
- }
- void COperationReactor::onEslEvtBgJobDone(PBG_JOB_NOTIFY pNotify)
- {
- if (pNotify == nullptr) return;
- COperation* pOperation = __getOperation(pNotify->JobInstance);
- if (pOperation != nullptr)
- pOperation->onBackgroudJobDone(pNotify);
- }
- void COperationReactor::onEslEvtChanState(long OpInstance, VirtualChan * pChan)
- {
- COperation* pOperation = __getOperation(OpInstance);
- if (pOperation != nullptr)
- pOperation->onAssoChanStateUpdated(pChan);
- }
- void COperationReactor::__addOperation(COperation * pOperation)
- {
- std::unique_lock<std::mutex> lock(m_TaskLock);
- m_TableOperation[pOperation->uniqueId()] = pOperation;
- }
- bool COperationReactor::__delOperation(COperation * pOperation)
- {
- std::unique_lock<std::mutex> lock(m_TaskLock);
- size_t i = m_TableOperation.erase(pOperation->uniqueId());
- return i > 0 ? true : false;
- }
- COperation * COperationReactor::__getOperation(long OpId)
- {
- std::unique_lock<std::mutex> lock(m_TaskLock);
- auto it = m_TableOperation.find(OpId);
- if (it != m_TableOperation.end()) return it->second;
- return nullptr;
- }
- bool COperationReactor::__execOp(COperation * pOp, LineOpParam * pParam)
- {
- __addOperation(pOp);
- if (pOp->start(pParam))
- return true;
- if (__delOperation(pOp))
- {
- pOp->detachHostChan();
- FS_LINK_DELETE(pOp);
- }
- return false;
- }
- bool COperationReactor::__procOpMakeCall(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN(("{OperationReactor}: 执行分机呼叫失败, 未找到分机通道[%lu], DestNum = %s"), ResID, pParam->szParam2.c_str());
- return false;
- }
- // 生成外呼操作类
- COperation* pOp = new COpMakeCall(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN(("{OperationReactor}: 执行分机呼叫失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s"), ResID,
- (pExten->currOp() == NULL ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpHangUp(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 查找要挂机的线路
- VirtualChan* pChan = CFsProxy::GetInstance().getExten(ResID);
- if (pChan == nullptr)
- pChan = CFsProxy::GetInstance().getTrunk(ResID);
- if (pChan == nullptr)
- {
- LOG_WARN(("{OperationReactor}: 执行挂机操作失败, 未找到通道[%lu]"), ResID);
- return false;
- } // end if
- // 如果线路正在执行其它操作
- if (pChan->currOp() != nullptr)
- {
- if (pChan->currOp()->type() == LINE_OP_HANG_UP)
- {
- LOG_INFO(("{OperationReactor}: 当前线路正在执行挂机"));
- return false; // 使任务删除
- }
- LOG_INFO(("{OperationReactor}: 执行挂机, 当前线路绑定操作, Operation = %d"), pChan->currOp()->type());
- return pChan->currOp()->hangup(Instance);
- }
- if (pChan->state() == CHAN_LOGIC_STATE_FREE || pChan->state() == CHAN_LOGIC_STATE_DISABLED)
- {
- LOG_INFO(("{OperationReactor}: 当前线路已挂机"));
- return false; // 使任务删除
- }
- // 执行挂机操作
- COperation* pOp = new COpHangup(this, Instance);
- if (!pOp->attachHostChan(pChan))
- {
- LOG_WARN(("{OperationReactor}: 执行挂机操作失败, 无法绑定通道[%lu], ChanCurTask = %d"), ResID,
- (pChan->currOp() == nullptr ? LINE_OP_UNKNOWN : pChan->currOp()->type()));
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpTransfer(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN(("{OperationReactor}: 执行呼叫转移失败, 未找到分机通道[%lu], DestNum = %s"), ResID, pParam->szParam2.c_str());
- return false;
- }
- COperation* pOp = new COpTransfer(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果通道正在执行其它操作
- LOG_WARN(("{OperationReactor}: 执行呼叫转移失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s"), ResID,
- (pExten->currOp() == NULL ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpMeeting(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN(("{OperationReactor}: 执行会议操作失败, 未找到分机通道[%lu], DestNum = %s"), ResID, pParam->szParam2.c_str());
- return false;
- }
- COperation* pOp = new COpMeeting(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN(("{OperationReactor}: 执行会议操作失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s"), ResID,
- (pExten->currOp() == NULL ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpHold(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN(("{OperationReactor}: 执行保持操作失败, 未找到分机通道[%lu]"), ResID);
- return false;
- }
- // 生成保持操作类
- COperation* pOp = new COpHoldon(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN(("{OperationReactor}: 执行保持操作失败, 无法绑定通道[%lu], ChanCurTask = %d"), ResID,
- (pExten->currOp() == nullptr ? LINE_OP_UNKNOWN : pExten->currOp()->type()));
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpTakeBack(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN(("{OperationReactor}: 执行保持接回操作失败, 未找到分机通道[%lu]"), ResID);
- return false;
- }
- // 如果线路正在执行其它操作
- COperation* pCurrOp = pExten->currOp();
- if (pCurrOp == nullptr || pCurrOp->type() != LINE_OP_HOLD)
- {
- LOG_WARN(("{OperationReactor}: 执行保持接回操作失败, 分机通道[%lu]当前未保持"), ResID);
- return false;
- }
- // 执行取消静音操作
- return pCurrOp->cancel(Instance);
- }
- bool COperationReactor::__procOpMuteOn(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行静音操作失败, 未找到分机通道[%lu]", ResID);
- return false;
- }
- // 生成静音操作类
- COperation* pOp = new COpMute(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN("{OperationReactor}: 执行静音操作失败, 无法绑定通道[%lu], ChanCurTask = %d", ResID,
- (pExten->currOp() == nullptr ? LINE_OP_UNKNOWN : pExten->currOp()->type()));
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpMuteOff(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行取消静音操作失败, 未找到分机通道[%lu]", ResID);
- return false;
- }
- // 如果线路正在执行其它操作
- COperation* pCurrOp = pExten->currOp();
- if (pCurrOp == nullptr || pCurrOp->type() != LINE_OP_MUTE_BEGIN)
- {
- LOG_WARN("{OperationReactor}: 执行取消静音操作失败, 分机通道[%lu]当前未静音", ResID);
- return false;
- }
- // 执行取消静音操作
- return pCurrOp->cancel(Instance);
- }
- bool COperationReactor::__procOpListen(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行监听操作失败, 未找到分机通道[%lu], DestNum = %s",ResID, pParam->szParam2.c_str());
- return false;
- }
- // 生成强插操作类
- COperation* pOp = new COpListen(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN("{OperationReactor}: 执行监听操作失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s",
- ResID, (pExten->currOp() == nullptr ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpInsert(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行强插操作失败, 未找到分机通道[%lu], DestNum = %s", ResID, pParam->szParam2.c_str());
- return false;
- }
- // 生成强插操作类
- COperation* pOp = new COpInsert(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN("{OperationReactor}: 执行强插操作失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s",
- ResID, (pExten->currOp() == NULL ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpInstead(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行代接操作失败, 未找到分机通道[%lu], DestNum = %s", ResID, pParam->szParam2.c_str());
- return false;
- }
- // 生成代接操作类
- COperation* pOp = new COpInstead(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN("{OperationReactor}: 执行代接操作失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s",
- ResID, (pExten->currOp() == nullptr ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpIntercept(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 通过设备资源查找主控线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行强截操作失败, 未找到分机通道[%lu], DestNum = %s", ResID, pParam->szParam2.c_str());
- return false;
- }
- // 生成强截操作类
- COperation* pOp = new COpIntercept(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- // 如果线路正在执行其它操作
- LOG_WARN("{OperationReactor}: 执行强截操作失败, 无法绑定通道[%lu], ChanCurTask = %d, DestNum = %s",
- ResID, (pExten->currOp() == NULL ? LINE_OP_UNKNOWN : pExten->currOp()->type()), pParam->szParam2.c_str());
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpRecord(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 查找要录音的线路
- VirtualChan* pChan = CFsProxy::GetInstance().getTrunk(ResID);
- if (pChan == nullptr)
- pChan = CFsProxy::GetInstance().getExten(ResID);
- if (pChan == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行录音操作失败, 未找到通道[%lu]", ResID);
- return false;
- } // end if
- // 生成录音操作类
- COperation* pOp = new COpRecord(this, Instance);
- if (!pOp->attachHostChan(pChan))
- {
- // 如果线路正在执行其它操作
- LOG_WARN("{OperationReactor}: 执行录音操作失败, 无法绑定通道[%lu], ChanCurTask = %d", ResID,
- (pChan->currOp() == nullptr ? LINE_OP_UNKNOWN : pChan->currOp()->type()));
- FS_LINK_DELETE(pOp);
- return false;
- }
- // 启动操作
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpMyd(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 查找要转IVR的线路
- ChanExten* pExten = CFsProxy::GetInstance().getExten(ResID);
- if (pExten == nullptr)
- {
- LOG_WARN("{OperationReactor}: 执行跳转IVR操作失败, 未找到分机通道[%lu]", ResID);
- return false;
- } // end if
- // 执行转IVR操作
- COperation* pOp = new COpMyd(this, Instance);
- if (!pOp->attachHostChan(pExten))
- {
- LOG_WARN("{OperationReactor}: 执行跳转IVR操作失败, 无法绑定通道[%lu], ChanCurTask = %d", ResID,
- (pExten->currOp() == nullptr ? LINE_OP_UNKNOWN : pExten->currOp()->type()));
- FS_LINK_DELETE(pOp);
- return false;
- } // end if
- return __execOp(pOp, pParam);
- }
- bool COperationReactor::__procOpAutoCall(long Instance, uint32_t ResID, LineOpParam * pParam)
- {
- // 生成自动呼叫操作类
- COperation* pOp = new COpAutoCall(this, Instance);
- // 启动操作
- return __execOp(pOp, pParam);
- }
- COperationReactor COperationReactor::instance;
|