Receiving transaction termination notifications

From reSIProcate
Revision as of 15:43, 22 August 2005 by Jason (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A TU (transaction user) can register to be notified of transaction terminations. To enable it, call SipStack::registerForTransactionTermination() on your SipStack object.

When transactions terminate, the SipStack will pass a TransactionTerminated TransactionMessage up to the TU through the TUfifo. This is retrieved by the TU through a call to SipStack::receiveAny(). The message indicates if the transaction is client or server and also provides the associated transaction id.

class TransactionTerminated : public TransactionMessage
     TransactionTerminated(const Data& tid, bool isClient, TransactionUser* tu) : 
     virtual const Data& getTransactionId() const { return mTransactionId; }
     virtual bool isClientTransaction() const { return mIsClient; }
     virtual std::ostream& encode(std::ostream& strm) const { return encodeBrief(strm); }
     virtual std::ostream& encodeBrief(std::ostream& str) const;
     Data mTransactionId;
     bool mIsClient;