当前位置: 首页>>代码示例>>C++>>正文


C++ TransactionEntry::T310方法代码示例

本文整理汇总了C++中TransactionEntry::T310方法的典型用法代码示例。如果您正苦于以下问题:C++ TransactionEntry::T310方法的具体用法?C++ TransactionEntry::T310怎么用?C++ TransactionEntry::T310使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TransactionEntry的用法示例。


在下文中一共展示了TransactionEntry::T310方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: callManagementDispatchGSM

/**
	Process a message received from the phone during a call.
	This function processes all deviations from the "call connected" state.
	For now, we handle call clearing and politely reject everything else.
	@param transaction The transaction record for this call.
	@param LCH The logical channel for the transaction.
	@param message A pointer to the receiver message.
	@return true If the call has been cleared and the channel released.
*/
bool callManagementDispatchGSM(TransactionEntry& transaction, LogicalChannel* LCH, const L3Message *message)
{
	LOG(DEBUG) << "from " << transaction.subscriber() << " message " << *message;

	// FIXME -- This dispatch section should be something more efficient with PD and MTI swtiches.

	// Actually check state before taking action.
	//if (transaction.SIP().state()==SIP::Cleared) return true;
	//if (transaction.Q931State()==TransactionEntry::NullState) return true;

	// Call connection steps.

	// Connect Acknowledge
	if (dynamic_cast<const L3ConnectAcknowledge*>(message)) {
		LOG(INFO) << "GSM Connect Acknowledge " << transaction.subscriber();
		transaction.resetTimers();
		transaction.Q931State(TransactionEntry::Active);
		gTransactionTable.update(transaction);
		return false;
	}

	// Connect
	// GSM 04.08 5.2.2.5 and 5.2.2.6
	if (dynamic_cast<const L3Connect*>(message)) {
		LOG(INFO) << "GSM Connect " << transaction.subscriber();
		transaction.resetTimers();
		transaction.Q931State(TransactionEntry::Active);
		gTransactionTable.update(transaction);
		return false;
	}

	// Call Confirmed
	// GSM 04.08 5.2.2.3.2
	// "Call Confirmed" is the GSM MTC counterpart to "Call Proceeding"
	if (dynamic_cast<const L3CallConfirmed*>(message)) {
		LOG(INFO) << "GSM Call Confirmed " << transaction.subscriber();
		transaction.T303().reset();
		transaction.T310().set();
		transaction.Q931State(TransactionEntry::MTCConfirmed);
		gTransactionTable.update(transaction);
		return false;
	}

	// Alerting
	// GSM 04.08 5.2.2.3.2
	if (dynamic_cast<const L3Alerting*>(message)) {
		LOG(INFO) << "GSM Alerting " << transaction.subscriber();
		transaction.T310().reset();
		transaction.T301().set();
		transaction.Q931State(TransactionEntry::CallReceived);
		gTransactionTable.update(transaction);
		return false;
	}

	// Call clearing steps.
	// Good diagrams in GSM 04.08 7.3.4

	// FIXME -- We should be checking TI values against the transaction object.

	// Disconnect (1st step of MOD)
	// GSM 04.08 5.4.3.2
	if (dynamic_cast<const L3Disconnect*>(message)) {
		LOG(INFO) << "GSM Disconnect " << transaction.subscriber();
		transaction.resetTimers();
		LCH->send(L3Release(1-transaction.TIFlag(),transaction.TIValue()));
		transaction.T308().set();
		transaction.Q931State(TransactionEntry::ReleaseRequest);
		transaction.SIP().MODSendBYE();
		gTransactionTable.update(transaction);
		return false;
	}

	// Release (2nd step of MTD)
	if (dynamic_cast<const L3Release*>(message)) {
		LOG(INFO) << "GSM Release " << transaction.subscriber();
		transaction.resetTimers();
		LCH->send(L3ReleaseComplete(1-transaction.TIFlag(),transaction.TIValue()));
		LCH->send(L3ChannelRelease());
		transaction.Q931State(TransactionEntry::NullState);
		transaction.SIP().MTDSendOK();
		gTransactionTable.update(transaction);
		return true;
	}

	// Release Complete (3nd step of MOD)
	// GSM 04.08 5.4.3.4
	if (dynamic_cast<const L3ReleaseComplete*>(message)) {
		LOG(INFO) << "GSM Release Complete " << transaction.subscriber();
		transaction.resetTimers();
		LCH->send(L3ChannelRelease());
		transaction.Q931State(TransactionEntry::NullState);
//.........这里部分代码省略.........
开发者ID:0x7678,项目名称:openbts-uhd,代码行数:101,代码来源:CallControl.cpp


注:本文中的TransactionEntry::T310方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。