CAF: Working With Caf Call Legs

From TBwiki
(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
  
 
    
 
    
'''CAF Call leg (''CTBCAFCallLeg''):'''
+
=== CAF Call leg (''CTBCAFCallLeg''): ===
 
    
 
    
 
The ''CTBCAFCallLeg'' class is a wrapper around the ''CTBCMCLeg'' object. It's enhancing the ''CTBCMCLeg'' object so multiple call legs can be grouped and managed together from a parent Call object (''CTBCAFCallFlow'').
 
The ''CTBCAFCallLeg'' class is a wrapper around the ''CTBCMCLeg'' object. It's enhancing the ''CTBCMCLeg'' object so multiple call legs can be grouped and managed together from a parent Call object (''CTBCAFCallFlow'').
  
'''CAF Call Flow (''CTBCAFCallFlow''):'''
+
=== CAF Call Flow (''CTBCAFCallFlow''): ===
 
    
 
    
 
The ''CTBCAFCallFlow'' base class contains one or multiple ''CTBCAFCallLeg'' objects. The role of the ''CTBCAFCallFlow'' object is to implement a call flow that involves actions on legs that have a relation with each other.
 
The ''CTBCAFCallFlow'' base class contains one or multiple ''CTBCAFCallLeg'' objects. The role of the ''CTBCAFCallFlow'' object is to implement a call flow that involves actions on legs that have a relation with each other.
 
    
 
    
'''CAF Call Bridge (''CTBCAFBridge'', based on ''CTBCAFCallFlow''):'''
+
=== CAF Call Bridge (''CTBCAFBridge'', based on ''CTBCAFCallFlow''): ===
 
    
 
    
 
A typical implementation of a call flow is the ''CTBCAFBridge'' class (based on the ''CTBCAFCallFlow'' base class). This class is designed to
 
A typical implementation of a call flow is the ''CTBCAFBridge'' class (based on the ''CTBCAFCallFlow'' base class). This class is designed to
Line 18: Line 18:
 
- Terminate both of them when one leg hangups.
 
- Terminate both of them when one leg hangups.
  
'''CAF Call Behavior (''CTBCAFCallBehavior''):'''
+
=== CAF Call Behavior (''CTBCAFCallBehavior''): ===
 
   
 
   
 
Behaviors ''CTBCAFCallBehavior'' can be attached to a call flow (''CTBCAFCallFlow''). Their role is to modify the basic call flow, decorating it with optional functionality (CDR logging, FAX detection, Ring tone playback, etc.)
 
Behaviors ''CTBCAFCallBehavior'' can be attached to a call flow (''CTBCAFCallFlow''). Their role is to modify the basic call flow, decorating it with optional functionality (CDR logging, FAX detection, Ring tone playback, etc.)
Line 26: Line 26:
 
The call flow can perform various actions on each of it's call legs. Here is a list of the actions available on the CTBCAFCallLeg objects (please refer to the header files CTBCMCLeg.hpp for more information on each of these functions).
 
The call flow can perform various actions on each of it's call legs. Here is a list of the actions available on the CTBCAFCallLeg objects (please refer to the header files CTBCMCLeg.hpp for more information on each of these functions).
 
    
 
    
Asynchronous actions that send messages to toolpack_engine application:
+
=== Asynchronous actions that send messages to toolpack_engine application: ===
Controlling call flow:
+
==== Controlling call flow: ====
 
  - AcceptCall()
 
  - AcceptCall()
 
  - AlertCall()
 
  - AlertCall()
Line 40: Line 40:
 
  - CallTransferResponse()
 
  - CallTransferResponse()
  
Playing/recording audio
+
==== Playing/recording audio ====
 
  - PlayStream()
 
  - PlayStream()
 
  - RecordStream()
 
  - RecordStream()
Line 47: Line 47:
 
  - StopStream()
 
  - StopStream()
  
Digits (tone) and events:
+
==== Digits (tone) and events: ====
 
  - PlayDigit()
 
  - PlayDigit()
 
  - StartDigitCollection()
 
  - StartDigitCollection()
Line 56: Line 56:
 
  - StopEventCollection()
 
  - StopEventCollection()
  
Controlling profile or stats:
+
==== Controlling profile or stats: ====
 
  - SetProfile()
 
  - SetProfile()
 
  - ChangeProfile()
 
  - ChangeProfile()
Line 62: Line 62:
  
  
States can be queried instantly:
+
=== States can be queried instantly: ===
 
  IsTerminating()
 
  IsTerminating()
 
  IsAccepted()
 
  IsAccepted()
Line 70: Line 70:
 
  IsJoined()
 
  IsJoined()
  
Call information can be queried instantly:
+
=== Call information can be queried instantly: ===
 
  GetLegId()
 
  GetLegId()
 
  GetLinkId()
 
  GetLinkId()
Line 80: Line 80:
 
== Events received from call legs by the CTBCAFCallFlow object ==
 
== Events received from call legs by the CTBCAFCallFlow object ==
  
Initialization and termination of call leg objects:
+
==== Initialization and termination of call leg objects: ====
 
  - OnInitIncomingCallLeg()
 
  - OnInitIncomingCallLeg()
 
  - OnInitOutgoingCallLeg()
 
  - OnInitOutgoingCallLeg()
 
  - OnLegFreed()
 
  - OnLegFreed()
  
Controlling call flow:
+
==== Controlling call flow: ====
 
  - OnCallLegAccepted()
 
  - OnCallLegAccepted()
 
  - OnCallLegAlerting()
 
  - OnCallLegAlerting()
Line 99: Line 99:
 
  - OnCallLegTransferResponse()
 
  - OnCallLegTransferResponse()
  
Re-synchronization with toolpack_engine:
+
==== Re-synchronization with toolpack_engine: ====
 
  - OnSyncDone()
 
  - OnSyncDone()
 
  - OnSyncLost()
 
  - OnSyncLost()
  
Timers or custom events:
+
==== Timers or custom events: ====
 
  - OnLegEvent()
 
  - OnLegEvent()
  
Errors detected by toolpack_engine:
+
==== Errors detected by toolpack_engine: ====
 
  - OnLegError()
 
  - OnLegError()
  
Playing/recording audio
+
==== Playing/recording audio ====
 
  - OnStreamPlayingDone()
 
  - OnStreamPlayingDone()
 
  - OnStreamRecordingDone()
 
  - OnStreamRecordingDone()
  
Digits (tone) and events:
+
==== Digits (tone) and events: ====
 
  - OnDigitPlayingDone()
 
  - OnDigitPlayingDone()
 
  - OnDigitCollected()
 
  - OnDigitCollected()

Revision as of 12:24, 7 April 2011

Contents

Overview

CAF Call leg (CTBCAFCallLeg):

The CTBCAFCallLeg class is a wrapper around the CTBCMCLeg object. It's enhancing the CTBCMCLeg object so multiple call legs can be grouped and managed together from a parent Call object (CTBCAFCallFlow).

CAF Call Flow (CTBCAFCallFlow):

The CTBCAFCallFlow base class contains one or multiple CTBCAFCallLeg objects. The role of the CTBCAFCallFlow object is to implement a call flow that involves actions on legs that have a relation with each other.

CAF Call Bridge (CTBCAFBridge, based on CTBCAFCallFlow):

A typical implementation of a call flow is the CTBCAFBridge class (based on the CTBCAFCallFlow base class). This class is designed to - Receive an incoming call - Make a corresponding outgoing call - Join them together - Terminate both of them when one leg hangups.

CAF Call Behavior (CTBCAFCallBehavior):

Behaviors CTBCAFCallBehavior can be attached to a call flow (CTBCAFCallFlow). Their role is to modify the basic call flow, decorating it with optional functionality (CDR logging, FAX detection, Ring tone playback, etc.)


Actions on call legs

The call flow can perform various actions on each of it's call legs. Here is a list of the actions available on the CTBCAFCallLeg objects (please refer to the header files CTBCMCLeg.hpp for more information on each of these functions).

Asynchronous actions that send messages to toolpack_engine application:

Controlling call flow:

- AcceptCall()
- AlertCall()
- AnswerCall()
- ProgressCall()
- SendCallSuppInfo()
- Join()
- Unjoin()
- TerminateCall()
- CallTransferRequest()
- CallTransferProgress()
- CallTransferResponse()

Playing/recording audio

- PlayStream()
- RecordStream()
- PauseStream()
- ResumeStream()
- StopStream()

Digits (tone) and events:

- PlayDigit()
- StartDigitCollection()
- StopDigitCollection()
- PlayEvent()
- CancelEvent()
- StartEventCollection()
- StopEventCollection()

Controlling profile or stats:

- SetProfile()
- ChangeProfile()
- GetStats()


States can be queried instantly:

IsTerminating()
IsAccepted()
IsAlerted()
IsAnswered()
IsSynchronized()
IsJoined()

Call information can be queried instantly:

GetLegId()
GetLinkId()
GetAttributes()
GetProfile()
GetJoinAttributes()


Events received from call legs by the CTBCAFCallFlow object

Initialization and termination of call leg objects:

- OnInitIncomingCallLeg()
- OnInitOutgoingCallLeg()
- OnLegFreed()

Controlling call flow:

- OnCallLegAccepted()
- OnCallLegAlerting()
- OnCallLegAnswered()
- OnCallLegSuppInfo()
- OnLegJoinDone()
- OnLegUnjoinDone()
- OnCallLegTerminatingIndication()
- OnCallLegTerminated()
- OnLegTerminated()
- OnCallLegTransferRequest()
- OnCallLegTransferProgress()
- OnCallLegTransferResponse()

Re-synchronization with toolpack_engine:

- OnSyncDone()
- OnSyncLost()

Timers or custom events:

- OnLegEvent()

Errors detected by toolpack_engine:

- OnLegError()

Playing/recording audio

- OnStreamPlayingDone()
- OnStreamRecordingDone()

Digits (tone) and events:

- OnDigitPlayingDone()
- OnDigitCollected()
- OnEventPlayingDone()
- OnEventCollected()

Controlling profile or stats:

- OnLegProfileChanged()
- OnLegStatsUpdated()
Personal tools