diff --git a/libs/ysip/transaction.cpp b/libs/ysip/transaction.cpp index 8753237e..c34c8395 100644 --- a/libs/ysip/transaction.cpp +++ b/libs/ysip/transaction.cpp @@ -507,11 +507,16 @@ SIPTransaction::Processed SIPTransaction::processMessage(SIPMessage* message, co } } + processMessage(message); + return Matched; +} + +void SIPTransaction::processMessage(SIPMessage* message) +{ if (isOutgoing()) processClientMessage(message,m_state); else processServerMessage(message,m_state); - return Matched; } void SIPTransaction::processClientMessage(SIPMessage* message, int state) diff --git a/libs/ysip/yatesip.h b/libs/ysip/yatesip.h index a296360f..044e856a 100644 --- a/libs/ysip/yatesip.h +++ b/libs/ysip/yatesip.h @@ -622,13 +622,20 @@ public: /** * Check if a message belongs to this transaction and process it if so * @param message A pointer to the message to check, should not be used - * afterwards if this method returned True + * afterwards if this method returned Matched * @param branch The branch parameter extracted from first Via header * @return Matched if the message was handled by this transaction, in * which case it takes ownership over the message */ virtual Processed processMessage(SIPMessage* message, const String& branch); + /** + * Process a message belonging to this transaction + * @param message A pointer to the message to process, the caller must + * make sure it belongs to this transaction + */ + virtual void processMessage(SIPMessage* message); + /** * Get an event for this transaction if any is available. * It provides default handling for invalid states, otherwise calls