本文整理汇总了C++中CChannel::OnDialPacket方法的典型用法代码示例。如果您正苦于以下问题:C++ CChannel::OnDialPacket方法的具体用法?C++ CChannel::OnDialPacket怎么用?C++ CChannel::OnDialPacket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChannel
的用法示例。
在下文中一共展示了CChannel::OnDialPacket方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CallRemoteUser
struct state* CCallerChannel::CallRemoteUser(LPCTSTR xRemoteId, LPCTSTR xCallerId, struct state* lpszDefaultState)
{
CSettings::Item* pItem = Settings.GetSetting( _T("Trunk.TrunkFind") );
CChannel* pChannel = Network.LookOutPcm( *pItem->m_pString );
if ( pChannel == NULL ) return lpszDefaultState;
CDialPacket* pPacket = new CDialPacket;
pPacket->SetLocalId( "057496031" ); pPacket->SetRemoteId( xRemoteId );
pPacket->SetCallerId( xCallerId );
pChannel->OnDialPacket(pPacket); pPacket->Release();
SetLinker( pChannel->m_nChan );
return lpszDefaultState;
}
示例2: OnDialPacket
BOOL CCircuitry::OnDialPacket(CDialPacket* pPacket)
{
CSingleLock pLock( &Network.m_pSection, TRUE );
CHAR xRemoteId[MAX_PHONE + 1];
xRemoteId[ pPacket->GetRemoteId( xRemoteId ) ] = '\0';
CChannel* pChannel = Network.LookOutPhs( xRemoteId );
if ( ! pChannel ) return SendPacket( new CErrPacket( ECore_Busy ) );
int nChan = pChannel->m_nChan;
SsmSetRecMixer( nChan, FALSE, 0 );
SsmSetDTMFStopRecCharSet( nChan, "" );
SsmSetDtmfStopPlay( nChan, FALSE );
pChannel->OnDialPacket( pPacket );
NewBuffer( nChan );
Start( nChan );
return TRUE;
}