sipXcallLib home page


Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends | List of all members
PtCall Class Reference

#include <PtCall.h>

Collaboration diagram for PtCall:
Collaboration graph
[legend]

Public Types

enum  CallState { IDLE, ACTIVE, INVALID }
 

Public Member Functions

 PtCall ()
 
 PtCall (TaoClientTask *pClient, const char *callId)
 
 PtCall (const char *callId)
 
 PtCall (const PtCall &rPtCall)
 
virtual ~PtCall ()
 
PtCall & operator= (const PtCall &rhs)
 
virtual PtStatus addCallListener (PtCallListener &rCallListener)
 
virtual PtStatus addParty (const char *newPartyURL, PtSessionDesc *pSessionDesc, PtConnection &rConnection)
 param: (in) rCallListener - The listener to add to this call retcode: PT_SUCCESS - Success retcode: PT_EXISTS - rCallListener is already registered retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus conference (PtCall &rOtherCall)
 param: (in) newPartyURL - Address of the party to add to this call param: (in) pSessionDesc - Pointer to the requested attributes for the new connection or NULL to use defaults param: (out) rpConnection - Set to point to the PtConnection associated with the new party retcode: PT_SUCCESS - Success retcode: PT_INVALID_PARTY - Invalid newPartyURL retcode: PT_INVALID_STATE - The call is either not ACTIVE or has fewer than two ESTABLISHED PtConnections retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus connect (PtTerminal &rTerminal, PtAddress &rAddress, const char *destinationURL, PtSessionDesc *pSessionDesc)
 param: (in) rOtherCall - The PtCall object whose participants will be moved to this PtCall retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The rOtherCall object is not valid for the conference retcode: PT_INVALID_STATE - The call is either not ACTIVE or the conference controllers are not in the proper state retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus consult (PtTerminalConnection &rTerminalConnection, const char *destinationURL, PtSessionDesc *pSessionDesc, PtConnection &rSrcConnection, PtConnection &rDstConnection)
 param: (in) rTerminal - The originating terminal param: (in) rAddress - The originating address param: (in) destinationURL - The intended destination for the call param: (in) pSessionDesc - Pointer to the requested attributes for the new connection or NULL to use defaults retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - Bad rTerminal, rAddress or rSessionDesc argument retcode: PT_INVALID_PARTY - Invalid destinationURL retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus drop (void)
 param: (in) rTerminalConnection - The terminal connection used to obtain the originating terminal param: (in) destinationURL - The intended destination for the new call param: (in) pSessionDesc - Pointer to the requested attributes for the new connection or NULL to use defaults param: (out) rpSrcConnection - Set to point to the PtConnection for the origination of the call param: (out) rpDstConnection - Set to point to the PtConnection for the termination of the call retcode: PT_SUCCESS - Success retcode: PT_INVALID_PARTY - Invalid destinationURL retcode: PT_INVALID_STATE - The call associated with rTerminalConnection is not ACTIVE retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus removeCallListener (PtCallListener &rCallListener)
 retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus setConferenceController (PtTerminalConnection *pController)
 param: (in) rCallListener - The listener to remove from this call retcode: PT_SUCCESS - Success retcode: PT_NOT_FOUND - rCallListener not registered retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus setTransferController (PtTerminalConnection *pController)
 param: pController - The terminal connection to use as a conference controller for this call retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The indicated terminal connection is not part of this call retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus transfer (PtCall &rOtherCall)
 param: pController - The terminal connection to use as a transfer controller for this call retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The indicated terminal connection is not part of this call retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus transfer (const char *destinationURL, PtSessionDesc *pSessionDesc, PtConnection &rNewConnection, int transferType=CpCallManager::CP_BLIND_TRANSFER)
 param: (in) rOtherCall - The PtCall object whose participants will be moved to this PtCall retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The rOtherCall object is not valid for the transfer retcode: PT_INVALID_STATE - The call is either not ACTIVE or the conference controllers are not in the proper state retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus hold (UtlBoolean bBridgeParticipants=TRUE)
 param: (in) destinationURL - The intended destination for the new call param: (in) pSessionDesc - Pointer to the requested attributes for the new call or NULL to use defaults param: (out) rNewConnection - Set to point to the PtConnection that the participants have been moved to param: (in) transferType - CP_BLIND_TRANSFER or CP_SINGLE_CALL_TRANSFER retcode: PT_SUCCESS - Success retcode: PT_INVALID_PARTY - Invalid destinationURL retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus unhold (UtlBoolean bRemoteParticipants=TRUE)
 param (in): bBridgeParticipants - Controls whether participants are More...
 
virtual PtStatus setCodecCPULimit (const int limit, const UtlBoolean bAutoRenegotiate=TRUE)
 param (in) bRemoteParticipants - Controls whether all particpants More...
 
virtual PtStatus forceCodecRenegotiation ()
 param (in) limit - The codec/CPU limit for this call. The value can More...
 
virtual PtStatus getCallListeners (PtCallListener *callListeners[], int size, int &rNumItems)
 retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing More...
 
virtual PtStatus getCalledAddress (PtAddress &rAddress)
 param: (out) callListeners - The array of pointers to known call listeners param: (in) size - The number of elements in the callListeners array param: (out) rNumItems - The number of items assigned retcode: PT_SUCCESS - Success retcode: PT_MORE_DATA - There are more than size listeners retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getCallingAddress (PtAddress &rAddress)
 param: (out) rAddress - Set to point to the called PtAddress for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getCallingTerminal (PtTerminal &rTerminal)
 param: (out) rAddress - Set to point to the calling PtAddress for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getConferenceController (PtTerminalConnection &rController)
 param: (out) rpTerminal - Set to point to the calling PtTerminal for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getConnections (PtConnection connections[], int size, int &rNumItems)
 param: (out) rpController - Set to point to the conference controller for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getLastRedirectedAddress (PtAddress &rAddress)
 param: (out) connections - The array of PtConnection pointers param: (in) size - The number of elements in the connections array param: (out) rNumItems - The number of items assigned retcode: PT_SUCCESS - Success retcode: PT_MORE_DATA - There are more than size connections retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getProvider (PtProvider &rProvider)
 param: (out) rpAddress - Set to point to the last redirected PtAddress for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getState (int &rState)
 param: (out) rpProvider - a pointer to the PtProvider object associated with this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
PtStatus getCallId (char *callId, int len)
 retcode: IDLE - Initial state for a call retcode: ACTIVITY - Call with one or more connections retcode: INVALID - Call that is no longer valid (and has zero connections) More...
 
virtual PtStatus getTransferController (PtTerminalConnection &rController)
 retcode: IDLE - Initial state for a call retcode: ACTIVITY - Call with one or more connections retcode: INVALID - Call that is no longer valid (and has zero connections) More...
 
virtual PtStatus numConnections (int &rCount)
 param: (out) rpController - Set to point to the transfer controller for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus numCallListeners (int &rCount)
 param: (out) rCount - The number of connections associated with this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getCodecCPUCost (int &cost)
 param: (out) rCount - The number of call listeners associated with this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getCodecCPULimit (int &cost)
 param (out) cost - The cpu cost of the currently negotiated and More...
 

Protected Member Functions

void initialize ()
 

Protected Attributes

UtlString mCallId
 
char mState
 
PtTerminalConnection * mpConfController
 
TaoClientTask * mpClient
 
OsTime mTimeOut
 

Static Protected Attributes

static OsBSem semInit
 
static TaoReference * mpTransactionCnt = 0
 
static int mRef = 0
 

Private Attributes

OsProtectEventMgr * mpEventMgr
 

Friends

class PtCallEvent
 param (out) cost - The cpu cost of the currently negotiated and More...
 

Member Enumeration Documentation

enum CallState
Enumerator
IDLE 
ACTIVE 
INVALID 

Constructor & Destructor Documentation

PtCall ( )
PtCall ( TaoClientTask *  pClient,
const char *  callId 
)
PtCall ( const char *  callId)
PtCall ( const PtCall &  rPtCall)
~PtCall ( )
virtual

Member Function Documentation

PtStatus addCallListener ( PtCallListener &  rCallListener)
virtual
PtStatus addParty ( const char *  newPartyURL,
PtSessionDesc *  pSessionDesc,
PtConnection &  rConnection 
)
virtual

param: (in) rCallListener - The listener to add to this call retcode: PT_SUCCESS - Success retcode: PT_EXISTS - rCallListener is already registered retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus conference ( PtCall &  rOtherCall)
virtual

param: (in) newPartyURL - Address of the party to add to this call param: (in) pSessionDesc - Pointer to the requested attributes for the new connection or NULL to use defaults param: (out) rpConnection - Set to point to the PtConnection associated with the new party retcode: PT_SUCCESS - Success retcode: PT_INVALID_PARTY - Invalid newPartyURL retcode: PT_INVALID_STATE - The call is either not ACTIVE or has fewer than two ESTABLISHED PtConnections retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus connect ( PtTerminal &  rTerminal,
PtAddress &  rAddress,
const char *  destinationURL,
PtSessionDesc *  pSessionDesc 
)
virtual

param: (in) rOtherCall - The PtCall object whose participants will be moved to this PtCall retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The rOtherCall object is not valid for the conference retcode: PT_INVALID_STATE - The call is either not ACTIVE or the conference controllers are not in the proper state retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus consult ( PtTerminalConnection &  rTerminalConnection,
const char *  destinationURL,
PtSessionDesc *  pSessionDesc,
PtConnection &  rSrcConnection,
PtConnection &  rDstConnection 
)
virtual

param: (in) rTerminal - The originating terminal param: (in) rAddress - The originating address param: (in) destinationURL - The intended destination for the call param: (in) pSessionDesc - Pointer to the requested attributes for the new connection or NULL to use defaults retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - Bad rTerminal, rAddress or rSessionDesc argument retcode: PT_INVALID_PARTY - Invalid destinationURL retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus drop ( void  )
virtual

param: (in) rTerminalConnection - The terminal connection used to obtain the originating terminal param: (in) destinationURL - The intended destination for the new call param: (in) pSessionDesc - Pointer to the requested attributes for the new connection or NULL to use defaults param: (out) rpSrcConnection - Set to point to the PtConnection for the origination of the call param: (out) rpDstConnection - Set to point to the PtConnection for the termination of the call retcode: PT_SUCCESS - Success retcode: PT_INVALID_PARTY - Invalid destinationURL retcode: PT_INVALID_STATE - The call associated with rTerminalConnection is not ACTIVE retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus forceCodecRenegotiation ( )
virtual

param (in) limit - The codec/CPU limit for this call. The value can

param (in) bAutoRenegotiate - Defines if call call processiong should retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing

PtStatus getCalledAddress ( PtAddress &  rAddress)
virtual

param: (out) callListeners - The array of pointers to known call listeners param: (in) size - The number of elements in the callListeners array param: (out) rNumItems - The number of items assigned retcode: PT_SUCCESS - Success retcode: PT_MORE_DATA - There are more than size listeners retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getCallId ( char *  callId,
int  len 
)

retcode: IDLE - Initial state for a call retcode: ACTIVITY - Call with one or more connections retcode: INVALID - Call that is no longer valid (and has zero connections)

PtStatus getCallingAddress ( PtAddress &  rAddress)
virtual

param: (out) rAddress - Set to point to the called PtAddress for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getCallingTerminal ( PtTerminal &  rTerminal)
virtual

param: (out) rAddress - Set to point to the calling PtAddress for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getCallListeners ( PtCallListener *  callListeners[],
int  size,
int &  rNumItems 
)
virtual

retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing

PtStatus getCodecCPUCost ( int &  cost)
virtual

param: (out) rCount - The number of call listeners associated with this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getCodecCPULimit ( int &  cost)
virtual

param (out) cost - The cpu cost of the currently negotiated and

retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing

PtStatus getConferenceController ( PtTerminalConnection &  rController)
virtual

param: (out) rpTerminal - Set to point to the calling PtTerminal for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getConnections ( PtConnection  connections[],
int  size,
int &  rNumItems 
)
virtual

param: (out) rpController - Set to point to the conference controller for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getLastRedirectedAddress ( PtAddress &  rAddress)
virtual

param: (out) connections - The array of PtConnection pointers param: (in) size - The number of elements in the connections array param: (out) rNumItems - The number of items assigned retcode: PT_SUCCESS - Success retcode: PT_MORE_DATA - There are more than size connections retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getProvider ( PtProvider &  rProvider)
virtual

param: (out) rpAddress - Set to point to the last redirected PtAddress for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getState ( int &  rState)
virtual

param: (out) rpProvider - a pointer to the PtProvider object associated with this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getTransferController ( PtTerminalConnection &  rController)
virtual

retcode: IDLE - Initial state for a call retcode: ACTIVITY - Call with one or more connections retcode: INVALID - Call that is no longer valid (and has zero connections)

PtStatus hold ( UtlBoolean  bBridgeParticipants = TRUE)
virtual

param: (in) destinationURL - The intended destination for the new call param: (in) pSessionDesc - Pointer to the requested attributes for the new call or NULL to use defaults param: (out) rNewConnection - Set to point to the PtConnection that the participants have been moved to param: (in) transferType - CP_BLIND_TRANSFER or CP_SINGLE_CALL_TRANSFER retcode: PT_SUCCESS - Success retcode: PT_INVALID_PARTY - Invalid destinationURL retcode: PT_RESOURCE_UNAVAILABLE - Insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

void initialize ( )
protected
PtStatus numCallListeners ( int &  rCount)
virtual

param: (out) rCount - The number of connections associated with this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus numConnections ( int &  rCount)
virtual

param: (out) rpController - Set to point to the transfer controller for this call retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtCall & operator= ( const PtCall &  rhs)
PtStatus removeCallListener ( PtCallListener &  rCallListener)
virtual

retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus setCodecCPULimit ( const int  limit,
const UtlBoolean  bAutoRenegotiate = TRUE 
)
virtual

param (in) bRemoteParticipants - Controls whether all particpants

retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing

PtStatus setConferenceController ( PtTerminalConnection *  pController)
virtual

param: (in) rCallListener - The listener to remove from this call retcode: PT_SUCCESS - Success retcode: PT_NOT_FOUND - rCallListener not registered retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus setTransferController ( PtTerminalConnection *  pController)
virtual

param: pController - The terminal connection to use as a conference controller for this call retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The indicated terminal connection is not part of this call retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus transfer ( PtCall &  rOtherCall)
virtual

param: pController - The terminal connection to use as a transfer controller for this call retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The indicated terminal connection is not part of this call retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus transfer ( const char *  destinationURL,
PtSessionDesc *  pSessionDesc,
PtConnection &  rNewConnection,
int  transferType = CpCallManager::CP_BLIND_TRANSFER 
)
virtual

param: (in) rOtherCall - The PtCall object whose participants will be moved to this PtCall retcode: PT_SUCCESS - Success retcode: PT_INVALID_ARGUMENT - The rOtherCall object is not valid for the transfer retcode: PT_INVALID_STATE - The call is either not ACTIVE or the conference controllers are not in the proper state retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus unhold ( UtlBoolean  bRemoteParticipants = TRUE)
virtual

param (in): bBridgeParticipants - Controls whether participants are

retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing

Friends And Related Function Documentation

friend class PtCallEvent
friend

param (out) cost - The cpu cost of the currently negotiated and

retcode: PT_SUCCESS - Success retcode: PT_BUSY - Unable to communicate with call processing

Member Data Documentation

UtlString mCallId
protected
TaoClientTask* mpClient
protected
PtTerminalConnection* mpConfController
protected
OsProtectEventMgr* mpEventMgr
private
TaoReference * mpTransactionCnt = 0
staticprotected
int mRef = 0
staticprotected
char mState
protected
OsTime mTimeOut
protected
OsBSem semInit
staticprotected