state = GetEndptState( vrgEndptState->lineId ); //获取ENDPT对象
//向心跳模块注销拖管病号
hbUnregisterPatient( state->cnxSignalHBId );
hbUnregisterPatient( state->signalHBId );
hbUnregisterPatient( state->signalCallerIdHBId );
hbUnregisterPatient( state->signalOnOffHBId );
hbUnregisterPatient( state->hookStateHBId );
//清除ENDPT的资源连接
for(i = 0; i < VRG_ENDPT_CFG_MAX_CNX_PER_ENDPT; i++)
if ( state->cnx[i] != NULL )
state->cnx[i]->cnxId = CNX_UNUSED;
state->cnx[i] = NULL;
//CAS控制复位
casCtlEndptDeinit(state->casCtlHandle)
casState.service[handle].inUse = VRG_FALSE;
casState.service[handle].localmem.channelinfo.casCallback = NULL;
casState.service[handle].localmem.channelinfo.earlyOffState = 0;
casState.service[handle].localmem.channelinfo.earlyOnState = 0;
casState.service[handle].localmem.channelinfo.delayOffState = 0;
casState.service[handle].localmem.channelinfo.delayOnState = 0;
state->isLineUsed = VRG_FALSE;
if ( state->lineVhdHdl != 0xffff )
//如果是FXO口,并且PSTN线路VHD为有效值
if( state->endptType == EPTYPE_PSTN && state->pstnVhdHdl != 0xFF )
//如果来显检测为DTMF方式,则释放之前的资源
Provision( state->endptArchive, EPPROV_CIDSigProtocol, &clidType );
if ( clidType == EPCLIDTYPE_DTMF )
pstnCtlDTMFClidRxDestroy( state->pstnVhdHdl );
//关闭DSP之前打开的通道
hdspVhdClose( state->lineVhdHdl, state->dspNum )
ENDPT_410_ProcessVrgEndptDestroy
最新推荐文章于 2014-11-05 11:49:46 发布