#include <Connection.h>
Public Member Functions | |
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 | dequeue ()=0 |
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)=0 |
virtual UtlBoolean | originalCallTransfer (UtlString &transferTargetAddress, const char *transferControllerAddress, const char *targetCallId)=0 |
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)=0 |
virtual UtlBoolean | transfereeStatus (int connectionState, int response)=0 |
virtual UtlBoolean | transferControllerStatus (int connectionState, int response)=0 |
virtual void | outOfFocus ()=0 |
virtual UtlBoolean | answer (const void *hWnd=NULL)=0 |
virtual UtlBoolean | hangUp ()=0 |
virtual UtlBoolean | hold ()=0 |
virtual UtlBoolean | offHold ()=0 |
virtual UtlBoolean | renegotiateCodecs ()=0 |
virtual UtlBoolean | silentRemoteHold ()=0 |
virtual UtlBoolean | accept (int forwardOnNoAnswerTimeOut, const void *pSecurity=NULL, const char *locationHeader=NULL, const int bandWidth=AUDIO_MICODEC_BW_DEFAULT, UtlBoolean sendEarlyMedia=FALSE)=0 |
Accept and incoming INVITE and change from OFFERING to ALERTING state. More... | |
virtual UtlBoolean | reject (int errorCode=0, const char *errorText="")=0 |
virtual UtlBoolean | redirect (const char *forwardAddress)=0 |
virtual UtlBoolean | processMessage (OsMsg &eventMessage)=0 |
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) |
virtual UtlContainableType | getContainableType () const |
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) |
virtual UtlBoolean | getRemoteAddress (UtlString *remoteAddress) const =0 |
virtual UtlBoolean | getRemoteAddress (UtlString *remoteAddress, UtlBoolean leaveFieldParametersIn) const =0 |
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 &sessioon)=0 |
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... | |
int | getResponseCode () |
void | getResponseText (UtlString &responseText) |
int | getConnectionId () |
OsStatus | getDeleteAfter (OsTime &time) |
void | setTransferHeld (UtlBoolean bHeld) |
const UtlString & | getRemoteRtpAddress () const |
virtual void | getRemoteUserAgent (UtlString *pUserAgent)=0 |
virtual OsStatus | getInviteHeaderValue (const char *headerName, int headerIndex, UtlString &headerValue) const |
virtual UtlBoolean | isInstanceOf (const UtlContainableType type) const |
UtlBoolean | isRemoteCallee () |
UtlBoolean | remoteRequestedHold () |
virtual UtlBoolean | willHandleMessage (OsMsg &eventMessage) const =0 |
virtual UtlBoolean | isConnection (const char *callId, const char *toTag, const char *fromTag, UtlBoolean strictCompare) const =0 |
virtual UtlBoolean | isSameRemoteAddress (Url &remoteAddress) const =0 |
UtlBoolean | isMarkedForDeletion () const |
UtlBoolean | isHeld () const |
UtlBoolean | isHoldInProgress () const |
UtlBoolean | isTransferHeld () const |
virtual UtlBoolean | isLocallyInitiatedRemoteHold () const |
virtual UtlBoolean | isInviteFromThisSide () const |
Static Public Member Functions | |
static void | getStateString (int state, UtlString *stateLabel) |
static UtlBoolean | isStateTransitionAllowed (int newState, int oldState) |
Static Public Attributes | |
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... | |
Protected Member Functions | |
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 | |
int | mOfferingDelay |
int | mLineAvailableBehavior |
UtlString | mForwardUnconditional |
int | mLineBusyBehavior |
UtlString | mForwardOnBusy |
int | mForwardOnNoAnswerSeconds |
CpCallManager * | mpCallManager |
CpCall * | mpCall |
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 |
Private Member Functions | |
Connection (const Connection &rConnection) | |
Connection & | operator= (const Connection &rhs) |
int | terminalConnectionState (int connState) |
Private Attributes | |
UtlString | connectionCallId |
UtlString | connectionCallerId |
OsMutex | callIdMutex |
OsTime | mDeleteAfter |
UtlBoolean | mbTransferHeld |
SIPX_CALLSTATE_EVENT | m_eLastMajor |
SIPX_CALLSTATE_CAUSE | m_eLastMinor |
enum connectionStates |
enum connectionType |
enum lineBusyBehaviors |
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
Enumerator | |
---|---|
BUSY | |
FAKE_RING | |
FORCED_ANSWER | |
FORWARD_ON_BUSY | |
QUEUE_SILENT | |
QUEUE_ALERT |
enum offeringModes |
enum termConnectionStates |
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 |
|
private |
|
pure virtual |
Accept and incoming INVITE and change from OFFERING to ALERTING state.
sendEarlyMedia | - send early media (startRTPSend and send SDP in 183) |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
inlinevirtual |
Reimplemented in SipConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
void fireSipXCallEvent | ( | SIPX_CALLSTATE_EVENT | eMajor, |
SIPX_CALLSTATE_CAUSE | eMinor, | ||
void * | pEventData = NULL |
||
) |
void fireSipXMediaEvent | ( | SIPX_MEDIA_EVENT | event, |
SIPX_MEDIA_CAUSE | cause, | ||
SIPX_MEDIA_TYPE | type, | ||
void * | pEventData = NULL |
||
) |
void fireSipXSecurityEvent | ( | SIPX_SECURITY_INFO * | pEventData | ) |
|
inlinevirtual |
void getCallerId | ( | UtlString * | callerId | ) |
void getCallId | ( | UtlString * | callId | ) |
|
inline |
|
virtual |
Reimplemented in SipConnection, and CpGhostConnection.
OsStatus getDeleteAfter | ( | OsTime & | time | ) |
|
virtual |
Reimplemented in SipConnection.
void getLocalAddress | ( | UtlString * | address | ) |
int getLocalState | ( | ) | const |
CpMediaInterface * getMediaInterfacePtr | ( | ) |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure 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).
Implemented in SipConnection, and CpGhostConnection.
const UtlString & getRemoteRtpAddress | ( | ) | const |
int getRemoteState | ( | ) | const |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
inline |
void getResponseText | ( | UtlString & | responseText | ) |
|
pure 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).
Implemented in SipConnection, and CpGhostConnection.
int getState | ( | int | isLocal = 0 | ) | const |
int getState | ( | int | isLocal, |
int & | cause | ||
) | const |
|
static |
int getTerminalState | ( | int | isLocal | ) | const |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
UtlBoolean isHeld | ( | ) | const |
UtlBoolean isHoldInProgress | ( | ) | const |
|
virtual |
Reimplemented in SipConnection, and CpGhostConnection.
|
virtual |
Reimplemented in SipConnection.
|
virtual |
Reimplemented in SipConnection.
UtlBoolean isMarkedForDeletion | ( | ) | const |
UtlBoolean isRemoteCallee | ( | ) |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
static |
UtlBoolean isTransferHeld | ( | ) | const |
void markForDeletion | ( | ) |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
private |
|
pure virtual |
param: requestQueuedCall - indicates that the caller wishes to have the callee queue the call if busy
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
protected |
|
virtual |
|
virtual |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
UtlBoolean remoteRequestedHold | ( | ) |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
inlinevirtual |
Reimplemented in SipConnection.
|
protected |
|
protected |
void setLocalAddress | ( | const char * | address | ) |
void setMediaInterface | ( | CpMediaInterface * | pMediaInterface | ) |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
void setTransferHeld | ( | UtlBoolean | bHeld | ) |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
private |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
void unimplemented | ( | const char * | methodName | ) | const |
UtlBoolean validStateTransition | ( | SIPX_CALLSTATE_EVENT | eFrom, |
SIPX_CALLSTATE_EVENT | eTo | ||
) |
|
pure virtual |
Implemented in SipConnection, and CpGhostConnection.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
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