Do not confuse a call leg with a call . A call leg represents one full-duplex link to a party whilea call represents the agglomeration of multiple (two or more) call legs. For example, a bridge is a form of call that
uses two call legs.
二:
Do not confuse the base class CTBCMCLeg with the class CTBCAFCallLeg. The later is a class used by the
ITBCAFCallFlow interface when dealing with multiple legs. It is designed to represent a leg within a call. It cannot be instanciated as a standalone object. Therefore, the above example used the CTBCMCLeg.
注 above example 指的是 make outgoing call
三 : 有各種不同的函數(shù)檢查當前callleg的狀態(tài) , 例如 TBX_BOOL IsAccepted(); TBX_BOOL IsAlerted(); TBX_BOOL IsAnswered();
其中2個重要的函數(shù)是
TBX_BOOL IsPlayingStream();和
TBX_BOOL IsRecordingStream();可以檢查callleg當前是不是正在播放stream或者錄音。
---------------
還有2個函數(shù)不解, 是 TBX_BOOL IsPlayingDigit(); 和 TBX_BOOL IsPlayingEvent();
Digit怎么play ?
------
virtual TBX_VOID OnLegEvent( PITBCMCLegEvent in_pEvent ); 此函數(shù)用于處理用戶事件
virtual TBX_VOID OnStreamPlayingDone( TBCMC_IVR_REASON_CODE in_Reason ); 當prompt播放完畢
virtual TBX_VOID OnStreamRecordingDone( TBCMC_IVR_REASON_CODE in_Reason ); 當 錄音結束 , 這里有個問題, 錄音時并沒有設置錄音時間的選項,那么何時才結束錄音?
TBX_RESULT StopDigitCollection( PITBCMCErrorListener in_pErrorListener = NULL ); 啟動按鍵收集
TBX_RESULT PlayEvent( CTBCMC_EVENT_ATTRIBUTE & in_Events, PITBCMCErrorListener in_pErrorListener = NULL ); 播發(fā)一段tone在leg上