SIPConnection Class Reference

#include <sipcon.h>

Inheritance diagram for SIPConnection:

OpalRTPConnection OpalConnection

Protocol handling functions

enum  TypeOfINVITE { IsNewINVITE, IsDuplicateINVITE, IsReINVITE, IsLoopedINVITE }
virtual void OnTransactionFailed (SIPTransaction &transaction)
virtual void OnReceivedPDU (SIP_PDU &pdu)
virtual void OnReceivedINVITE (SIP_PDU &pdu)
virtual void OnReceivedReINVITE (SIP_PDU &pdu)
virtual void OnReceivedACK (SIP_PDU &pdu)
virtual void OnReceivedOPTIONS (SIP_PDU &pdu)
virtual void OnReceivedNOTIFY (SIP_PDU &pdu)
virtual void OnAllowedEventNotify (const PString &eventName)
virtual void OnReceivedREFER (SIP_PDU &pdu)
virtual void OnReceivedINFO (SIP_PDU &pdu)
virtual void OnReceivedPING (SIP_PDU &pdu)
virtual void OnReceivedPRACK (SIP_PDU &pdu)
virtual void OnReceivedBYE (SIP_PDU &pdu)
virtual void OnReceivedCANCEL (SIP_PDU &pdu)
virtual void OnReceivedResponseToINVITE (SIPTransaction &transaction, SIP_PDU &response)
virtual void OnReceivedResponse (SIPTransaction &transaction, SIP_PDU &response)
virtual void OnReceivedTrying (SIPTransaction &transaction, SIP_PDU &response)
virtual void OnReceivedRinging (SIP_PDU &pdu)
virtual void OnReceivedSessionProgress (SIP_PDU &pdu)
virtual PBoolean OnReceivedAuthenticationRequired (SIPTransaction &transaction, SIP_PDU &response)
virtual void OnReceivedRedirection (SIP_PDU &pdu)
virtual void OnReceivedOK (SIPTransaction &transaction, SIP_PDU &response)
virtual void OnCreatingINVITE (SIPInvite &pdu)
TypeOfINVITE CheckINVITE (const SIP_PDU &pdu) const
 Indicate if this is a duplicate or multi-path INVITE.
bool SendOPTIONS (const SIPOptions::Params &params, SIP_PDU *reply=NULL)
bool SendINFO (const SIPInfo::Params &params, SIP_PDU *reply=NULL)

Public Types

 IsNewINVITE
 IsDuplicateINVITE
 IsReINVITE
 IsLoopedINVITE
 e_prackDisabled
 e_prackSupported
 e_prackRequired
enum  PRACKMode { e_prackDisabled, e_prackSupported, e_prackRequired }

Public Member Functions

OpalTransportAddress GetDefaultSDPConnectAddress (WORD port=0) const
OpalTransportGetTransport () const
bool SetTransport (const SIPURL &destination)
SIPEndPointGetEndPoint () const
SIPDialogContextGetDialog ()
const SIPDialogContextGetDialog () const
SIPAuthenticationGetAuthenticator () const
PRACKMode GetPRACKMode () const
virtual PBoolean OnMediaControlXML (SIP_PDU &pdu)
virtual void OnMediaCommand (OpalMediaCommand &note, INT extra)
virtual void OnStartTransaction (SIPTransaction &transaction)
virtual void OnReceivedMESSAGE (SIP_PDU &pdu)
 P_REMOVE_VIRTUAL_VOID (OnMessageReceived(const SIPURL &, const SIP_PDU &))
 P_REMOVE_VIRTUAL_VOID (OnMessageReceived(const SIP_PDU &))
virtual bool TransmitExternalIM (const OpalMediaFormat &format, RTP_IMFrame &body)
PString GetLocalPartyURL () const
Construction
 SIPConnection (OpalCall &call, SIPEndPoint &endpoint, const PString &token, const SIPURL &address, OpalTransport *transport, unsigned int options=0, OpalConnection::StringOptions *stringOptions=NULL)
 ~SIPConnection ()
Overrides from OpalConnection
virtual bool IsNetworkConnection () const
virtual PString GetPrefixName () const
virtual PString GetIdentifier () const
virtual PBoolean SetUpConnection ()
virtual PString GetDestinationAddress ()
virtual PString GetCalledPartyURL ()
virtual PString GetAlertingType () const
virtual bool SetAlertingType (const PString &info)
virtual PString GetCallInfo () const
virtual bool TransferConnection (const PString &remoteParty)
virtual bool Hold (bool fromRemote, bool placeOnHold)
virtual bool IsOnHold (bool fromRemote)
virtual PBoolean SetAlerting (const PString &calleeName, PBoolean withMedia)
virtual PBoolean SetConnected ()
virtual OpalMediaFormatList GetMediaFormats () const
virtual OpalMediaStreamPtr OpenMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
virtual bool CloseMediaStream (OpalMediaStream &stream)
virtual void OnPauseMediaStream (OpalMediaStream &strm, bool paused)
virtual void OnReleased ()
virtual PBoolean ForwardCall (const PString &forwardParty)
virtual SendUserInputModes GetRealSendUserInputMode () const
PBoolean SendUserInputTone (char tone, unsigned duration)
virtual void OnRTPStatistics (const RTP_Session &session) const

Protected Types

 eHoldOff
 eRetrieveInProgress
 eHoldOn
 eHoldInProgress
 ReleaseWithBYE
 ReleaseWithCANCEL
 ReleaseWithResponse
 ReleaseWithNothing
enum  HoldState { eHoldOff, eRetrieveInProgress, eHoldOn, eHoldInProgress }
enum  { ReleaseWithBYE, ReleaseWithCANCEL, ReleaseWithResponse, ReleaseWithNothing }

Protected Member Functions

virtual bool GarbageCollection ()
 PDECLARE_NOTIFIER (PTimer, SIPConnection, OnSessionTimeout)
 PDECLARE_NOTIFIER (PTimer, SIPConnection, OnInviteResponseRetry)
 PDECLARE_NOTIFIER (PTimer, SIPConnection, OnInviteResponseTimeout)
virtual bool OnSendOfferSDP (OpalRTPSessionManager &rtpSessions, SDPSessionDescription &sdpOut)
virtual bool OnSendOfferSDPSession (const OpalMediaType &mediaType, unsigned sessionID, OpalRTPSessionManager &rtpSessions, SDPSessionDescription &sdpOut, const OpalMediaFormatList &localMediaFormats, bool offerOpenMediaStreamOnly)
virtual bool OnSendAnswerSDP (OpalRTPSessionManager &rtpSessions, SDPSessionDescription &sdpOut)
virtual bool OnSendAnswerSDPSession (const SDPSessionDescription &sdpIn, const OpalMediaFormatList &localMediaFormats, unsigned sessionIndex, SDPSessionDescription &sdpOut)
virtual void OnReceivedAnswerSDP (SIP_PDU &pdu)
virtual bool OnReceivedAnswerSDPSession (SDPSessionDescription &sdp, unsigned sessionId, const OpalMediaFormatList &localMediaFormats)
virtual OpalMediaSessionSetUpMediaSession (const unsigned rtpSessionId, const OpalMediaType &mediaType, const SDPMediaDescription &mediaDescription, OpalTransportAddress &localAddress, bool &remoteChanged)
bool SendReINVITE (PTRACE_PARAM(const char *msg))
void StartPendingReINVITE ()
bool WriteINVITE ()
virtual bool SendInviteOK ()
virtual PBoolean SendInviteResponse (SIP_PDU::StatusCodes code, const char *contact=NULL, const char *extra=NULL, const SDPSessionDescription *sdp=NULL, const char *body=NULL)
void UpdateRemoteAddresses ()
void NotifyDialogState (SIPDialogNotification::States state, SIPDialogNotification::Events eventType=SIPDialogNotification::NoEvent, unsigned eventCode=0)
bool SetRemoteMediaFormats (SDPSessionDescription *sdp)

Static Protected Member Functions

static PBoolean WriteINVITE (OpalTransport &transport, void *param)

Protected Attributes

SIPEndPointendpoint
OpalTransporttransport
bool deleteTransport
unsigned m_allowedMethods
PStringList m_allowedEvents
HoldState m_holdToRemote
bool m_holdFromRemote
PString forwardParty
SIPURL m_ciscoRemotePartyID
SIP_PDUoriginalInvite
PTime originalInviteTime
time_t m_sdpSessionId
unsigned m_sdpVersion
bool m_needReINVITE
bool m_handlingINVITE
bool m_symmetricOpenStream
SIPDialogContext m_dialog
OpalGloballyUniqueID m_dialogNotifyId
int m_appearanceCode
PString m_alertInfo
SIPAuthenticationm_authentication
unsigned m_authenticatedCseq
PTimer sessionTimer
std::map< SIP_PDU::Methods,
unsigned > 
m_lastRxCSeq
PRACKMode m_prackMode
bool m_prackEnabled
unsigned m_prackSequenceNumber
queue< SIP_PDUm_responsePackets
PTimer m_responseFailTimer
PTimer m_responseRetryTimer
unsigned m_responseRetryCount
bool m_referInProgress
PSafeList< SIPTransactionforkedInvitations
PSafeList< SIPTransactionpendingInvitations
PSafeList< SIPTransactionm_pendingTransactions
bool m_switchedToFaxMode
enum SIPConnection:: { ... }  releaseMethod
OpalMediaFormatList m_remoteFormatList
OpalMediaFormatList m_answerFormatList
std::map< std::string, SIP_PDU * > m_responses

Friends

class SIPInvite
class SIPTransaction
class SIP_RTP_Session

Detailed Description

Session Initiation Protocol connection.


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
ReleaseWithBYE 
ReleaseWithCANCEL 
ReleaseWithResponse 
ReleaseWithNothing 

enum SIPConnection::HoldState [protected]

Enumerator:
eHoldOff 
eRetrieveInProgress 
eHoldOn 
eHoldInProgress 

enum SIPConnection::PRACKMode

Enumerator:
e_prackDisabled  Do not use PRACK if remote asks for 100rel in Supported field, refuse call with 420 Bad Extension if 100rel is in Require header field.
e_prackSupported 
e_prackRequired  Add 100rel to Require header in outgoing INVITE. For incoming INVITE enable PRACK is either Supported or Require headers include 100rel, fail the call with a 421 Extension Required if missing.

enum SIPConnection::TypeOfINVITE

Enumerator:
IsNewINVITE 
IsDuplicateINVITE 
IsReINVITE 
IsLoopedINVITE 


Constructor & Destructor Documentation

SIPConnection::SIPConnection ( OpalCall call,
SIPEndPoint endpoint,
const PString &  token,
const SIPURL address,
OpalTransport transport,
unsigned int  options = 0,
OpalConnection::StringOptions stringOptions = NULL 
)

Create a new connection.

Parameters:
call  Owner call for connection
endpoint  Owner endpoint for connection
token  token to identify the connection
address  Destination address for outgoing call
transport  Transport INVITE came in on
options  Connection options
stringOptions  complex string options

SIPConnection::~SIPConnection (  ) 

Destroy connection.


Member Function Documentation

TypeOfINVITE SIPConnection::CheckINVITE ( const SIP_PDU pdu  )  const

Indicate if this is a duplicate or multi-path INVITE.

virtual bool SIPConnection::CloseMediaStream ( OpalMediaStream stream  )  [virtual]

Request close of a specific media stream. Note that this is usually asymchronous, the OnClosedMediaStream() function is called when the stream is really closed.

Parameters:
stream  Stream to close

Reimplemented from OpalConnection.

virtual PBoolean SIPConnection::ForwardCall ( const PString &  forwardParty  )  [virtual]

Forward incoming connection to the specified address. This would typically be called from within the OnIncomingConnection() function when an application wishes to redirect an unwanted incoming call.

The return value is true if the call is to be forwarded, false otherwise. Note that if the call is forwarded, the current connection is cleared with the ended call code set to EndedByCallForwarded.

Parameters:
forwardParty  Party to forward call to.

Reimplemented from OpalConnection.

virtual bool SIPConnection::GarbageCollection (  )  [protected, virtual]

Execute garbage collection for endpoint. Returns true if all garbage has been collected. Default behaviour deletes the objects in the connectionsActive list.

Reimplemented from OpalConnection.

virtual PString SIPConnection::GetAlertingType (  )  const [virtual]

Get alerting type information of an incoming call. The type of "distinctive ringing" for the call. The string is protocol dependent, so the caller would need to be aware of the type of call being made. Some protocols may ignore the field completely.

For SIP this corresponds to the string contained in the "Alert-Info" header field of the INVITE. This is typically a URI for the ring file.

For H.323 this must be a string representation of an integer from 0 to 7 which will be contained in the Q.931 SIGNAL (0x34) Information Element.

Default behaviour returns an empty string.

Reimplemented from OpalConnection.

SIPAuthentication* SIPConnection::GetAuthenticator (  )  const [inline]

virtual PString SIPConnection::GetCalledPartyURL (  )  [virtual]

Get the fulll URL being indicated by the remote for incoming calls. This may not have any relation to the local name of the endpoint.

The default behaviour returns GetDestinationAddress() normalised to a URL. The remote may provide a full URL, if it does not then the prefix for the endpoint is prepended to the destination address.

Reimplemented from OpalConnection.

virtual PString SIPConnection::GetCallInfo (  )  const [virtual]

Get call information of an incoming call. This is protocol dependent information provided about the call. The details are outside the scope of this help.

For SIP this corresponds to the string contained in the "Call-Info" header field of the INVITE.

Reimplemented from OpalConnection.

OpalTransportAddress SIPConnection::GetDefaultSDPConnectAddress ( WORD  port = 0  )  const

virtual PString SIPConnection::GetDestinationAddress (  )  [virtual]

Get the destination address of an incoming connection. This will, for example, collect a phone number from a POTS line, or get the fields from the H.225 SETUP pdu in a H.323 connection.

The default behaviour for sip returns the request URI in the INVITE.

Reimplemented from OpalConnection.

const SIPDialogContext& SIPConnection::GetDialog (  )  const [inline]

SIPDialogContext& SIPConnection::GetDialog (  )  [inline]

SIPEndPoint& SIPConnection::GetEndPoint (  )  const [inline]

Get the owner endpoint for this connection.

Reimplemented from OpalConnection.

virtual PString SIPConnection::GetIdentifier (  )  const [virtual]

Get the protocol-specific unique identifier for this connection.

Reimplemented from OpalConnection.

PString SIPConnection::GetLocalPartyURL (  )  const [virtual]

Get the local name/alias.

Reimplemented from OpalConnection.

virtual OpalMediaFormatList SIPConnection::GetMediaFormats (  )  const [virtual]

Get the data formats this endpoint is capable of operating in.

Reimplemented from OpalConnection.

PRACKMode SIPConnection::GetPRACKMode (  )  const [inline]

Get active PRACK mode. See PRACKMode enum for details.

virtual PString SIPConnection::GetPrefixName (  )  const [virtual]

Get this connections protocol prefix for URLs.

Reimplemented from OpalConnection.

virtual SendUserInputModes SIPConnection::GetRealSendUserInputMode (  )  const [virtual]

Get the real user input indication transmission mode. This will return the user input mode that will actually be used for transmissions. It will be the value of GetSendUserInputMode() provided the remote endpoint is capable of that mode.

Reimplemented from OpalConnection.

OpalTransport& SIPConnection::GetTransport (  )  const [inline, virtual]

Reimplemented from OpalConnection.

virtual bool SIPConnection::Hold ( bool  fromRemote,
bool  placeOnHold 
) [virtual]

Put the current connection on hold, suspending all media streams. The fromRemote parameter indicates if we a putting the remote on hold (false) or it is a request for the remote to put us on hold (true).

The /p placeOnHold parameter indicates of teh command/request is for going on hold or retrieving from hold.

Parameters:
fromRemote  Flag for if remote has us on hold, or we have them
placeOnHold  Flag for setting on or off hold

Reimplemented from OpalConnection.

virtual bool SIPConnection::IsNetworkConnection (  )  const [inline, virtual]

Get indication of connection being to a "network". This indicates the if the connection may be regarded as a "network" connection. The distinction is about if there is a concept of a "remote" party being connected to and is best described by example: sip, h323, iax and pstn are all "network" connections as they connect to something "remote". While pc, pots and ivr are not as the entity being connected to is intrinsically local.

Implements OpalConnection.

virtual bool SIPConnection::IsOnHold ( bool  fromRemote  )  [virtual]

Return true if the current connection is on hold. The fromRemote parameter indicates if we are testing if the remote system has us on hold, or we have them on hold.

Parameters:
fromRemote  Flag for if remote has us on hold, or we have them

Reimplemented from OpalConnection.

void SIPConnection::NotifyDialogState ( SIPDialogNotification::States  state,
SIPDialogNotification::Events  eventType = SIPDialogNotification::NoEvent,
unsigned  eventCode = 0 
) [protected]

virtual void SIPConnection::OnAllowedEventNotify ( const PString &  eventName  )  [virtual]

Callback function on receipt of an allowed NOTIFY message. Allowed events are determined by the m_allowedEvents member variable.

Parameters:
eventName  Name of event

virtual void SIPConnection::OnCreatingINVITE ( SIPInvite pdu  )  [virtual]

Handle a sending INVITE request

virtual void SIPConnection::OnMediaCommand ( OpalMediaCommand note,
INT  extra 
) [virtual]

Notifier function for OpalVideoUpdatePicture. Calls the SendIntraFrameRequest on the rtp session

Reimplemented from OpalRTPConnection.

virtual PBoolean SIPConnection::OnMediaControlXML ( SIP_PDU pdu  )  [virtual]

Call when SIP INFO of type application/media_control+xml is received.

Return false if default reponse of Failure_UnsupportedMediaType is to be returned

virtual void SIPConnection::OnPauseMediaStream ( OpalMediaStream strm,
bool  paused 
) [virtual]

Pause media streams for connection.

Parameters:
strm  Media stream paused/un-paused
paused  Flag for pausing/un-pausing

Reimplemented from OpalConnection.

virtual void SIPConnection::OnReceivedACK ( SIP_PDU pdu  )  [virtual]

Handle an incoming ACK PDU

virtual void SIPConnection::OnReceivedAnswerSDP ( SIP_PDU pdu  )  [protected, virtual]

virtual bool SIPConnection::OnReceivedAnswerSDPSession ( SDPSessionDescription sdp,
unsigned  sessionId,
const OpalMediaFormatList localMediaFormats 
) [protected, virtual]

virtual PBoolean SIPConnection::OnReceivedAuthenticationRequired ( SIPTransaction transaction,
SIP_PDU response 
) [virtual]

Handle an incoming Proxy Authentication Required response PDU Returns: true if handled, if false is returned connection is released.

virtual void SIPConnection::OnReceivedBYE ( SIP_PDU pdu  )  [virtual]

Handle an incoming BYE PDU

virtual void SIPConnection::OnReceivedCANCEL ( SIP_PDU pdu  )  [virtual]

Handle an incoming CANCEL PDU

virtual void SIPConnection::OnReceivedINFO ( SIP_PDU pdu  )  [virtual]

Handle an incoming INFO PDU

virtual void SIPConnection::OnReceivedINVITE ( SIP_PDU pdu  )  [virtual]

Handle an incoming INVITE request

virtual void SIPConnection::OnReceivedMESSAGE ( SIP_PDU pdu  )  [virtual]

virtual void SIPConnection::OnReceivedNOTIFY ( SIP_PDU pdu  )  [virtual]

Handle an incoming NOTIFY PDU

virtual void SIPConnection::OnReceivedOK ( SIPTransaction transaction,
SIP_PDU response 
) [virtual]

Handle an incoming OK response PDU. This actually gets any PDU of the class 2xx not just 200.

virtual void SIPConnection::OnReceivedOPTIONS ( SIP_PDU pdu  )  [virtual]

Handle an incoming OPTIONS PDU

virtual void SIPConnection::OnReceivedPDU ( SIP_PDU pdu  )  [virtual]

Handle an incoming SIP PDU that has been full decoded

virtual void SIPConnection::OnReceivedPING ( SIP_PDU pdu  )  [virtual]

Handle an incoming PING PDU

virtual void SIPConnection::OnReceivedPRACK ( SIP_PDU pdu  )  [virtual]

Handle an incoming PRACK PDU

virtual void SIPConnection::OnReceivedRedirection ( SIP_PDU pdu  )  [virtual]

Handle an incoming redirect response PDU

virtual void SIPConnection::OnReceivedREFER ( SIP_PDU pdu  )  [virtual]

Handle an incoming REFER PDU

virtual void SIPConnection::OnReceivedReINVITE ( SIP_PDU pdu  )  [virtual]

Handle an incoming Re-INVITE request

virtual void SIPConnection::OnReceivedResponse ( SIPTransaction transaction,
SIP_PDU response 
) [virtual]

Handle an incoming response PDU.

virtual void SIPConnection::OnReceivedResponseToINVITE ( SIPTransaction transaction,
SIP_PDU response 
) [virtual]

Handle an incoming response PDU to our INVITE. Note this is called before th ACK is sent and thus should do as little as possible. All the hard work (SDP processing etc) should be in the usual OnReceivedResponse().

virtual void SIPConnection::OnReceivedRinging ( SIP_PDU pdu  )  [virtual]

Handle an incoming Ringing response PDU

virtual void SIPConnection::OnReceivedSessionProgress ( SIP_PDU pdu  )  [virtual]

Handle an incoming Session Progress response PDU

virtual void SIPConnection::OnReceivedTrying ( SIPTransaction transaction,
SIP_PDU response 
) [virtual]

Handle an incoming Trying response PDU

virtual void SIPConnection::OnReleased (  )  [virtual]

Clean up the termination of the connection. This function can do any internal cleaning up and waiting on background threads that may be using the connection object.

Note that there is not a one to one relationship with the OnEstablishedConnection() function. This function may be called without that function being called. For example if SetUpConnection() was used but the call never completed.

Classes that override this function should make sure they call the ancestor version for correct operation.

An application will not typically call this function as it is used by the OpalManager during a release of the connection.

The default behaviour calls the OpalEndPoint function of the same name.

Reimplemented from OpalConnection.

virtual void SIPConnection::OnRTPStatistics ( const RTP_Session session  )  const [virtual]

Callback from the RTP session for statistics monitoring. This is called every so many packets on the transmitter and receiver threads of the RTP session indicating that the statistics have been updated.

The default behaviour does nothing.

Parameters:
session  Session with statistics

virtual bool SIPConnection::OnSendAnswerSDP ( OpalRTPSessionManager rtpSessions,
SDPSessionDescription sdpOut 
) [protected, virtual]

virtual bool SIPConnection::OnSendAnswerSDPSession ( const SDPSessionDescription sdpIn,
const OpalMediaFormatList localMediaFormats,
unsigned  sessionIndex,
SDPSessionDescription sdpOut 
) [protected, virtual]

virtual bool SIPConnection::OnSendOfferSDP ( OpalRTPSessionManager rtpSessions,
SDPSessionDescription sdpOut 
) [protected, virtual]

virtual bool SIPConnection::OnSendOfferSDPSession ( const OpalMediaType mediaType,
unsigned  sessionID,
OpalRTPSessionManager rtpSessions,
SDPSessionDescription sdpOut,
const OpalMediaFormatList localMediaFormats,
bool  offerOpenMediaStreamOnly 
) [protected, virtual]

virtual void SIPConnection::OnStartTransaction ( SIPTransaction transaction  )  [virtual]

virtual void SIPConnection::OnTransactionFailed ( SIPTransaction transaction  )  [virtual]

Handle the fail of a transaction we initiated.

virtual OpalMediaStreamPtr SIPConnection::OpenMediaStream ( const OpalMediaFormat mediaFormat,
unsigned  sessionID,
bool  isSource 
) [virtual]

Open source or sink media stream for session.

Parameters:
mediaFormat  Media format to open
sessionID  Session to start stream on
isSource  Stream is a source/sink

Reimplemented from OpalConnection.

SIPConnection::P_REMOVE_VIRTUAL_VOID ( OnMessageReceived(const SIP_PDU &)   ) 

SIPConnection::P_REMOVE_VIRTUAL_VOID ( OnMessageReceived(const SIPURL &, const SIP_PDU &)   ) 

SIPConnection::PDECLARE_NOTIFIER ( PTimer  ,
SIPConnection  ,
OnInviteResponseTimeout   
) [protected]

SIPConnection::PDECLARE_NOTIFIER ( PTimer  ,
SIPConnection  ,
OnInviteResponseRetry   
) [protected]

SIPConnection::PDECLARE_NOTIFIER ( PTimer  ,
SIPConnection  ,
OnSessionTimeout   
) [protected]

bool SIPConnection::SendINFO ( const SIPInfo::Params params,
SIP_PDU reply = NULL 
)

Send an INFO command within this calls dialog. Note if reply is non-NULL, this function will block until the transaction completes. Care must be executed in this case that no deadlocks occur.

Parameters:
params  Parameters for OPTIONS command
reply  Reply to message

virtual bool SIPConnection::SendInviteOK (  )  [protected, virtual]

virtual PBoolean SIPConnection::SendInviteResponse ( SIP_PDU::StatusCodes  code,
const char *  contact = NULL,
const char *  extra = NULL,
const SDPSessionDescription sdp = NULL,
const char *  body = NULL 
) [protected, virtual]

bool SIPConnection::SendOPTIONS ( const SIPOptions::Params params,
SIP_PDU reply = NULL 
)

Send an OPTIONS command within this calls dialog. Note if reply is non-NULL, this function will block until the transaction completes. Care must be executed in this case that no deadlocks occur.

Parameters:
params  Parameters for OPTIONS command
reply  Reply to message

bool SIPConnection::SendReINVITE ( PTRACE_PARAM(const char *msg)   )  [protected]

PBoolean SIPConnection::SendUserInputTone ( char  tone,
unsigned  duration 
) [virtual]

Send a user input indication to the remote endpoint. This sends DTMF emulation user input. If something more sophisticated than the simple tones that can be sent using the SendUserInput() function.

A duration of zero indicates that no duration is to be indicated. A non-zero logical channel indicates that the tone is to be syncronised with the logical channel at the rtpTimestamp value specified.

The tone parameter must be one of "0123456789#*ABCD!" where '!' indicates a hook flash. If tone is a ' ' character then a signalUpdate PDU is sent that updates the last tone indication sent. See the H.245 specifcation for more details on this.

The default behaviour sends the tone using RFC2833.

Reimplemented from OpalRTPConnection.

virtual PBoolean SIPConnection::SetAlerting ( const PString &  calleeName,
PBoolean  withMedia 
) [virtual]

Indicate to remote endpoint an alert is in progress. If this is an incoming connection and the AnswerCallResponse is in a AnswerCallDeferred or AnswerCallPending state, then this function is used to indicate to that endpoint that an alert is in progress. This is usually due to another connection which is in the call (the B party) has received an OnAlerting() indicating that its remote endpoint is "ringing".

The default behaviour does nothing.

Parameters:
calleeName  Name of endpoint being alerted.
withMedia  Flag to alert with/without media

Implements OpalConnection.

virtual bool SIPConnection::SetAlertingType ( const PString &  info  )  [virtual]

Set alerting type information for outgoing call. The type of "distinctive ringing" for the call. The string is protocol dependent, so the caller would need to be aware of the type of call being made. Some protocols may ignore the field completely.

For SIP this corresponds to the string contained in the "Alert-Info" header field of the INVITE. This is typically a URI for the ring file.

For H.323 this must be a string representation of an integer from 0 to 7 which will be contained in the Q.931 SIGNAL (0x34) Information Element.

Default behaviour returns false.

Reimplemented from OpalConnection.

virtual PBoolean SIPConnection::SetConnected (  )  [virtual]

Indicate to remote endpoint we are connected.

The default behaviour does nothing.

Reimplemented from OpalConnection.

bool SIPConnection::SetRemoteMediaFormats ( SDPSessionDescription sdp  )  [protected]

bool SIPConnection::SetTransport ( const SIPURL destination  ) 

virtual PBoolean SIPConnection::SetUpConnection (  )  [virtual]

Start an outgoing connection. This function will initiate the connection to the remote entity, for example in H.323 it sends a SETUP, in SIP it sends an INVITE etc.

The default behaviour is .

Implements OpalConnection.

virtual OpalMediaSession* SIPConnection::SetUpMediaSession ( const unsigned  rtpSessionId,
const OpalMediaType mediaType,
const SDPMediaDescription mediaDescription,
OpalTransportAddress localAddress,
bool &  remoteChanged 
) [protected, virtual]

void SIPConnection::StartPendingReINVITE (  )  [protected]

virtual bool SIPConnection::TransferConnection ( const PString &  remoteParty  )  [virtual]

Initiate the transfer of an existing call (connection) to a new remote party.

If remoteParty is a valid call token, then the remote party is transferred to that party (consultation transfer) and both calls are cleared.

Parameters:
remoteParty  Remote party to transfer the existing call to

Reimplemented from OpalConnection.

virtual bool SIPConnection::TransmitExternalIM ( const OpalMediaFormat format,
RTP_IMFrame body 
) [virtual]

Called to transmit an IM to the other end of the connection

Reimplemented from OpalConnection.

void SIPConnection::UpdateRemoteAddresses (  )  [protected]

bool SIPConnection::WriteINVITE (  )  [protected]

static PBoolean SIPConnection::WriteINVITE ( OpalTransport transport,
void *  param 
) [static, protected]


Friends And Related Function Documentation

friend class SIP_RTP_Session [friend]

friend class SIPInvite [friend]

friend class SIPTransaction [friend]


Field Documentation

bool SIPConnection::deleteTransport [protected]

SIPEndPoint& SIPConnection::endpoint [protected]

Reimplemented from OpalConnection.

PSafeList<SIPTransaction> SIPConnection::forkedInvitations [protected]

PString SIPConnection::forwardParty [protected]

PString SIPConnection::m_alertInfo [protected]

PStringList SIPConnection::m_allowedEvents [protected]

unsigned SIPConnection::m_allowedMethods [protected]

OpalMediaFormatList SIPConnection::m_answerFormatList [protected]

int SIPConnection::m_appearanceCode [protected]

unsigned SIPConnection::m_authenticatedCseq [protected]

SIPAuthentication* SIPConnection::m_authentication [protected]

SIPURL SIPConnection::m_ciscoRemotePartyID [protected]

SIPDialogContext SIPConnection::m_dialog [protected]

OpalGloballyUniqueID SIPConnection::m_dialogNotifyId [protected]

bool SIPConnection::m_handlingINVITE [protected]

bool SIPConnection::m_holdFromRemote [protected]

HoldState SIPConnection::m_holdToRemote [protected]

std::map<SIP_PDU::Methods, unsigned> SIPConnection::m_lastRxCSeq [protected]

bool SIPConnection::m_needReINVITE [protected]

PSafeList<SIPTransaction> SIPConnection::m_pendingTransactions [protected]

bool SIPConnection::m_prackEnabled [protected]

PRACKMode SIPConnection::m_prackMode [protected]

unsigned SIPConnection::m_prackSequenceNumber [protected]

bool SIPConnection::m_referInProgress [protected]

OpalMediaFormatList SIPConnection::m_remoteFormatList [protected]

PTimer SIPConnection::m_responseFailTimer [protected]

queue<SIP_PDU> SIPConnection::m_responsePackets [protected]

unsigned SIPConnection::m_responseRetryCount [protected]

PTimer SIPConnection::m_responseRetryTimer [protected]

std::map<std::string, SIP_PDU *> SIPConnection::m_responses [protected]

time_t SIPConnection::m_sdpSessionId [protected]

unsigned SIPConnection::m_sdpVersion [protected]

bool SIPConnection::m_switchedToFaxMode [protected]

bool SIPConnection::m_symmetricOpenStream [protected]

SIP_PDU* SIPConnection::originalInvite [protected]

PTime SIPConnection::originalInviteTime [protected]

PSafeList<SIPTransaction> SIPConnection::pendingInvitations [protected]

enum { ... } SIPConnection::releaseMethod [protected]

PTimer SIPConnection::sessionTimer [protected]

OpalTransport* SIPConnection::transport [protected]


The documentation for this class was generated from the following file:
Generated on Sun Nov 21 20:20:54 2010 for OPAL by  doxygen 1.4.7