| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #include "StdAfx.h"
- #include "TransferSession.h"
- #include "CallSession.h"
- #include "ProxyShell.h"
- #include "MC.h"
- CTransferSession::CTransferSession(CCallSession* pParent, long SubId, PendingCallInfo* pInfo) : CSubSession(pParent, SubId, pInfo),
- m_PeerLineId(pInfo->nAssoLine), m_IsPlayTone(false)
- {
- }
- CTransferSession::~CTransferSession(void)
- {
- }
- /*****************************************************************
- **【函数名称】 OnDialCancel
- **【函数功能】 呼叫取消处理
- **【参数】
- **【返回值】
- *****************************************************************/
- void CTransferSession::_onDialCancel( void )
- {
- // 对原通话执行取消静音操作
- m_pParent->lineMute(m_pInfo->nHostLine, false);
- // 主控线路状态修正
- if(m_pParent->isExist(m_pInfo->nHostLine, m_HostLineParty))
- {
- CProxyShell::GetInstance().onLineStateUpdated(m_pInfo->nHostLine, m_pParent->id(),
- SESSION_INVALID_SUB_CALL, (VIRTUAL_LINE_STATE)m_pInfo->nHostLineStatus, m_pInfo->szPreCallerNum, m_pInfo->szPreCalleeNum);
- } // end if
- }
- /*****************************************************************
- **【函数名称】 _onDialOK
- **【函数功能】 呼叫成功后续处理
- **【参数】
- **【返回值】
- *****************************************************************/
- void CTransferSession::_onDialOK( void )
- {
- // 对原通话执行取消静音操作
- m_pParent->lineMute(m_pInfo->nHostLine, false);
- // 主会话中线路替换
- m_pParent->removeLine(m_pInfo->nAssoLine, CALL_PARTY_PENDING);
- m_pParent->removeLine(m_pInfo->nHostLine, m_HostLineParty);
- m_pParent->insertLine(m_pInfo->nAssoLine, m_HostLineParty, true);
- // 主控线路挂机
- CMC::GetInstance().dropCall(m_pInfo->nHostLine, true);
- }
- /*****************************************************************
- **【函数名称】 _onDialing
- **【函数功能】 呼叫振铃处理
- **【参数】
- **【返回值】
- *****************************************************************/
- void CTransferSession::_onDialRing( void )
- {
- m_IsPlayTone = true;
- // 对原通话执行静音操作
- m_pParent->lineMute(m_pInfo->nHostLine, true);
- }
|