sipXcallLib home page


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

#include <SipConnection.h>

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

Public Types

enum  ReinviteStates { ACCEPT_INVITE = 0, REINVITED, REINVITING }
 
- 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...
 

Public Member Functions

 SipConnection (const char *outboundLineAddress, UtlBoolean isEarlyMediaFor180Enabled=TRUE, CpCallManager *callMgr=NULL, CpCall *call=NULL, CpMediaInterface *mediaInterface=NULL, SipUserAgent *sipUA=NULL, int offeringDelayMilliSeconds=IMMEDIATE, int sessionReinviteTimer=0, int availableBehavior=RING, const char *forwardUnconditionalUrl=NULL, int busyBehavior=BUSY, const char *forwardOnBusy=NULL)
 
virtual ~SipConnection ()
 
virtual UtlBoolean dequeue ()
 
virtual UtlBoolean send (SipMessage &message, OsMsgQ *responseListener=NULL, void *responseListenerData=NULL, UtlBoolean bUseSendToTransportType=FALSE)
 
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 response)
 
virtual void outOfFocus ()
 
virtual UtlBoolean answer (const void *hWnd=NULL)
 
virtual UtlBoolean hangUp ()
 
virtual UtlBoolean hold ()
 
virtual UtlBoolean offHold ()
 
virtual UtlBoolean renegotiateCodecs ()
 
virtual UtlBoolean silentRemoteHold ()
 
virtual UtlBoolean accept (int forwardOnNoAnswerTimeOut, 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 reject (int errorCode=0, const char *errorText="")
 
virtual UtlBoolean redirect (const char *forwardAddress)
 
virtual UtlBoolean canSendInfo ()
 
virtual UtlBoolean sendInfo (UtlString contentType, UtlString sContent)
 
virtual UtlBoolean processMessage (OsMsg &eventMessage)
 
void setCallerId ()
 
virtual UtlBoolean getRemoteAddress (UtlString *remoteAddress) const
 
virtual UtlBoolean getRemoteAddress (UtlString *remoteAddress, UtlBoolean leaveFieldParmetersIn) 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...
 
void setContactType (SIPX_CONTACT_TYPE eType, Url *pToUrl=NULL)
 
void setContactId (SIPX_CONTACT_ID contactId)
 
void setExternalTransport (SIPX_TRANSPORT_DATA *pTransport)
 
void setVoiceQualityReportTarget (const char *szTargetSipUrl)
 
void sendVoiceQualityReport (const char *szTargetSipUrl)
 
void cacheMediaPassThroughData (CpMediaInterface::MEDIA_STREAM_TYPE mediaType, int mediaTypeStreamIndex, UtlString &receiveAddress, int rtpPort, int rtcpPort)
 
virtual UtlContainableType getContainableType () const
 
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 OsStatus getFromField (UtlString *fromField)
 
virtual OsStatus getToField (UtlString *toField)
 
int getNextCseq ()
 
virtual OsStatus getInviteHeaderValue (const char *headerName, int headerIndex, UtlString &headerValue) const
 
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
 
virtual UtlBoolean isSameRemoteAddress (Url &remoteAddress, UtlBoolean tagsMustMatch) const
 
void setSecurity (const SIPXTACK_SECURITY_ATTRIBUTES *const pSecurity)
 
void getRemoteUserAgent (UtlString *userAgent)
 
virtual UtlBoolean isInviteFromThisSide () const
 
virtual UtlBoolean isLocallyInitiatedRemoteHold () const
 
virtual void registerObserver (UtlObserver *observer)
 Registers a listener of this observable. More...
 
virtual void removeObserver (UtlObserver *observer)
 Removes a listener of this observable. More...
 
- 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)
 
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
 
UtlBoolean isRemoteCallee ()
 
UtlBoolean remoteRequestedHold ()
 
UtlBoolean isMarkedForDeletion () const
 
UtlBoolean isHeld () const
 
UtlBoolean isHoldInProgress () const
 
UtlBoolean isTransferHeld () const
 

Static Public Member Functions

static UtlBoolean processNewFinalMessage (SipUserAgent *sipUa, OsMsg *eventMessage)
 
static UtlBoolean shouldCreateConnection (SipUserAgent &sipUa, OsMsg &eventMessage, SdpCodecList *codecFactory=NULL)
 
- Static Public Member Functions inherited from Connection
static void getStateString (int state, UtlString *stateLabel)
 
static UtlBoolean isStateTransitionAllowed (int newState, int oldState)
 

Static Public Attributes

static const UtlContainableType TYPE = "SipConnection"
 
- 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...
 

Protected Member Functions

virtual void notify (int code, void *pUserData)
 The observable calls this to notify its observers of a change. More...
 
UtlBoolean prepareInviteSdpForSend (SipMessage *pMsg, int connectionId, const void *pSecurityAttribute)
 
void setMediaDestination (const char *hostAddress, int audioRtpPort, int audioRtcpPort, int videoRtpPort, int videoRtcpPort, const SdpBody *pRemoteBody)
 
SIPX_CONTACT_TYPE selectCompatibleContactType (const SipMessage &request)
 
void updateContact (Url *pContactUrl, SIPX_CONTACT_TYPE eType, Url *pToUrl=NULL, UtlString *pRemoteHostOrIp=NULL, int *pRemotePort=NULL)
 
void updateContactFromResponse (const SipMessage *pResponse)
 
UtlBoolean doOffHold (UtlBoolean forceReInvite)
 
UtlBoolean doHangUp (const char *dialString=NULL, const char *callerId=NULL)
 
void buildFromToAddresses (const char *dialString, const char *callerId, const char *callerDisplayName, UtlString &fromAddress, UtlString &goodToAddress)
 
void buildLocalContact (Url fromAddress, UtlString &localContact, Url *pToUrl=NULL)
 
UtlBoolean extendSessionReinvite ()
 
UtlBoolean processRequest (const SipMessage *request)
 
void processInviteRequest (const SipMessage *request)
 
void processReferRequest (const SipMessage *request)
 
void processAckRequest (const SipMessage *request)
 
void processByeRequest (const SipMessage *request)
 
void processCancelRequest (const SipMessage *request)
 
void processNotifyRequest (const SipMessage *request)
 
UtlBoolean processResponse (const SipMessage *response)
 
void processInviteResponse (const SipMessage *request)
 
void processReferResponse (const SipMessage *request)
 
void processOptionsResponse (const SipMessage *request)
 
void processByeResponse (const SipMessage *request)
 
void processCancelResponse (const SipMessage *request)
 
void processNotifyResponse (const SipMessage *request)
 
void processInviteResponseRinging (const SipMessage *response)
 
void processInviteResponseBusy (const SipMessage *response)
 
void processInviteResponseQueued (const SipMessage *response)
 
void processInviteResponseRequestPending (const SipMessage *response)
 
void processInviteResponseFailed (const SipMessage *response)
 
void processInviteResponseHangingUp (const SipMessage *response)
 
void processInviteResponseNormal (const SipMessage *response)
 
void processInviteResponseRedirect (const SipMessage *response)
 
void processInviteResponseUnknown (const SipMessage *response)
 
void processInviteRequestBadTransaction (const SipMessage *request, int tag)
 
void processInviteRequestLoop (const SipMessage *request, int tag)
 
void processInviteRequestBadRefer (const SipMessage *request, int tag)
 
void processInviteRequestOffering (const SipMessage *request, int tag, UtlBoolean doesReplaceCallLegExist, int replaceCallLegState, UtlString &replaceCallId, UtlString &replaceToTag, UtlString &replaceFromTag)
 
void processInviteRequestReinvite (const SipMessage *request, int tag)
 
void fireIncompatibleCodecsEvent (SdpCodecList *pSupportedCodecs, SdpCodec **ppMatchedCodecs, int nMatchedCodces)
 
void fireAudioStartEvents (SIPX_MEDIA_CAUSE cause=MEDIA_CAUSE_NORMAL)
 
void fireAudioStopEvents (SIPX_MEDIA_CAUSE cause=MEDIA_CAUSE_NORMAL)
 
- 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)
 

Static Protected Member Functions

static UtlBoolean requestShouldCreateConnection (const SipMessage *sipMsg, SipUserAgent &sipUa, SdpCodecList *codecFactory)
 

Private Member Functions

UtlBoolean getInitialSdpCodecs (const SipMessage *sdpMessage, SdpCodecList &supportedCodecsArray, int &numCodecsInCommon, SdpCodec **&commonCodecsForEncoder, UtlString &remoteAddress, int &remotePort, int &remoteRtcpPort, int &remoteVideoRtpPort, int &remoteVideoRtcpPort, SdpSrtpParameters &localSrtpParams, SdpSrtpParameters &matchingSrtpParams, int localBandwidth, int &matchingBandwidth, int localVideoFramerate, int &matchingVideoFramerate)
 
virtual void proceedToRinging (const SipMessage *inviteMessage, SipUserAgent *sipUserAgent, int tagNum, int availableBehavior, int numAddresses=0, UtlString hostAddresses[]=NULL, int receiveRtpPorts[]=NULL, int receiveRtcpPorts[]=NULL, int receiveVideoRtpPorts[]=NULL, int receiveVideoRtcpPorts[]=NULL, RTP_TRANSPORT transportTypes[]=NULL, int numMatchingCodecs=0, SdpCodec *matchingCodecs[]=NULL, SdpSrtpParameters *matchingSrtpParams=NULL, int totalBandwidth=0, int matchingVideoFramerate=0)
 
UtlBoolean isMethodAllowed (const char *method)
 
void doBlindRefer ()
 
SipConnectionoperator= (const SipConnection &rhs)
 
 SipConnection (const SipConnection &rSipConnection)
 

Private Attributes

UtlSList mObservers
 
CSeqManager mCSeqMgr
 
int mRtpTransport
 
int mRtpTcpRole
 
UtlBoolean mbByeAttempted
 
SipUserAgent * sipUserAgent
 
UtlString mFromTag
 
UtlString mLocationHeader
 
SipMessage * inviteMsg
 
UtlBoolean mbCancelling
 
UtlBoolean mbLocallyInitiatedRemoteHold
 
SIPXTACK_SECURITY_ATTRIBUTES * mpSecurity
 
SipMessage * mReferMessage
 
UtlBoolean inviteFromThisSide
 
UtlString mLastRequestMethod
 
UtlString mRemoteContact
 
Url mFromUrl
 
Url mToUrl
 
UtlString mRemoteUriStr
 
UtlString mLocalUriStr
 
UtlString mContactUriStr
 
int lastLocalSequenceNumber
 
int lastRemoteSequenceNumber
 
int reinviteState
 
UtlString mRouteField
 
int mDefaultSessionReinviteTimer
 
int mSessionReinviteTimer
 
UtlString mAllowedRemote
 
UtlBoolean mIsReferSent
 
UtlBoolean mIsAcceptSent
 
int mHoldCompleteAction
 
int mBandwidthId
 
UtlBoolean mIsEarlyMediaFor180
 
UtlString mLineId
 
UtlString mLocalContact
 The local Contact: field value - a URI in name-addr format. More...
 
SIPX_CONTACT_TYPE mContactType
 
SIPX_CONTACT_ID mContactId
 
UtlBoolean mDropping
 
UtlString mRemoteUserAgent
 
SIPX_TRANSPORT_DATA mTransport
 
UtlString mVoiceQualityReportTarget
 
MediaStreamPassThroughDatampPassThroughData
 

Static Private Attributes

static UtlRandom * sRandom = NULL
 

Additional Inherited Members

- 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
 

Member Enumeration Documentation

Enumerator
ACCEPT_INVITE 
REINVITED 
REINVITING 

Constructor & Destructor Documentation

SipConnection ( const char *  outboundLineAddress,
UtlBoolean  isEarlyMediaFor180Enabled = TRUE,
CpCallManager callMgr = NULL,
CpCall call = NULL,
CpMediaInterface *  mediaInterface = NULL,
SipUserAgent *  sipUA = NULL,
int  offeringDelayMilliSeconds = IMMEDIATE,
int  sessionReinviteTimer = 0,
int  availableBehavior = RING,
const char *  forwardUnconditionalUrl = NULL,
int  busyBehavior = BUSY,
const char *  forwardOnBusy = NULL 
)
~SipConnection ( )
virtual
SipConnection ( const SipConnection rSipConnection)
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.

void buildFromToAddresses ( const char *  dialString,
const char *  callerId,
const char *  callerDisplayName,
UtlString &  fromAddress,
UtlString &  goodToAddress 
)
protected
void buildLocalContact ( Url  fromAddress,
UtlString &  localContact,
Url *  pToUrl = NULL 
)
protected
void cacheMediaPassThroughData ( CpMediaInterface::MEDIA_STREAM_TYPE  mediaType,
int  mediaTypeStreamIndex,
UtlString &  receiveAddress,
int  rtpPort,
int  rtcpPort 
)
UtlBoolean canSendInfo ( )
virtual

Reimplemented from Connection.

UtlBoolean dequeue ( )
virtual

SIPXTAPI: TBD

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.

void doBlindRefer ( )
private
UtlBoolean doHangUp ( const char *  dialString = NULL,
const char *  callerId = NULL 
)
protected
UtlBoolean doOffHold ( UtlBoolean  forceReInvite)
protected
UtlBoolean extendSessionReinvite ( )
protected
void fireAudioStartEvents ( SIPX_MEDIA_CAUSE  cause = MEDIA_CAUSE_NORMAL)
protected
void fireAudioStopEvents ( SIPX_MEDIA_CAUSE  cause = MEDIA_CAUSE_NORMAL)
protected
void fireIncompatibleCodecsEvent ( SdpCodecList *  pSupportedCodecs,
SdpCodec **  ppMatchedCodecs,
int  nMatchedCodces 
)
protected
UtlContainableType getContainableType ( ) const
virtual

Reimplemented from Connection.

OsStatus getFromField ( UtlString *  fromField)
virtual
UtlBoolean getInitialSdpCodecs ( const SipMessage *  sdpMessage,
SdpCodecList &  supportedCodecsArray,
int &  numCodecsInCommon,
SdpCodec **&  commonCodecsForEncoder,
UtlString &  remoteAddress,
int &  remotePort,
int &  remoteRtcpPort,
int &  remoteVideoRtpPort,
int &  remoteVideoRtcpPort,
SdpSrtpParameters &  localSrtpParams,
SdpSrtpParameters &  matchingSrtpParams,
int  localBandwidth,
int &  matchingBandwidth,
int  localVideoFramerate,
int &  matchingVideoFramerate 
)
private
OsStatus getInviteHeaderValue ( const char *  headerName,
int  headerIndex,
UtlString &  headerValue 
) const
virtual

Reimplemented from Connection.

int getNextCseq ( )
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 *  userAgent)
virtual

Implements Connection.

UtlBoolean getSession ( SipSession &  sessioon)
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.

OsStatus getToField ( UtlString *  toField)
virtual
UtlBoolean hangUp ( )
virtual

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 isInviteFromThisSide ( ) const
virtual

Reimplemented from Connection.

UtlBoolean isLocallyInitiatedRemoteHold ( ) const
virtual

Reimplemented from Connection.

UtlBoolean isMethodAllowed ( const char *  method)
private
UtlBoolean isSameRemoteAddress ( Url &  remoteAddress) const
virtual

Implements Connection.

UtlBoolean isSameRemoteAddress ( Url &  remoteAddress,
UtlBoolean  tagsMustMatch 
) const
virtual
void notify ( int  code,
void *  pUserData 
)
protectedvirtual

The observable calls this to notify its observers of a change.

UtlBoolean offHold ( )
virtual

Implements Connection.

SipConnection & operator= ( const SipConnection 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 prepareInviteSdpForSend ( SipMessage *  pMsg,
int  connectionId,
const void *  pSecurityAttribute 
)
protected
void proceedToRinging ( const SipMessage *  inviteMessage,
SipUserAgent *  sipUserAgent,
int  tagNum,
int  availableBehavior,
int  numAddresses = 0,
UtlString  hostAddresses[] = NULL,
int  receiveRtpPorts[] = NULL,
int  receiveRtcpPorts[] = NULL,
int  receiveVideoRtpPorts[] = NULL,
int  receiveVideoRtcpPorts[] = NULL,
RTP_TRANSPORT  transportTypes[] = NULL,
int  numMatchingCodecs = 0,
SdpCodec *  matchingCodecs[] = NULL,
SdpSrtpParameters *  matchingSrtpParams = NULL,
int  totalBandwidth = 0,
int  matchingVideoFramerate = 0 
)
privatevirtual
void processAckRequest ( const SipMessage *  request)
protected
void processByeRequest ( const SipMessage *  request)
protected
void processByeResponse ( const SipMessage *  request)
protected
void processCancelRequest ( const SipMessage *  request)
protected
void processCancelResponse ( const SipMessage *  request)
protected
void processInviteRequest ( const SipMessage *  request)
protected

Determine if this INVITE is part of a REFER

void processInviteRequestBadRefer ( const SipMessage *  request,
int  tag 
)
protected
void processInviteRequestBadTransaction ( const SipMessage *  request,
int  tag 
)
protected
void processInviteRequestLoop ( const SipMessage *  request,
int  tag 
)
protected
void processInviteRequestOffering ( const SipMessage *  request,
int  tag,
UtlBoolean  doesReplaceCallLegExist,
int  replaceCallLegState,
UtlString &  replaceCallId,
UtlString &  replaceToTag,
UtlString &  replaceFromTag 
)
protected
void processInviteRequestReinvite ( const SipMessage *  request,
int  tag 
)
protected
void processInviteResponse ( const SipMessage *  request)
protected
void processInviteResponseBusy ( const SipMessage *  response)
protected
void processInviteResponseFailed ( const SipMessage *  response)
protected
void processInviteResponseHangingUp ( const SipMessage *  response)
protected
void processInviteResponseNormal ( const SipMessage *  response)
protected
void processInviteResponseQueued ( const SipMessage *  response)
protected
void processInviteResponseRedirect ( const SipMessage *  response)
protected
void processInviteResponseRequestPending ( const SipMessage *  response)
protected
void processInviteResponseRinging ( const SipMessage *  response)
protected
void processInviteResponseUnknown ( const SipMessage *  response)
protected
UtlBoolean processMessage ( OsMsg &  eventMessage)
virtual

Implements Connection.

UtlBoolean processNewFinalMessage ( SipUserAgent *  sipUa,
OsMsg *  eventMessage 
)
static
void processNotifyRequest ( const SipMessage *  request)
protected
void processNotifyResponse ( const SipMessage *  request)
protected
void processOptionsResponse ( const SipMessage *  request)
protected
void processReferRequest ( const SipMessage *  request)
protected

SIPXTAPI: TBD

void processReferResponse ( const SipMessage *  request)
protected
UtlBoolean processRequest ( const SipMessage *  request)
protected
UtlBoolean processResponse ( const SipMessage *  response)
protected

SIPXTAPI: TBD

UtlBoolean redirect ( const char *  forwardAddress)
virtual

Implements Connection.

void registerObserver ( UtlObserver *  observer)
virtual

Registers a listener of this observable.

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

Implements Connection.

void removeObserver ( UtlObserver *  observer)
virtual

Removes a listener of this observable.

UtlBoolean renegotiateCodecs ( )
virtual

Implements Connection.

UtlBoolean requestShouldCreateConnection ( const SipMessage *  sipMsg,
SipUserAgent &  sipUa,
SdpCodecList *  codecFactory 
)
staticprotected
SIPX_CONTACT_TYPE selectCompatibleContactType ( const SipMessage &  request)
protected
UtlBoolean send ( SipMessage &  message,
OsMsgQ *  responseListener = NULL,
void *  responseListenerData = NULL,
UtlBoolean  bUseSendToTransportType = FALSE 
)
virtual
UtlBoolean sendInfo ( UtlString  contentType,
UtlString  sContent 
)
virtual

Reimplemented from Connection.

void sendVoiceQualityReport ( const char *  szTargetSipUrl)
void setCallerId ( )
void setContactId ( SIPX_CONTACT_ID  contactId)
inline
void setContactType ( SIPX_CONTACT_TYPE  eType,
Url *  pToUrl = NULL 
)
void setExternalTransport ( SIPX_TRANSPORT_DATA pTransport)
inline
void setMediaDestination ( const char *  hostAddress,
int  audioRtpPort,
int  audioRtcpPort,
int  videoRtpPort,
int  videoRtcpPort,
const SdpBody *  pRemoteBody 
)
protected
void setSecurity ( const SIPXTACK_SECURITY_ATTRIBUTES *const  pSecurity)
void setVoiceQualityReportTarget ( const char *  szTargetSipUrl)
UtlBoolean shouldCreateConnection ( SipUserAgent &  sipUa,
OsMsg &  eventMessage,
SdpCodecList *  codecFactory = NULL 
)
static
UtlBoolean silentRemoteHold ( )
virtual

Implements Connection.

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

Implements Connection.

UtlBoolean transferControllerStatus ( int  connectionState,
int  response 
)
virtual

Implements Connection.

UtlBoolean transfereeStatus ( int  connectionState,
int  response 
)
virtual

Implements Connection.

void updateContact ( Url *  pContactUrl,
SIPX_CONTACT_TYPE  eType,
Url *  pToUrl = NULL,
UtlString *  pRemoteHostOrIp = NULL,
int *  pRemotePort = NULL 
)
protected
void updateContactFromResponse ( const SipMessage *  pResponse)
protected
UtlBoolean willHandleMessage ( OsMsg &  eventMessage) const
virtual

Implements Connection.

Member Data Documentation

UtlBoolean inviteFromThisSide
private
SipMessage* inviteMsg
private
int lastLocalSequenceNumber
private
int lastRemoteSequenceNumber
private
UtlString mAllowedRemote
private
int mBandwidthId
private
UtlBoolean mbByeAttempted
private
UtlBoolean mbCancelling
private
UtlBoolean mbLocallyInitiatedRemoteHold
private
SIPX_CONTACT_ID mContactId
private
SIPX_CONTACT_TYPE mContactType
private
UtlString mContactUriStr
private
CSeqManager mCSeqMgr
private
int mDefaultSessionReinviteTimer
private
UtlBoolean mDropping
private
UtlString mFromTag
private
Url mFromUrl
private
int mHoldCompleteAction
private
UtlBoolean mIsAcceptSent
private
UtlBoolean mIsEarlyMediaFor180
private
UtlBoolean mIsReferSent
private
UtlString mLastRequestMethod
private
UtlString mLineId
private
UtlString mLocalContact
private

The local Contact: field value - a URI in name-addr format.

UtlString mLocalUriStr
private
UtlString mLocationHeader
private
UtlSList mObservers
private
MediaStreamPassThroughData* mpPassThroughData
private
SIPXTACK_SECURITY_ATTRIBUTES* mpSecurity
private
SipMessage* mReferMessage
private
UtlString mRemoteContact
private
UtlString mRemoteUriStr
private
UtlString mRemoteUserAgent
private
UtlString mRouteField
private
int mRtpTcpRole
private
int mRtpTransport
private
int mSessionReinviteTimer
private
Url mToUrl
private
SIPX_TRANSPORT_DATA mTransport
private
UtlString mVoiceQualityReportTarget
private
int reinviteState
private
SipUserAgent* sipUserAgent
private
UtlRandom * sRandom = NULL
staticprivate
const UtlContainableType TYPE = "SipConnection"
static