sipXcallLib home page


Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
CpGhostConnection Class Reference

#include <CpGhostConnection.h>

Inheritance diagram for CpGhostConnection:
Inheritance graph
[legend]
Collaboration diagram for CpGhostConnection:
Collaboration graph
[legend]

Public Member Functions

 CpGhostConnection (CpCallManager *callMgr=NULL, CpCall *call=NULL, const char *callId=NULL)
 
virtual ~CpGhostConnection ()
 
virtual UtlBoolean dequeue ()
 
virtual UtlBoolean dial (const char *dialString, const char *callerId, const char *callId, const char *callController=NULL, const char *originalCallConnection=NULL, UtlBoolean requestQueuedCall=FALSE, const void *pDisplay=NULL, const void *pSecurity=NULL, const char *locationHeader=NULL, const int bandWidth=AUDIO_MICODEC_BW_DEFAULT, UtlBoolean bOnHold=FALSE, const char *originalCallId=NULL, const RTP_TRANSPORT rtpTransportOptions=RTP_TRANSPORT_UDP)
 
virtual UtlBoolean originalCallTransfer (UtlString &transferTargetAddress, const char *transferControllerAddress, const char *targetCallId)
 param: requestQueuedCall - indicates that the caller wishes to have the callee queue the call if busy More...
 
virtual UtlBoolean targetCallBlindTransfer (const char *transferTargetAddress, const char *transferControllerAddress)
 
virtual UtlBoolean transfereeStatus (int connectionState, int response)
 
virtual UtlBoolean transferControllerStatus (int connectionState, int cause)
 
virtual UtlBoolean answer (const void *hWnd=NULL)
 
virtual void outOfFocus ()
 
virtual UtlBoolean hangUp ()
 
virtual UtlBoolean hold ()
 
virtual UtlBoolean reject (int errorCode=0, const char *errorText="")
 
virtual UtlBoolean redirect (const char *forwardAddress)
 
virtual UtlBoolean offHold ()
 
virtual UtlBoolean renegotiateCodecs ()
 
virtual UtlBoolean silentRemoteHold ()
 
virtual UtlBoolean accept (int forwardOnNoAnswerSeconds, const void *pSecurity=NULL, const char *locationHeader=NULL, const int bandWidth=AUDIO_MICODEC_BW_DEFAULT, UtlBoolean sendEarlyMedia=FALSE)
 Accept and incoming INVITE and change from OFFERING to ALERTING state. More...
 
virtual UtlBoolean processMessage (OsMsg &eventMessage)
 
virtual UtlContainableType getContainableType () const
 
virtual UtlBoolean getRemoteAddress (UtlString *remoteAddress) const
 
virtual UtlBoolean getRemoteAddress (UtlString *remoteAddress, UtlBoolean leaveFieldParametersIn) const
 returns: TRUE/FALSE if the connection has an address. The connection may not have an address assigned yet (i.e. if it is not fully setup). More...
 
virtual UtlBoolean getSession (SipSession &session)
 returns: TRUE/FALSE if the connection has an address. The connection may not have an address assigned yet (i.e. if it is not fully setup). More...
 
virtual void getLocalContactAddresses (SIPX_CONTACT_ADDRESS contacts[], size_t nMaxContacts, size_t &nActualContacts)
 Enumerate possible contact addresses. More...
 
virtual void getRemoteUserAgent (UtlString *pUserAgent)
 
virtual UtlBoolean isInstanceOf (const UtlContainableType type) const
 
virtual UtlBoolean willHandleMessage (OsMsg &eventMessage) const
 
virtual UtlBoolean isConnection (const char *callId, const char *toTag, const char *fromTag, UtlBoolean strictCompare) const
 
virtual UtlBoolean isSameRemoteAddress (Url &remoteAddress) const
 
- Public Member Functions inherited from Connection
 Connection (CpCallManager *callMgr=NULL, CpCall *call=NULL, CpMediaInterface *mediaInterface=NULL, int offeringDelayMilliSeconds=IMMEDIATE, int availableBehavior=RING, const char *forwardUnconditionalUrl=NULL, int busyBehavior=BUSY, const char *forwardOnBusyUrl=NULL, int fowardOnNoAnswerSeconds=-1)
 
virtual ~Connection ()
 
virtual void prepareForSplit ()
 
virtual void prepareForJoin (CpCall *pNewCall, const char *szLocalAddress, CpMediaInterface *pNewMediaInterface)
 
virtual void forceHangUp (int connectionState=CONNECTION_DISCONNECTED)
 
virtual UtlBoolean canSendInfo ()
 
virtual UtlBoolean sendInfo (UtlString contentType, UtlString sContent)
 
void setLocalAddress (const char *address)
 
void unimplemented (const char *methodName) const
 
void markForDeletion ()
 
void setMediaInterface (CpMediaInterface *pMediaInterface)
 
CpMediaInterface * getMediaInterfacePtr ()
 
UtlBoolean validStateTransition (SIPX_CALLSTATE_EVENT eFrom, SIPX_CALLSTATE_EVENT eTo)
 
void fireSipXCallEvent (SIPX_CALLSTATE_EVENT eMajor, SIPX_CALLSTATE_CAUSE eMinor, void *pEventData=NULL)
 
void fireSipXSecurityEvent (SIPX_SECURITY_INFO *pEventData)
 
void fireSipXMediaEvent (SIPX_MEDIA_EVENT event, SIPX_MEDIA_CAUSE cause, SIPX_MEDIA_TYPE type, void *pEventData=NULL)
 
void getLocalAddress (UtlString *address)
 
int getState (int isLocal=0) const
 
int getState (int isLocal, int &cause) const
 
int getTerminalState (int isLocal) const
 
int getLocalState () const
 
int getRemoteState () const
 
void getCallId (UtlString *callId)
 
void getCallerId (UtlString *callerId)
 
int getResponseCode ()
 
void getResponseText (UtlString &responseText)
 
int getConnectionId ()
 
OsStatus getDeleteAfter (OsTime &time)
 
void setTransferHeld (UtlBoolean bHeld)
 
const UtlString & getRemoteRtpAddress () const
 
virtual OsStatus getInviteHeaderValue (const char *headerName, int headerIndex, UtlString &headerValue) const
 
UtlBoolean isRemoteCallee ()
 
UtlBoolean remoteRequestedHold ()
 
UtlBoolean isMarkedForDeletion () const
 
UtlBoolean isHeld () const
 
UtlBoolean isHoldInProgress () const
 
UtlBoolean isTransferHeld () const
 
virtual UtlBoolean isLocallyInitiatedRemoteHold () const
 
virtual UtlBoolean isInviteFromThisSide () const
 

Static Public Attributes

static const UtlContainableType TYPE = "CpGhostConnection"
 
- Static Public Attributes inherited from Connection
static const UtlContainableType TYPE = "Connection"
 enumcode: BUSY - indicate to the caller that the phone is busy enumcode: FAKE_RING - indicate to the caller that the phone is ringing, do not alert the callee enumcode: FORCED_ANSWER - put the active call on hold, automatically answer the call, alert the callee and enable the speaker phone enumcode: FORWARD_ON_BUSY - forward the call enumcode: QUEUE_SILENT - indicate to the caller that the call is being queued, do not alert the callee enumcode: QUEUE_ALERT - indicate to the caller that the call is being queued, alert the callee More...
 

Private Member Functions

 CpGhostConnection (const CpGhostConnection &rCpGhostConnection)
 
CpGhostConnectionoperator= (const CpGhostConnection &rhs)
 

Private Attributes

UtlString mRemoteAddress
 

Additional Inherited Members

- Public Types inherited from Connection
enum  connectionStates {
  CONNECTION_IDLE, CONNECTION_QUEUED, CONNECTION_OFFERING, CONNECTION_ALERTING,
  CONNECTION_ESTABLISHED, CONNECTION_FAILED, CONNECTION_DISCONNECTED, CONNECTION_UNKNOWN,
  CONNECTION_INITIATED, CONNECTION_DIALING, CONNECTION_NETWORK_REACHED, CONNECTION_NETWORK_ALERTING
}
 
enum  termConnectionStates {
  TERMCONNECTION_NONE, TERMCONNECTION_HOLDING, TERMCONNECTION_HELD, TERMCONNECTION_TALKING,
  TERMCONNECTION_UNHOLDING
}
 
enum  connectionType { CONNECTION_REMOTE = 0, CONNECTION_LOCAL = 1 }
 
enum  connectionStateCauses {
  CONNECTION_CAUSE_NORMAL, CONNECTION_CAUSE_UNKNOWN, CONNECTION_CAUSE_REDIRECTED, CONNECTION_CAUSE_CALL_PICKUP,
  CONNECTION_CAUSE_UNHOLD, CONNECTION_CAUSE_BUSY, CONNECTION_CAUSE_NETWORK_CONGESTION, CONNECTION_CAUSE_RESOURCES_NOT_AVAILABLE,
  CONNECTION_CAUSE_NETWORK_NOT_OBTAINABLE, CONNECTION_CAUSE_DEST_NOT_OBTAINABLE, CONNECTION_CAUSE_INCOMPATIBLE_DESTINATION, CONNECTION_CAUSE_SERVICE_UNAVAILABLE,
  CONNECTION_CAUSE_NOT_ALLOWED, CONNECTION_CAUSE_NETWORK_NOT_ALLOWED, CONNECTION_CAUSE_CANCELLED, CONNECTION_CAUSE_TRANSFER
}
 
enum  offeringModes { IMMEDIATE = 0, NEVER = -1 }
 
enum  lineAvailableBehaviors {
  RING = 100, FAKE_BUSY, RING_SILENT, AUTO_ANSWER,
  FORWARD_UNCONDITIONAL, FORWARD_ON_NO_ANSWER
}
 
enum  lineBusyBehaviors {
  BUSY = 200, FAKE_RING, FORCED_ANSWER, FORWARD_ON_BUSY,
  QUEUE_SILENT, QUEUE_ALERT
}
 enumcode: RING - make the phone ring to alert the user enumcode: FAKE_BUSY - indicate to the caller that the phone is busy, do not alert the callee enumcode: RING_SILENT - indicate to the caller that the phone is ringing, do not alert the callee enumcode: AUTO_ANSWER - automatically answer the call, alert the callee and enable the speaker phone enumcode: FORWARD_UNCONDITIONAL - forward the call even though the phone is available More...
 
- Static Public Member Functions inherited from Connection
static void getStateString (int state, UtlString *stateLabel)
 
static UtlBoolean isStateTransitionAllowed (int newState, int oldState)
 
- Protected Member Functions inherited from Connection
void setState (int newState, int isLocal, int cause=CONNECTION_CAUSE_NORMAL, int termState=-1)
 
void setTerminalConnectionState (int newState, int isLocal, int cause=CONNECTION_CAUSE_NORMAL)
 
virtual void setOfferingTimer (int milliSeconds)
 
virtual void setRingingTimer (int seconds)
 
void postTaoListenerMessage (int state, int newCause, int isLocal=0)
 
void setCallId (const char *callId)
 
void setCallerId (const char *callId)
 
- Protected Attributes inherited from Connection
int mOfferingDelay
 
int mLineAvailableBehavior
 
UtlString mForwardUnconditional
 
int mLineBusyBehavior
 
UtlString mForwardOnBusy
 
int mForwardOnNoAnswerSeconds
 
CpCallManagermpCallManager
 
CpCallmpCall
 
CpMediaInterface * mpMediaInterface
 
int mConnectionId
 
UtlBoolean mRemoteIsCallee
 
UtlBoolean mRemoteRequestedHold
 
UtlString mLastToAddress
 
UtlString remoteRtpAddress
 
int remoteRtpPort
 
int remoteRtcpPort
 
int remoteVideoRtpPort
 
int remoteVideoRtcpPort
 
int mLocalConnectionState
 
int mRemoteConnectionState
 
int mConnectionStateCause
 
int mTerminalConnState
 
int mHoldState
 
int mResponseCode
 
UtlString mResponseText
 
UtlString mLocalAddress
 
UtlString mOriginalCallConnectionAddress
 
UtlString mTargetCallConnectionAddress
 
UtlString mTargetCallId
 

Constructor & Destructor Documentation

CpGhostConnection ( CpCallManager callMgr = NULL,
CpCall call = NULL,
const char *  callId = NULL 
)
~CpGhostConnection ( )
virtual
CpGhostConnection ( const CpGhostConnection rCpGhostConnection)
private

Member Function Documentation

UtlBoolean accept ( int  forwardOnNoAnswerTimeOut,
const void *  pSecurity = NULL,
const char *  locationHeader = NULL,
const int  bandWidth = AUDIO_MICODEC_BW_DEFAULT,
UtlBoolean  sendEarlyMedia = FALSE 
)
virtual

Accept and incoming INVITE and change from OFFERING to ALERTING state.

Parameters
sendEarlyMedia- send early media (startRTPSend and send SDP in 183)

Implements Connection.

UtlBoolean answer ( const void *  hWnd = NULL)
virtual

Implements Connection.

UtlBoolean dequeue ( )
virtual

Implements Connection.

UtlBoolean dial ( const char *  dialString,
const char *  callerId,
const char *  callId,
const char *  callController = NULL,
const char *  originalCallConnection = NULL,
UtlBoolean  requestQueuedCall = FALSE,
const void *  pDisplay = NULL,
const void *  pSecurity = NULL,
const char *  locationHeader = NULL,
const int  bandWidth = AUDIO_MICODEC_BW_DEFAULT,
UtlBoolean  bOnHold = FALSE,
const char *  originalCallId = NULL,
const RTP_TRANSPORT  rtpTransportOptions = RTP_TRANSPORT_UDP 
)
virtual

Implements Connection.

UtlContainableType getContainableType ( ) const
virtual

Reimplemented from Connection.

void getLocalContactAddresses ( SIPX_CONTACT_ADDRESS  contacts[],
size_t  nMaxContacts,
size_t &  nActualContacts 
)
virtual

Enumerate possible contact addresses.

UtlBoolean getRemoteAddress ( UtlString *  remoteAddress) const
virtual

Implements Connection.

UtlBoolean getRemoteAddress ( UtlString *  remoteAddress,
UtlBoolean  leaveFieldParametersIn 
) const
virtual

returns: TRUE/FALSE if the connection has an address. The connection may not have an address assigned yet (i.e. if it is not fully setup).

Implements Connection.

void getRemoteUserAgent ( UtlString *  pUserAgent)
virtual

Implements Connection.

UtlBoolean getSession ( SipSession &  session)
virtual

returns: TRUE/FALSE if the connection has an address. The connection may not have an address assigned yet (i.e. if it is not fully setup).

Implements Connection.

UtlBoolean hangUp ( )
virtual

SIPXTAPI: TBD

SIPXTAPI: TBD

Implements Connection.

UtlBoolean hold ( )
virtual

Implements Connection.

UtlBoolean isConnection ( const char *  callId,
const char *  toTag,
const char *  fromTag,
UtlBoolean  strictCompare 
) const
virtual

Implements Connection.

UtlBoolean isInstanceOf ( const UtlContainableType  type) const
virtual

Reimplemented from Connection.

UtlBoolean isSameRemoteAddress ( Url &  remoteAddress) const
virtual

Implements Connection.

UtlBoolean offHold ( )
virtual

Implements Connection.

CpGhostConnection & operator= ( const CpGhostConnection rhs)
private
UtlBoolean originalCallTransfer ( UtlString &  transferTargetAddress,
const char *  transferControllerAddress,
const char *  targetCallId 
)
virtual

param: requestQueuedCall - indicates that the caller wishes to have the callee queue the call if busy

Implements Connection.

void outOfFocus ( )
virtual

Implements Connection.

UtlBoolean processMessage ( OsMsg &  eventMessage)
virtual

Implements Connection.

UtlBoolean redirect ( const char *  forwardAddress)
virtual

Implements Connection.

UtlBoolean reject ( int  errorCode = 0,
const char *  errorText = "" 
)
virtual

Implements Connection.

UtlBoolean renegotiateCodecs ( )
virtual

Implements Connection.

UtlBoolean silentRemoteHold ( )
virtual

Implements Connection.

UtlBoolean targetCallBlindTransfer ( const char *  transferTargetAddress,
const char *  transferControllerAddress 
)
virtual

SIPXTAPI: TBD

Implements Connection.

UtlBoolean transferControllerStatus ( int  connectionState,
int  cause 
)
virtual

SIPXTAPI: TBD

SIPXTAPI: TBD

Implements Connection.

UtlBoolean transfereeStatus ( int  connectionState,
int  response 
)
virtual

Implements Connection.

UtlBoolean willHandleMessage ( OsMsg &  eventMessage) const
virtual

Implements Connection.

Member Data Documentation

UtlString mRemoteAddress
private
const UtlContainableType TYPE = "CpGhostConnection"
static