00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef OPAL_SIP_SIPPDU_H
00033 #define OPAL_SIP_SIPPDU_H
00034
00035 #ifdef P_USE_PRAGMA
00036 #pragma interface
00037 #endif
00038
00039 #include <opal/buildopts.h>
00040
00041 #if OPAL_SIP
00042
00043 #include <ptclib/mime.h>
00044 #include <ptclib/url.h>
00045 #include <sip/sdp.h>
00046 #include <opal/rtpconn.h>
00047
00048
00049 class OpalTransport;
00050 class OpalTransportAddress;
00051 class OpalProductInfo;
00052
00053 class SIPEndPoint;
00054 class SIPConnection;
00055 class SIP_PDU;
00056
00057
00059
00060
00066 class SIPURL : public PURL
00067 {
00068 PCLASSINFO(SIPURL, PURL);
00069 public:
00070 SIPURL();
00071
00074 SIPURL(
00075 const char * cstr,
00076 const char * defaultScheme = NULL
00077 );
00078
00081 SIPURL(
00082 const PString & str,
00083 const char * defaultScheme = NULL
00084 );
00085
00093 SIPURL(
00094 const PString & name,
00095 const OpalTransportAddress & address,
00096 WORD listenerPort = 0
00097 );
00098
00107 virtual Comparison Compare(
00108 const PObject & obj
00109 ) const;
00110
00114 PString AsQuotedString() const;
00115
00118 PString GetDisplayName(PBoolean useDefault = PTrue) const;
00119
00120 void SetDisplayName(const PString & str)
00121 { displayName = str; }
00122
00125 PString GetFieldParameters() const { return fieldParameters; }
00126
00129 OpalTransportAddress GetHostAddress() const;
00130
00131 enum UsageContext {
00132 ExternalURI,
00133 RequestURI,
00134 ToURI,
00135 FromURI,
00136 ContactURI,
00137 RouteURI,
00138 RegisterURI
00139 };
00140
00146 void Sanitise(
00147 UsageContext context
00148 );
00149
00155 PBoolean AdjustToDNS(
00156 PINDEX entry = 0
00157 );
00158
00159 protected:
00178 virtual PBoolean InternalParse(
00179 const char * cstr,
00180 const char * defaultScheme
00181 );
00182
00183 PString displayName;
00184 PString fieldParameters;
00185 };
00186
00187
00189
00190
00221 class SIPMIMEInfo : public PMIMEInfo
00222 {
00223 PCLASSINFO(SIPMIMEInfo, PMIMEInfo);
00224 public:
00225 SIPMIMEInfo(bool compactForm = false);
00226
00227 virtual void PrintOn(ostream & strm) const;
00228 virtual void ReadFrom(istream & strm);
00229
00230 void SetCompactForm(bool form) { compactForm = form; }
00231
00232 PString GetContentType() const;
00233 void SetContentType(const PString & v);
00234
00235 PString GetContentEncoding() const;
00236 void SetContentEncoding(const PString & v);
00237
00238 PString GetFrom() const;
00239 void SetFrom(const PString & v);
00240
00241 PString GetPAssertedIdentity() const;
00242 void SetPAssertedIdentity(const PString & v);
00243
00244 PString GetPPreferredIdentity() const;
00245 void SetPPreferredIdentity(const PString & v);
00246
00247 PString GetAccept() const;
00248 void SetAccept(const PString & v);
00249
00250 PString GetAcceptEncoding() const;
00251 void SetAcceptEncoding(const PString & v);
00252
00253 PString GetAcceptLanguage() const;
00254 void SetAcceptLanguage(const PString & v);
00255
00256 PString GetAllow() const;
00257 void SetAllow(const PString & v);
00258
00259 PString GetCallID() const;
00260 void SetCallID(const PString & v);
00261
00262 PString GetContact() const;
00263 bool GetContacts(std::list<SIPURL> & contacts) const;
00264 void SetContact(const PString & v);
00265 void SetContact(const SIPURL & url);
00266
00267 PString GetSubject() const;
00268 void SetSubject(const PString & v);
00269
00270 PString GetTo() const;
00271 void SetTo(const PString & v);
00272
00273 PString GetVia() const;
00274 void SetVia(const PString & v);
00275
00276 PStringList GetViaList() const;
00277 void SetViaList(const PStringList & v);
00278
00279 PString GetReferTo() const;
00280 void SetReferTo(const PString & r);
00281
00282 PString GetReferredBy() const;
00283 void SetReferredBy(const PString & r);
00284
00285 PINDEX GetContentLength() const;
00286 void SetContentLength(PINDEX v);
00287 PBoolean IsContentLengthPresent() const;
00288
00289 PString GetCSeq() const;
00290 void SetCSeq(const PString & v);
00291
00292 PString GetDate() const;
00293 void SetDate(const PString & v);
00294 void SetDate(const PTime & t);
00295 void SetDate(void);
00296
00297 unsigned GetExpires(unsigned dflt = UINT_MAX) const;
00298 void SetExpires(unsigned v);
00299
00300 PINDEX GetMaxForwards() const;
00301 void SetMaxForwards(PINDEX v);
00302
00303 PINDEX GetMinExpires() const;
00304 void SetMinExpires(PINDEX v);
00305
00306 PString GetProxyAuthenticate() const;
00307 void SetProxyAuthenticate(const PString & v);
00308
00309 PStringList GetRoute() const;
00310 void SetRoute(const PStringList & v);
00311
00312 PStringList GetRecordRoute() const;
00313 void SetRecordRoute(const PStringList & v);
00314
00315 unsigned GetCSeqIndex() const { return GetCSeq().AsUnsigned(); }
00316
00317 PString GetSupported() const;
00318 void SetSupported(const PString & v);
00319
00320 PString GetUnsupported() const;
00321 void SetUnsupported(const PString & v);
00322
00323 PString GetEvent() const;
00324 void SetEvent(const PString & v);
00325
00326 PString GetSubscriptionState() const;
00327 void SetSubscriptionState(const PString & v);
00328
00329 PString GetUserAgent() const;
00330 void SetUserAgent(const PString & v);
00331
00332 PString GetOrganization() const;
00333 void SetOrganization(const PString & v);
00334
00335 void GetProductInfo(OpalProductInfo & info);
00336 void SetProductInfo(const PString & ua, const OpalProductInfo & info);
00337
00338 PString GetWWWAuthenticate() const;
00339 void SetWWWAuthenticate(const PString & v);
00340
00341 PString GetSIPIfMatch() const;
00342 void SetSIPIfMatch(const PString & v);
00343
00344 PString GetSIPETag() const;
00345 void SetSIPETag(const PString & v);
00346
00349 PString GetFieldParameter(
00350 const PString & fieldName,
00351 const PString & paramName,
00352 const PString & defaultValue = PString::Empty()
00353 ) const { return ExtractFieldParameter((*this)(fieldName), paramName, defaultValue); }
00354
00359 void SetFieldParameter(
00360 const PString & fieldName,
00361 const PString & paramName,
00362 const PString & newValue
00363 ) { SetAt(fieldName, InsertFieldParameter((*this)(fieldName), paramName, newValue)); }
00364
00367 static PString ExtractFieldParameter(
00368 const PString & fieldValue,
00369 const PString & paramName,
00370 const PString & defaultValue = PString::Empty()
00371 );
00372
00377 static PString InsertFieldParameter(
00378 const PString & fieldValue,
00379 const PString & paramName,
00380 const PString & newValue
00381 );
00382
00383 protected:
00386 PStringList GetRouteList(const char * name) const;
00387
00391 void SetRouteList(const char * name, const PStringList & v);
00392
00394 bool compactForm;
00395 };
00396
00397
00399
00400
00401 class SIPAuthentication : public PObject
00402 {
00403 PCLASSINFO(SIPAuthentication, PObject);
00404 public:
00405 SIPAuthentication();
00406
00407 virtual Comparison Compare(
00408 const PObject & other
00409 ) const;
00410
00411 virtual PBoolean Parse(
00412 const PString & auth,
00413 PBoolean proxy
00414 ) = 0;
00415
00416 virtual PBoolean Authorise(
00417 SIP_PDU & pdu
00418 ) const = 0;
00419
00420 virtual PBoolean IsProxy() const { return isProxy; }
00421
00422 virtual PString GetUsername() const { return username; }
00423 virtual PString GetPassword() const { return password; }
00424 virtual PString GetAuthRealm() const { return PString::Empty(); }
00425
00426 virtual void SetUsername(const PString & user) { username = user; }
00427 virtual void SetPassword(const PString & pass) { password = pass; }
00428 virtual void SetAuthRealm(const PString &) { }
00429
00430 PString GetAuthParam(const PString & auth, const char * name) const;
00431 PString AsHex(PMessageDigest5::Code & digest) const;
00432 PString AsHex(const PBYTEArray & data) const;
00433
00434 static SIPAuthentication * ParseAuthenticationRequired(bool isProxy,
00435 const PString & line,
00436 PString & errorMsg);
00437
00438 protected:
00439 PBoolean isProxy;
00440
00441 PString username;
00442 PString password;
00443 };
00444
00445 typedef PFactory<SIPAuthentication> SIPAuthenticationFactory;
00446
00448
00449 class SIPDigestAuthentication : public SIPAuthentication
00450 {
00451 PCLASSINFO(SIPDigestAuthentication, SIPAuthentication);
00452 public:
00453 SIPDigestAuthentication();
00454
00455 SIPDigestAuthentication & operator =(
00456 const SIPDigestAuthentication & auth
00457 );
00458
00459 virtual Comparison Compare(
00460 const PObject & other
00461 ) const;
00462
00463 virtual PBoolean Parse(
00464 const PString & auth,
00465 PBoolean proxy
00466 );
00467
00468 virtual PBoolean Authorise(
00469 SIP_PDU & pdu
00470 ) const;
00471
00472 virtual PString GetAuthRealm() const { return authRealm; }
00473 virtual void SetAuthRealm(const PString & r) { authRealm = r; }
00474
00475 enum Algorithm {
00476 Algorithm_MD5,
00477 NumAlgorithms
00478 };
00479 const PString & GetNonce() const { return nonce; }
00480 Algorithm GetAlgorithm() const { return algorithm; }
00481 const PString & GetOpaque() const { return opaque; }
00482
00483 protected:
00484 PString authRealm;
00485 PString nonce;
00486 Algorithm algorithm;
00487 PString opaque;
00488
00489 PBoolean qopAuth;
00490 PBoolean qopAuthInt;
00491 PString cnonce;
00492 mutable PAtomicInteger nonceCount;
00493 };
00494
00496
00497
00503 class SIP_PDU : public PSafeObject
00504 {
00505 PCLASSINFO(SIP_PDU, PSafeObject);
00506 public:
00507 enum Methods {
00508 Method_INVITE,
00509 Method_ACK,
00510 Method_OPTIONS,
00511 Method_BYE,
00512 Method_CANCEL,
00513 Method_REGISTER,
00514 Method_SUBSCRIBE,
00515 Method_NOTIFY,
00516 Method_REFER,
00517 Method_MESSAGE,
00518 Method_INFO,
00519 Method_PING,
00520 Method_PUBLISH,
00521 NumMethods
00522 };
00523
00524 enum StatusCodes {
00525 IllegalStatusCode,
00526 Local_TransportError,
00527 Local_BadTransportAddress,
00528
00529 Information_Trying = 100,
00530 Information_Ringing = 180,
00531 Information_CallForwarded = 181,
00532 Information_Queued = 182,
00533 Information_Session_Progress = 183,
00534
00535 Successful_OK = 200,
00536 Successful_Accepted = 202,
00537
00538 Redirection_MultipleChoices = 300,
00539 Redirection_MovedPermanently = 301,
00540 Redirection_MovedTemporarily = 302,
00541 Redirection_UseProxy = 305,
00542 Redirection_AlternativeService = 380,
00543
00544 Failure_BadRequest = 400,
00545 Failure_UnAuthorised = 401,
00546 Failure_PaymentRequired = 402,
00547 Failure_Forbidden = 403,
00548 Failure_NotFound = 404,
00549 Failure_MethodNotAllowed = 405,
00550 Failure_NotAcceptable = 406,
00551 Failure_ProxyAuthenticationRequired = 407,
00552 Failure_RequestTimeout = 408,
00553 Failure_Conflict = 409,
00554 Failure_Gone = 410,
00555 Failure_LengthRequired = 411,
00556 Failure_RequestEntityTooLarge = 413,
00557 Failure_RequestURITooLong = 414,
00558 Failure_UnsupportedMediaType = 415,
00559 Failure_UnsupportedURIScheme = 416,
00560 Failure_BadExtension = 420,
00561 Failure_ExtensionRequired = 421,
00562 Failure_IntervalTooBrief = 423,
00563 Failure_TemporarilyUnavailable = 480,
00564 Failure_TransactionDoesNotExist = 481,
00565 Failure_LoopDetected = 482,
00566 Failure_TooManyHops = 483,
00567 Failure_AddressIncomplete = 484,
00568 Failure_Ambiguous = 485,
00569 Failure_BusyHere = 486,
00570 Failure_RequestTerminated = 487,
00571 Failure_NotAcceptableHere = 488,
00572 Failure_BadEvent = 489,
00573 Failure_RequestPending = 491,
00574 Failure_Undecipherable = 493,
00575
00576 Failure_InternalServerError = 500,
00577 Failure_NotImplemented = 501,
00578 Failure_BadGateway = 502,
00579 Failure_ServiceUnavailable = 503,
00580 Failure_ServerTimeout = 504,
00581 Failure_SIPVersionNotSupported = 505,
00582 Failure_MessageTooLarge = 513,
00583
00584 GlobalFailure_BusyEverywhere = 600,
00585 GlobalFailure_Decline = 603,
00586 GlobalFailure_DoesNotExistAnywhere = 604,
00587 GlobalFailure_NotAcceptable = 606,
00588
00589 MaxStatusCode = 699
00590 };
00591
00592 static const char * GetStatusCodeDescription(int code);
00593 friend ostream & operator<<(ostream & strm, StatusCodes status);
00594
00595 enum {
00596 MaxSize = 65535
00597 };
00598
00599 SIP_PDU();
00600
00603 SIP_PDU(
00604 Methods method,
00605 const SIPURL & dest,
00606 const PString & to,
00607 const PString & from,
00608 const PString & callID,
00609 unsigned cseq,
00610 const OpalTransportAddress & via
00611 );
00614 SIP_PDU(
00615 Methods method,
00616 SIPConnection & connection,
00617 const OpalTransport & transport
00618 );
00619
00623 SIP_PDU(
00624 const SIP_PDU & request,
00625 StatusCodes code,
00626 const char * contact = NULL,
00627 const char * extra = NULL,
00628 const SDPSessionDescription * sdp = NULL
00629 );
00630 SIP_PDU(const SIP_PDU &);
00631 SIP_PDU & operator=(const SIP_PDU &);
00632 ~SIP_PDU();
00633
00634 void PrintOn(
00635 ostream & strm
00636 ) const;
00637
00638 void Construct(
00639 Methods method
00640 );
00641 void Construct(
00642 Methods method,
00643 const SIPURL & dest,
00644 const PString & to,
00645 const PString & from,
00646 const PString & callID,
00647 unsigned cseq,
00648 const OpalTransportAddress & via
00649 );
00650 void Construct(
00651 Methods method,
00652 SIPConnection & connection,
00653 const OpalTransport & transport
00654 );
00655
00660 PBoolean SetRoute(const PStringList & routeSet);
00661
00664 void SetAllow(unsigned bitmask);
00665
00668 void AdjustVia(OpalTransport & transport);
00669
00672 PBoolean Read(
00673 OpalTransport & transport
00674 );
00675
00678 PBoolean Write(
00679 OpalTransport & transport,
00680 const OpalTransportAddress & remoteAddress = OpalTransportAddress(),
00681 const PString & localInterface = PString::Empty()
00682 );
00683
00686 bool SendResponse(
00687 OpalTransport & transport,
00688 StatusCodes code,
00689 const char * contact = NULL,
00690 const char * extra = NULL
00691 );
00692 bool SendResponse(
00693 OpalTransport & transport,
00694 SIP_PDU & response
00695 );
00696
00700 PString Build();
00701
00702 PString GetTransactionID() const;
00703
00704 Methods GetMethod() const { return method; }
00705 StatusCodes GetStatusCode () const { return statusCode; }
00706 const SIPURL & GetURI() const { return uri; }
00707 unsigned GetVersionMajor() const { return versionMajor; }
00708 unsigned GetVersionMinor() const { return versionMinor; }
00709 const PString & GetEntityBody() const { return entityBody; }
00710 PString & GetEntityBody() { return entityBody; }
00711 const PString & GetInfo() const { return info; }
00712 const SIPMIMEInfo & GetMIME() const { return mime; }
00713 SIPMIMEInfo & GetMIME() { return mime; }
00714 void SetURI(const SIPURL & newuri) { uri = newuri; }
00715 SDPSessionDescription * GetSDP();
00716
00717 protected:
00718 Methods method;
00719 StatusCodes statusCode;
00720 SIPURL uri;
00721 unsigned versionMajor;
00722 unsigned versionMinor;
00723 PString info;
00724 SIPMIMEInfo mime;
00725 PString entityBody;
00726
00727 SDPSessionDescription * m_SDP;
00728
00729 mutable PString transactionID;
00730 };
00731
00732
00733 PQUEUE(SIP_PDU_Queue, SIP_PDU);
00734
00735
00736 #if PTRACING
00737 ostream & operator<<(ostream & strm, SIP_PDU::Methods method);
00738 #endif
00739
00740
00742
00743
00754 class SIPTransaction : public SIP_PDU
00755 {
00756 PCLASSINFO(SIPTransaction, SIP_PDU);
00757 public:
00758 SIPTransaction(
00759 SIPEndPoint & endpoint,
00760 OpalTransport & transport,
00761 const PTimeInterval & minRetryTime = PMaxTimeInterval,
00762 const PTimeInterval & maxRetryTime = PMaxTimeInterval
00763 );
00767 SIPTransaction(
00768 SIPConnection & connection,
00769 OpalTransport & transport,
00770 Methods method = NumMethods
00771 );
00772 ~SIPTransaction();
00773
00774 PBoolean Start();
00775 PBoolean IsInProgress() const { return state == Trying || state == Proceeding; }
00776 PBoolean IsFailed() const { return state > Terminated_Success; }
00777 PBoolean IsCompleted() const { return state >= Completed; }
00778 PBoolean IsCanceled() const { return state == Cancelling || state == Terminated_Cancelled || state == Terminated_Aborted; }
00779 PBoolean IsTerminated() const { return state >= Terminated_Success; }
00780
00781 void WaitForCompletion();
00782 PBoolean Cancel();
00783 void Abort();
00784
00785 virtual PBoolean OnReceivedResponse(SIP_PDU & response);
00786 virtual PBoolean OnCompleted(SIP_PDU & response);
00787
00788 OpalTransport & GetTransport() const { return transport; }
00789 SIPConnection * GetConnection() const { return connection; }
00790 PString GetInterface() const { return m_localInterface; }
00791
00792 protected:
00793 void Construct(
00794 const PTimeInterval & minRetryTime = PMaxTimeInterval,
00795 const PTimeInterval & maxRetryTime = PMaxTimeInterval
00796 );
00797 bool SendPDU(SIP_PDU & pdu);
00798 bool ResendCANCEL();
00799
00800 PDECLARE_NOTIFIER(PTimer, SIPTransaction, OnRetry);
00801 PDECLARE_NOTIFIER(PTimer, SIPTransaction, OnTimeout);
00802
00803 enum States {
00804 NotStarted,
00805 Trying,
00806 Proceeding,
00807 Cancelling,
00808 Completed,
00809 Terminated_Success,
00810 Terminated_Timeout,
00811 Terminated_RetriesExceeded,
00812 Terminated_TransportError,
00813 Terminated_Cancelled,
00814 Terminated_Aborted,
00815 NumStates
00816 };
00817 virtual void SetTerminated(States newState);
00818
00819 SIPEndPoint & endpoint;
00820 OpalTransport & transport;
00821 PSafePtr<SIPConnection> connection;
00822 PTimeInterval retryTimeoutMin;
00823 PTimeInterval retryTimeoutMax;
00824
00825 States state;
00826 unsigned retry;
00827 PTimer retryTimer;
00828 PTimer completionTimer;
00829 PSyncPoint completed;
00830 PString m_localInterface;
00831 OpalTransportAddress m_remoteAddress;
00832 };
00833
00834
00836
00837
00843 class SIPInvite : public SIPTransaction
00844 {
00845 PCLASSINFO(SIPInvite, SIPTransaction);
00846 public:
00847 SIPInvite(
00848 SIPConnection & connection,
00849 OpalTransport & transport,
00850 OpalRTPSessionManager * sm
00851 );
00852
00853 virtual PBoolean OnReceivedResponse(SIP_PDU & response);
00854
00855 OpalRTPSessionManager & GetSessionManager() { return rtpSessions; }
00856
00857 protected:
00858 OpalRTPSessionManager rtpSessions;
00859 };
00860
00861
00863
00864 class SIPRegister : public SIPTransaction
00865 {
00866 PCLASSINFO(SIPRegister, SIPTransaction);
00867 public:
00868 struct Params {
00869 Params();
00870
00871 PString m_addressOfRecord;
00872 PString m_registrarAddress;
00873 PString m_contactAddress;
00874 PString m_authID;
00875 PString m_password;
00876 PString m_realm;
00877 unsigned m_expire;
00878 unsigned m_restoreTime;
00879 PTimeInterval m_minRetryTime;
00880 PTimeInterval m_maxRetryTime;
00881 };
00882
00883 SIPRegister(
00884 SIPEndPoint & endpoint,
00885 OpalTransport & transport,
00886 const PStringList & routeSet,
00887 const PString & id,
00888 unsigned cseq,
00889 const Params & params
00890 );
00891 };
00892
00893
00895
00896 class SIPSubscribe : public SIPTransaction
00897 {
00898 PCLASSINFO(SIPSubscribe, SIPTransaction);
00899 public:
00902 enum PredefinedPackages {
00903 MessageSummary,
00904 Presence,
00905 NumPredefinedPackages
00906 };
00907 static PredefinedPackages GetEventPackage(const PString & name);
00908 static PString GetEventPackageName(PredefinedPackages pkg);
00909
00910 struct Params {
00911 Params(PredefinedPackages pkg = NumPredefinedPackages);
00912
00913 PString m_eventPackage;
00914 PString m_mimeType;
00915 PString m_targetAddress;
00916 PString m_contactAddress;
00917 PString m_authID;
00918 PString m_password;
00919 PString m_realm;
00920 unsigned m_expire;
00921 unsigned m_restoreTime;
00922 PTimeInterval m_minRetryTime;
00923 PTimeInterval m_maxRetryTime;
00924 };
00925
00928 SIPSubscribe(
00929 SIPEndPoint & ep,
00930 OpalTransport & trans,
00931 const PStringList & routeSet,
00932 const PString & to,
00933 const PString & from,
00934 const PString & id,
00935 unsigned cseq,
00936 const Params & params
00937 );
00938 };
00939
00940
00942
00943 class SIPPublish : public SIPTransaction
00944 {
00945 PCLASSINFO(SIPPublish, SIPTransaction);
00946 public:
00947 SIPPublish(
00948 SIPEndPoint & ep,
00949 OpalTransport & trans,
00950 const PStringList & routeSet,
00951 const SIPURL & targetAddress,
00952 const PString & id,
00953 const PString & sipIfMatch,
00954 const PString & body,
00955 unsigned expires
00956 );
00957 };
00958
00959
00961
00962 class SIPRefer : public SIPTransaction
00963 {
00964 PCLASSINFO(SIPRefer, SIPTransaction);
00965 public:
00966 SIPRefer(
00967 SIPConnection & connection,
00968 OpalTransport & transport,
00969 const SIPURL & refer
00970 );
00971 SIPRefer(
00972 SIPConnection & connection,
00973 OpalTransport & transport,
00974 const SIPURL & refer,
00975 const SIPURL & referred_by
00976 );
00977 protected:
00978 void Construct(
00979 SIPConnection & connection,
00980 OpalTransport & transport,
00981 const SIPURL & refer,
00982 const SIPURL & referred_by
00983 );
00984 };
00985
00986
00988
00989
00990
00991
00992 class SIPReferNotify : public SIPTransaction
00993 {
00994 PCLASSINFO(SIPReferNotify, SIPTransaction);
00995 public:
00996 SIPReferNotify(
00997 SIPConnection & connection,
00998 OpalTransport & transport,
00999 StatusCodes code
01000 );
01001 };
01002
01003
01005
01006
01007
01008 class SIPMessage : public SIPTransaction
01009 {
01010 PCLASSINFO(SIPMessage, SIPTransaction);
01011
01012 public:
01013 SIPMessage(
01014 SIPEndPoint & ep,
01015 OpalTransport & trans,
01016 const SIPURL & to,
01017 const PStringList & routeSet,
01018 const PString & id,
01019 const PString & body
01020 );
01021 };
01022
01023
01025
01026
01027
01028
01029 class SIPAck : public SIP_PDU
01030 {
01031 PCLASSINFO(SIPAck, SIP_PDU);
01032 public:
01033 SIPAck(
01034 SIPTransaction & invite,
01035 SIP_PDU & response
01036 );
01037 };
01038
01039
01041
01042
01043
01044 class SIPOptions : public SIPTransaction
01045 {
01046 PCLASSINFO(SIPOptions, SIPTransaction);
01047
01048 public:
01049 SIPOptions(
01050 SIPEndPoint & ep,
01051 OpalTransport & trans,
01052 const SIPURL & address
01053 );
01054 };
01055
01056
01058
01059
01060
01061 class SIPPing : public SIPTransaction
01062 {
01063 PCLASSINFO(SIPPing, SIPTransaction);
01064
01065 public:
01066 SIPPing(
01067 SIPEndPoint & ep,
01068 OpalTransport & trans,
01069 const SIPURL & address,
01070 const PString & body = PString::Empty()
01071 );
01072 };
01073
01074
01075 #endif // OPAL_SIP
01076
01077 #endif // OPAL_SIP_SIPPDU_H
01078
01079
01080