sipcon.h

Go to the documentation of this file.
00001 /*
00002  * sipcon.h
00003  *
00004  * Session Initiation Protocol connection.
00005  *
00006  * Open Phone Abstraction Library (OPAL)
00007  * Formally known as the Open H323 project.
00008  *
00009  * Copyright (c) 2001 Equivalence Pty. Ltd.
00010  *
00011  * The contents of this file are subject to the Mozilla Public License
00012  * Version 1.0 (the "License"); you may not use this file except in
00013  * compliance with the License. You may obtain a copy of the License at
00014  * http://www.mozilla.org/MPL/
00015  *
00016  * Software distributed under the License is distributed on an "AS IS"
00017  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00018  * the License for the specific language governing rights and limitations
00019  * under the License.
00020  *
00021  * The Original Code is Open Phone Abstraction Library.
00022  *
00023  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
00024  *
00025  * Contributor(s): ______________________________________.
00026  *
00027  * $Log: sipcon.h,v $
00028  * Revision 2.75  2007/09/21 01:34:09  rjongbloed
00029  * Rewrite of SIP transaction handling to:
00030  *   a) use PSafeObject and safe collections
00031  *   b) only one database of transactions, remove connection copy
00032  *   c) fix timers not always firing due to bogus deadlock avoidance
00033  *   d) cleaning up only occurs in the existing garbage collection thread
00034  *   e) use of read/write mutex on endpoint list to avoid possible deadlock
00035  *
00036  * Revision 2.74  2007/08/22 09:01:18  csoutheren
00037  * Allow setting of explicit From field in SIP
00038  *
00039  * Revision 2.73  2007/07/22 12:25:23  rjongbloed
00040  * Removed redundent mutex
00041  *
00042  * Revision 2.72  2007/07/06 07:01:36  rjongbloed
00043  * Fixed borken re-INVITE handling (Hold and Retrieve)
00044  *
00045  * Revision 2.71  2007/07/05 05:40:21  rjongbloed
00046  * Changes to correctly distinguish between INVITE types: normal, forked and re-INVITE
00047  *   these are all handled slightly differently for handling request and responses.
00048  * Tidied the translation of SIP status codes and OPAL call end types and Q.931 cause codes.
00049  * Fixed (accidental?) suppression of 180 responses on alerting.
00050  *
00051  * Revision 2.70  2007/07/02 04:07:58  rjongbloed
00052  * Added hooks to get at PDU strings being read/written.
00053  *
00054  * Revision 2.69  2007/06/29 23:34:04  csoutheren
00055  * Add support for SIP 183 messages
00056  *
00057  * Revision 2.68  2007/06/27 18:19:49  csoutheren
00058  * Fix compile when video disabled
00059  *
00060  * Revision 2.67  2007/06/10 08:55:11  rjongbloed
00061  * Major rework of how SIP utilises sockets, using new "socket bundling" subsystem.
00062  *
00063  * Revision 2.66  2007/06/01 04:23:42  csoutheren
00064  * Added handling for SIP video update request as per
00065  * draft-levin-mmusic-xml-media-control-10.txt
00066  *
00067  * Revision 2.65  2007/05/23 20:53:40  dsandras
00068  * We should release the current session if no ACK is received after
00069  * an INVITE answer for a period of 64*T1. Don't trigger the ACK timer
00070  * when sending an ACK, only when not receiving one.
00071  *
00072  * Revision 2.64  2007/05/15 07:26:38  csoutheren
00073  * Remove deprecated  interface to STUN server in H323Endpoint
00074  * Change UseNATForIncomingCall to IsRTPNATEnabled
00075  * Various cleanups of messy and unused code
00076  *
00077  * Revision 2.63  2007/05/10 04:45:10  csoutheren
00078  * Change CSEQ storage to be an atomic integer
00079  * Fix hole in transaction mutex handling
00080  *
00081  * Revision 2.62  2007/04/19 06:34:12  csoutheren
00082  * Applied 1703206 - OpalVideoFastUpdatePicture over SIP
00083  * Thanks to Josh Mahonin
00084  *
00085  * Revision 2.61  2007/04/03 05:27:29  rjongbloed
00086  * Cleaned up somewhat confusing usage of the OnAnswerCall() virtual
00087  *   function. The name is innaccurate and exists as a legacy from the
00088  *   OpenH323 days. it now only indicates how alerting is done
00089  *   (with/without media) and does not actually answer the call.
00090  *
00091  * Revision 2.60  2007/03/01 05:51:04  rjongbloed
00092  * Fixed backward compatibility of OnIncomingConnection() virtual
00093  *   functions on various classes. If an old override returned FALSE
00094  *   then it will now abort the call as it used to.
00095  *
00096  * Revision 2.59  2007/02/19 04:42:27  csoutheren
00097  * Added OnIncomingMediaChannels so incoming calls can optionally be handled in two stages
00098  *
00099  * Revision 2.58  2007/01/24 04:00:56  csoutheren
00100  * Arrrghh. Changing OnIncomingConnection turned out to have a lot of side-effects
00101  * Added some pure viritual functions to prevent old code from breaking silently
00102  * New OpalEndpoint and OpalConnection descendants will need to re-implement
00103  * OnIncomingConnection. Sorry :)
00104  *
00105  * Revision 2.57  2007/01/18 04:45:16  csoutheren
00106  * Messy, but simple change to add additional options argument to OpalConnection constructor
00107  * This allows the provision of non-trivial arguments for connections
00108  *
00109  * Revision 2.56  2007/01/15 22:12:20  dsandras
00110  * Added missing mutex.
00111  *
00112  * Revision 2.55  2006/12/18 03:18:41  csoutheren
00113  * Messy but simple fixes
00114  *   - Add access to SIP REGISTER timeout
00115  *   - Ensure OpalConnection options are correctly progagated
00116  *
00117  * Revision 2.54  2006/11/11 12:23:18  hfriederich
00118  * Code reorganisation to improve RFC2833 handling for both SIP and H.323. Thanks Simon Zwahlen for the idea
00119  *
00120  * Revision 2.53  2006/10/01 17:16:32  hfriederich
00121  * Ensures that an ACK is sent out for every final response to INVITE
00122  *
00123  * Revision 2.52  2006/08/12 04:09:24  csoutheren
00124  * Applied 1538497 - Add the PING method
00125  * Thanks to Paul Rolland
00126  *
00127  * Revision 2.51  2006/07/14 04:22:43  csoutheren
00128  * Applied 1517397 - More Phobos stability fix
00129  * Thanks to Dinis Rosario
00130  *
00131  * Revision 2.50  2006/07/09 10:18:28  csoutheren
00132  * Applied 1517393 - Opal T.38
00133  * Thanks to Drazen Dimoti
00134  *
00135  * Revision 2.49  2006/07/09 10:03:28  csoutheren
00136  * Applied 1518681 - Refactoring boilerplate code
00137  * Thanks to Borko Jandras
00138  *
00139  * Revision 2.48  2006/07/05 04:29:14  csoutheren
00140  * Applied 1495008 - Add a callback: OnCreatingINVITE
00141  * Thanks to mturconi
00142  *
00143  * Revision 2.47  2006/06/28 11:29:07  csoutheren
00144  * Patch 1456858 - Add mutex to transaction dictionary and other stability patches
00145  * Thanks to drosario
00146  *
00147  * Revision 2.46  2006/05/30 04:58:06  csoutheren
00148  * Added suport for SIP INFO message (untested as yet)
00149  * Fixed some issues with SIP state machine on answering calls
00150  * Fixed some formatting issues
00151  *
00152  * Revision 2.45  2006/03/08 21:54:54  dsandras
00153  * Forgot to commit this file.
00154  *
00155  * Revision 2.44  2006/03/06 22:52:59  csoutheren
00156  * Reverted experimental SRV patch due to unintended side effects
00157  *
00158  * Revision 2.43  2006/03/06 12:56:02  csoutheren
00159  * Added experimental support for SIP SRV lookups
00160  *
00161  * Revision 2.42  2006/02/10 23:44:03  csoutheren
00162  * Applied fix for SetConnection and RFC2833 startup
00163  *
00164  * Revision 2.41  2006/01/02 14:47:28  dsandras
00165  * More code cleanups.
00166  *
00167  * Revision 2.40  2005/11/30 13:35:26  csoutheren
00168  * Changed tags for Doxygen
00169  *
00170  * Revision 2.39  2005/10/22 12:16:05  dsandras
00171  * Moved mutex preventing media streams to be opened before they are completely closed to the SIPConnection class.
00172  *
00173  * Revision 2.38  2005/10/13 19:33:50  dsandras
00174  * Added GetDirection to get the default direction for a media stream. Modified OnSendMediaDescription to call BuildSDP if no reverse streams can be opened.
00175  *
00176  * Revision 2.37  2005/10/04 12:57:18  rjongbloed
00177  * Removed CanOpenSourceMediaStream/CanOpenSinkMediaStream functions and
00178  *   now use overides on OpenSourceMediaStream/OpenSinkMediaStream
00179  *
00180  * Revision 2.36  2005/09/27 16:03:46  dsandras
00181  * Removed SendResponseToInvite and added SendPDU function that will change the transport address right before sending the PDU. This operation is atomic.
00182  *
00183  * Revision 2.35  2005/09/15 17:08:36  dsandras
00184  * Added support for CanOpen[Source|Sink]MediaStream.
00185  *
00186  * Revision 2.34  2005/08/25 18:49:52  dsandras
00187  * Added SIP Video support. Changed API of BuildSDP to allow it to be called
00188  * for both audio and video.
00189  *
00190  * Revision 2.33  2005/07/11 01:52:24  csoutheren
00191  * Extended AnsweringCall to work for SIP as well as H.323
00192  * Fixed problems with external RTP connection in H.323
00193  * Added call to OnClosedMediaStream
00194  *
00195  * Revision 2.32  2005/05/06 07:37:06  csoutheren
00196  * Various changed while working with SIP carrier
00197  *   - remove assumption that authentication realm is a domain name.
00198  *   - stopped rewrite of "To" field when proxy being used
00199  *   - fix Contact field in REGISTER to match actual port used when Symmetric NATin use
00200  *   - lots of formatting changes and cleanups
00201  *
00202  * Revision 2.31  2005/04/28 20:22:53  dsandras
00203  * Applied big sanity patch for SIP thanks to Ted Szoczei <tszoczei@microtronix.ca>.
00204  * Thanks a lot!
00205  *
00206  * Revision 2.30  2005/04/10 20:59:42  dsandras
00207  * Added call hold support (local and remote).
00208  *
00209  * Revision 2.29  2005/04/10 20:58:21  dsandras
00210  * Added function to handle incoming transfer (REFER).
00211  *
00212  * Revision 2.28  2005/04/10 20:57:18  dsandras
00213  * Added support for Blind Transfer (transfering and being transfered)
00214  *
00215  * Revision 2.27  2005/04/10 20:54:35  dsandras
00216  * Added function that returns the "best guess" callback URL of a connection.
00217  *
00218  * Revision 2.26  2005/02/19 22:48:48  dsandras
00219  * Added the possibility to register to several registrars and be able to do authenticated calls to each of them. Added SUBSCRIBE/NOTIFY support for Message Waiting Indications.
00220  *
00221  * Revision 2.25  2005/01/16 11:28:05  csoutheren
00222  * Added GetIdentifier virtual function to OpalConnection, and changed H323
00223  * and SIP descendants to use this function. This allows an application to
00224  * obtain a GUID for any connection regardless of the protocol used
00225  *
00226  * Revision 2.24  2004/12/25 20:43:41  dsandras
00227  * Attach the RFC2833 handlers when we are in connected state to ensure
00228  * OpalMediaPatch exist. Fixes problem for DTMF sending.
00229  *
00230  * Revision 2.23  2004/12/22 18:53:18  dsandras
00231  * Added definition for ForwardCall.
00232  *
00233  * Revision 2.22  2004/08/20 12:13:31  rjongbloed
00234  * Added correct handling of SIP 180 response
00235  *
00236  * Revision 2.21  2004/08/14 07:56:30  rjongbloed
00237  * Major revision to utilise the PSafeCollection classes for the connections and calls.
00238  *
00239  * Revision 2.20  2004/04/26 05:40:38  rjongbloed
00240  * Added RTP statistics callback to SIP
00241  *
00242  * Revision 2.19  2004/03/14 10:09:53  rjongbloed
00243  * Moved transport on SIP top be constructed by endpoint as any transport created on
00244  *   an endpoint can receive data for any connection.
00245  *
00246  * Revision 2.18  2004/03/13 06:30:03  rjongbloed
00247  * Changed parameter in UDP write function to void * from PObject *.
00248  *
00249  * Revision 2.17  2004/02/24 11:33:46  rjongbloed
00250  * Normalised RTP session management across protocols
00251  * Added support for NAT (via STUN)
00252  *
00253  * Revision 2.16  2004/02/07 02:20:32  rjongbloed
00254  * Changed to allow opening of more than just audio streams.
00255  *
00256  * Revision 2.15  2003/12/20 12:21:18  rjongbloed
00257  * Applied more enhancements, thank you very much Ted Szoczei
00258  *
00259  * Revision 2.14  2003/03/17 10:26:59  robertj
00260  * Added video support.
00261  *
00262  * Revision 2.13  2003/03/06 03:57:47  robertj
00263  * IVR support (work in progress) requiring large changes everywhere.
00264  *
00265  * Revision 2.12  2002/09/16 02:52:35  robertj
00266  * Added #define so can select if #pragma interface/implementation is used on
00267  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00268  *
00269  * Revision 2.11  2002/04/16 07:53:15  robertj
00270  * Changes to support calls through proxies.
00271  *
00272  * Revision 2.10  2002/04/10 03:13:45  robertj
00273  * Moved code for handling media bypass address resolution into ancestor as
00274  *   now done ths same way in both SIP and H.323.
00275  * Major changes to RTP session management when initiating an INVITE.
00276  *
00277  * Revision 2.9  2002/04/09 01:02:14  robertj
00278  * Fixed problems with restarting INVITE on  authentication required response.
00279  *
00280  * Revision 2.8  2002/04/08 02:40:13  robertj
00281  * Fixed issues with using double originate call, eg from simple app command line.
00282  *
00283  * Revision 2.7  2002/04/05 10:42:04  robertj
00284  * Major changes to support transactions (UDP timeouts and retries).
00285  *
00286  * Revision 2.6  2002/03/15 10:55:28  robertj
00287  * Added ability to specify proxy username/password in URL.
00288  *
00289  * Revision 2.5  2002/03/08 06:28:19  craigs
00290  * Changed to allow Authorisation to be included in other PDUs
00291  *
00292  * Revision 2.4  2002/02/19 07:52:40  robertj
00293  * Restructured media bypass functions to fix problems with RFC2833.
00294  *
00295  * Revision 2.3  2002/02/13 04:55:59  craigs
00296  * Fixed problem with endless loop if proxy keeps failing authentication with 407
00297  *
00298  * Revision 2.2  2002/02/11 07:34:06  robertj
00299  * Changed SDP to use OpalTransport for hosts instead of IP addresses/ports
00300  * Added media bypass for streams between compatible protocols.
00301  *
00302  * Revision 2.1  2002/02/01 04:53:01  robertj
00303  * Added (very primitive!) SIP support.
00304  *
00305  */
00306 
00307 #ifndef __OPAL_SIPCON_H
00308 #define __OPAL_SIPCON_H
00309 
00310 #ifdef P_USE_PRAGMA
00311 #pragma interface
00312 #endif
00313 
00314 #include <opal/buildopts.h>
00315 #include <opal/connection.h>
00316 #include <sip/sippdu.h>
00317 #if OPAL_VIDEO
00318 #include <opal/pcss.h>                  // for OpalPCSSConnection
00319 #include <codec/vidcodec.h>             // for OpalVideoUpdatePicture command
00320 #endif
00321 
00322 class OpalCall;
00323 class SIPEndPoint;
00324 
00325 
00327 
00330 class SIPConnection : public OpalConnection
00331 {
00332   PCLASSINFO(SIPConnection, OpalConnection);
00333   public:
00334 
00339     SIPConnection(
00340       OpalCall & call,                          
00341       SIPEndPoint & endpoint,                   
00342       const PString & token,                    
00343       const SIPURL & address,                   
00344       OpalTransport * transport,                
00345       unsigned int options = 0,                 
00346       OpalConnection::StringOptions * stringOptions = NULL  
00347     );
00348 
00351     ~SIPConnection();
00353 
00362     virtual BOOL SetUpConnection();
00363 
00367     virtual void TransferConnection(
00368       const PString & remoteParty,   
00369       const PString & callIdentity = PString::Empty()
00371     );
00372 
00375     virtual void HoldConnection();
00376 
00380     virtual void RetrieveConnection();
00381 
00384     virtual BOOL IsConnectionOnHold();
00385 
00396     virtual BOOL SetAlerting(
00397       const PString & calleeName,   
00398       BOOL withMedia
00399     );
00400 
00405     virtual BOOL SetConnected();
00406 
00409     virtual OpalMediaFormatList GetMediaFormats() const;
00410     
00413     virtual BOOL OpenSourceMediaStream(
00414       const OpalMediaFormatList & mediaFormats, 
00415       unsigned sessionID                   
00416     );
00417 
00420     virtual OpalMediaStream * OpenSinkMediaStream(
00421       OpalMediaStream & source    
00422     );
00423 
00438     virtual OpalMediaStream * CreateMediaStream(
00439       const OpalMediaFormat & mediaFormat, 
00440       unsigned sessionID,                  
00441       BOOL isSource                        
00442     );
00443         
00446     virtual void OnPatchMediaStream(BOOL isSource, OpalMediaPatch & patch);
00447 
00448 
00459     void AnsweringCall(
00460       AnswerCallResponse response 
00461     );
00462 
00463 
00475     virtual void OnConnected();
00476 
00482     virtual BOOL IsMediaBypassPossible(
00483       unsigned sessionID                  
00484     ) const;
00485 
00503     virtual void OnReleased();
00505 
00510     virtual void OnTransactionFailed(
00511       SIPTransaction & transaction
00512     );
00513 
00516     virtual void OnReceivedPDU(SIP_PDU & pdu);
00517 
00520     virtual void OnReceivedINVITE(SIP_PDU & pdu);
00521 
00524     virtual void OnReceivedReINVITE(SIP_PDU & pdu);
00525 
00528     virtual void OnReceivedACK(SIP_PDU & pdu);
00529   
00532     virtual void OnReceivedOPTIONS(SIP_PDU & pdu);
00533 
00536     virtual void OnReceivedNOTIFY(SIP_PDU & pdu);
00537 
00540     virtual void OnReceivedREFER(SIP_PDU & pdu);
00541   
00544     virtual void OnReceivedINFO(SIP_PDU & pdu);
00545 
00548     virtual void OnReceivedPING(SIP_PDU & pdu);
00549 
00552     virtual void OnReceivedBYE(SIP_PDU & pdu);
00553   
00556     virtual void OnReceivedCANCEL(SIP_PDU & pdu);
00557   
00560     virtual void OnReceivedResponse(
00561       SIPTransaction & transaction,
00562       SIP_PDU & response
00563     );
00564 
00567     virtual void OnReceivedTrying(SIP_PDU & pdu);
00568   
00571     virtual void OnReceivedRinging(SIP_PDU & pdu);
00572   
00575     virtual void OnReceivedSessionProgress(SIP_PDU & pdu);
00576   
00580     virtual BOOL OnReceivedAuthenticationRequired(
00581       SIPTransaction & transaction,
00582       SIP_PDU & response
00583     );
00584   
00587     virtual void OnReceivedRedirection(SIP_PDU & pdu);
00588 
00592     virtual void OnReceivedOK(
00593       SIPTransaction & transaction,
00594       SIP_PDU & response
00595     );
00596   
00599     virtual void OnCreatingINVITE(SIP_PDU & pdu);
00600 
00608     void QueuePDU(
00609       SIP_PDU * pdu
00610     );
00611 
00619     virtual void OnRTPStatistics(
00620       const RTP_Session & session         
00621     ) const;
00623 
00624 
00634     virtual BOOL ForwardCall(
00635       const PString & forwardParty   
00636     );
00637 
00643     virtual SendUserInputModes GetRealSendUserInputMode() const;
00644 
00661     BOOL SendUserInputTone(char tone, unsigned duration);
00662     
00665     virtual BOOL SendInviteOK(const SDPSessionDescription & sdp);
00666         
00667         virtual BOOL SendACK(SIPTransaction & invite, SIP_PDU & response);
00668 
00671     virtual BOOL SendInviteResponse(
00672       SIP_PDU::StatusCodes code,
00673       const char * contact = NULL,
00674       const char * extra = NULL,
00675       const SDPSessionDescription * sdp = NULL
00676     );
00677 
00681     virtual BOOL SendPDU(SIP_PDU &, const OpalTransportAddress &);
00682 
00683     unsigned GetNextCSeq() { return ++lastSentCSeq; }
00684 
00685     BOOL BuildSDP(
00686       SDPSessionDescription * &,     
00687       RTP_SessionManager & rtpSessions,
00688       unsigned rtpSessionId
00689     );
00690 
00691     OpalTransportAddress GetLocalAddress(WORD port = 0) const;
00692 
00693     OpalTransport & GetTransport() const { return *transport; }
00694 
00695     virtual PString GetLocalPartyAddress() const { return localPartyAddress; }
00696     virtual PString GetExplicitFrom() const;
00697 
00700     virtual void SetLocalPartyAddress();
00701     void SetLocalPartyAddress(
00702       const PString & addr
00703     ) { localPartyAddress = addr; }
00704 
00709     const PString GetRemotePartyCallbackURL() const;
00710 
00711     SIPEndPoint & GetEndPoint() const { return endpoint; }
00712     const SIPURL & GetTargetAddress() const { return targetAddress; }
00713     const PStringList & GetRouteSet() const { return routeSet; }
00714     const SIPAuthentication & GetAuthenticator() const { return authentication; }
00715 
00716     BOOL OnOpenIncomingMediaChannels();
00717 
00718 #if OPAL_VIDEO
00719 
00724     virtual BOOL OnMediaControlXML(SIP_PDU & pdu);
00725 #endif
00726 
00727   protected:
00728     PDECLARE_NOTIFIER(PThread, SIPConnection, HandlePDUsThreadMain);
00729     PDECLARE_NOTIFIER(PThread, SIPConnection, OnAckTimeout);
00730 
00731     virtual RTP_UDP *OnUseRTPSession(
00732       const unsigned rtpSessionId,
00733       const OpalTransportAddress & mediaAddress,
00734       OpalTransportAddress & localAddress
00735     );
00736     virtual void OnReceivedSDP(SIP_PDU & pdu);
00737     virtual BOOL OnReceivedSDPMediaDescription(
00738       SDPSessionDescription & sdp,
00739       SDPMediaDescription::MediaType mediaType,
00740       unsigned sessionId
00741     );
00742     virtual BOOL OnSendSDPMediaDescription(
00743       const SDPSessionDescription & sdpIn,
00744       SDPMediaDescription::MediaType mediaType,
00745       unsigned sessionId,
00746       SDPSessionDescription & sdpOut
00747     );
00748     virtual BOOL OnOpenSourceMediaStreams(
00749       const OpalMediaFormatList & remoteFormatList,
00750       unsigned sessionId,
00751       SDPMediaDescription *localMedia
00752     );
00753     SDPMediaDescription::Direction GetDirection(unsigned sessionId);
00754     static BOOL WriteINVITE(OpalTransport & transport, void * param);
00755 
00756     OpalTransport * CreateTransport(const OpalTransportAddress & address, BOOL isLocalAddress = FALSE);
00757 
00758     BOOL ConstructSDP(SDPSessionDescription & sdpOut);
00759 
00760     void UpdateRemotePartyNameAndNumber();
00761 
00762     SIPEndPoint         & endpoint;
00763     OpalTransport       * transport;
00764 
00765     PMutex                transportMutex;
00766     BOOL                  local_hold;
00767     BOOL                  remote_hold;
00768     PString               localPartyAddress;
00769     PString               forwardParty;
00770     SIP_PDU             * originalInvite;
00771     SDPSessionDescription remoteSDP;
00772     PStringList           routeSet;
00773     SIPURL                targetAddress;
00774     SIPAuthentication     authentication;
00775 
00776     SIP_PDU_Queue pduQueue;
00777     PSemaphore    pduSemaphore;
00778     PThread     * pduHandler;
00779 
00780     PTimer                    ackTimer;
00781     PSafePtr<SIPTransaction>  referTransaction;
00782     PSafeList<SIPTransaction> forkedInvitations; // Not for re-INVITE
00783     PAtomicInteger            lastSentCSeq;
00784 
00785     enum {
00786       ReleaseWithBYE,
00787       ReleaseWithCANCEL,
00788       ReleaseWithResponse,
00789       ReleaseWithNothing,
00790     } releaseMethod;
00791 
00792     OpalMediaFormatList remoteFormatList;
00793 
00794     PString explicitFrom;
00795 };
00796 
00797 
00800 class SIP_RTP_Session : public RTP_UserData
00801 {
00802   PCLASSINFO(SIP_RTP_Session, RTP_UserData);
00803 
00808     SIP_RTP_Session(
00809       const SIPConnection & connection  
00810     );
00812 
00821     virtual void OnTxStatistics(
00822       const RTP_Session & session   
00823     ) const;
00824 
00831     virtual void OnRxStatistics(
00832       const RTP_Session & session   
00833     ) const;
00834 
00835 #if OPAL_VIDEO
00836 
00840     virtual void OnRxIntraFrameRequest(
00841       const RTP_Session & session   
00842     ) const;
00843 
00847     virtual void OnTxIntraFrameRequest(
00848       const RTP_Session & session   
00849     ) const;
00850 #endif
00851 
00852 
00853   protected:
00854     const SIPConnection & connection; 
00855 #if OPAL_VIDEO
00856     // Encoding stream to alert with OpalVideoUpdatePicture commands.  Mutable
00857     // so functions with constant 'this' pointers (eg: OnRxFrameRequest) can
00858     // update it.
00859     //mutable OpalMediaStream * encodingStream; 
00860 
00861 #endif
00862 };
00863 
00864 
00865 #endif // __OPAL_SIPCON_H
00866 
00867 
00868 // End of File ///////////////////////////////////////////////////////////////

Generated on Fri Mar 7 06:33:41 2008 for OPAL by  doxygen 1.5.1