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


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

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


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

示例1: MOCController


//.........这里部分代码省略.........
		SIPState state = transaction.SIP().MOCWaitForOK();
		LOG(DEBUG) << "MOC A: SIP state="<<state;
		switch (state) {
			case SIP::Busy:
				LOG(INFO) << "MOC A: SIP:Busy, abort";
				return abortCall(transaction,TCH,L3Cause(0x11));
			case SIP::Fail:
				LOG(NOTICE) << "MOC A: SIP:Fail, abort";
				return abortCall(transaction,TCH,L3Cause(0x7F));
			case SIP::Ringing:
				LOG(INFO) << "MOC A: SIP:Ringing, send Alerting and move on";
				TCH->send(L3Alerting(1,L3TI));
				transaction.Q931State(TransactionEntry::CallReceived);
				break;
			case SIP::Active:
				LOG(DEBUG) << "MOC A: SIP:Active, move on";
				transaction.Q931State(TransactionEntry::CallReceived);
				break;
			case SIP::Proceeding:
				LOG(DEBUG) << "MOC A: SIP:Proceeding, send progress";
				TCH->send(L3Progress(1,L3TI));
				break;
			case SIP::Timeout:
				LOG(NOTICE) << "MOC A: SIP:Timeout, reinvite";
				state = transaction.SIP().MOCResendINVITE();
				break;
			default:
				LOG(NOTICE) << "MOC A: SIP unexpected state " << state;
				break;
		}
	}
	gTransactionTable.update(transaction);

	// There's a question here of what entity is generating the "patterns"
	// (ringing, busy signal, etc.) during call set-up.  For now, we're ignoring 
	// that question and hoping the phone will make its own ringing pattern.


	// Wait for the SIP session to start.
	// There's a timer on the phone that will initiate clearing if it expires.
	LOG(INFO) << "wait for SIP OKAY";
	SIPState state = transaction.SIP().state();
	while (state!=SIP::Active) {

		LOG(DEBUG) << "wait for SIP session start";
		state = transaction.SIP().MOCWaitForOK();
		LOG(DEBUG) << "SIP state "<< state;

		// check GSM state
		if (updateGSMSignalling(transaction,TCH)) return;
		if (transaction.clearing()) return abortCall(transaction,TCH,L3Cause(0x7F));

		// parse out SIP state
		switch (state) {
			case SIP::Busy:
				// Should this be possible at this point?
				LOG(INFO) << "MOC B: SIP:Busy, abort";
				return abortCall(transaction,TCH,L3Cause(0x11));
			case SIP::Fail:
				LOG(INFO) << "MOC B: SIP:Fail, abort";
				return abortCall(transaction,TCH,L3Cause(0x7F));
			case SIP::Proceeding:
				LOG(DEBUG) << "MOC B: SIP:Proceeding, NOT sending progress";
				//TCH->send(L3Progress(1,L3TI));
				break;
			// For these cases, do nothing.
			case SIP::Timeout:
				// FIXME We should abort if this happens too often.
				// For now, we are relying on the phone, which may have bugs of its own.
			case SIP::Active:
			default:
				break;
		}
	} 
	gTransactionTable.update(transaction);
	
	// Let the phone know the call is connected.
	LOG(INFO) << "sending Connect to handset";
	TCH->send(L3Connect(1,L3TI));
	transaction.T313().set();
	transaction.Q931State(TransactionEntry::ConnectIndication);
	gTransactionTable.update(transaction);

	// The call is open.
	transaction.SIP().MOCInitRTP();
	transaction.SIP().MOCSendACK();

	// Get the Connect Acknowledge message.
	while (transaction.Q931State()!=TransactionEntry::Active) {
		LOG(DEBUG) << "MOC Q.931 state=" << transaction.Q931State();
		if (updateGSMSignalling(transaction,TCH,T313ms)) return abortCall(transaction,TCH,L3Cause(0x7F));
	}

	// At this point, everything is ready to run the call.
	gTransactionTable.update(transaction);
	callManagementLoop(transaction,TCH);

	// The radio link should have been cleared with the call.
	// So just return.
}
开发者ID:0x7678,项目名称:openbts-uhd,代码行数:101,代码来源:CallControl.cpp


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