< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index |
Best regards, Byron Campen
Greetings.What is the purpose of MessageDecorator::rollbackMessage() method? How to override it properly?Now I use the following code to decorate messages in STUN environment: class STUNDecorator: public MessageDecorator { protected: SIPEndPoint& mEndPoint; SipMessage mOriginalMsg; public: STUNDecorator(SIPEndPoint& endpoint) :mEndPoint(endpoint) { } virtual ~STUNDecorator() { }virtual void decorateMessage(SipMessage &msg, const resip::Tuple &source, const resip::Tuple &destination){ mOriginalMsg = msg;if (/*mEndPoint.mStunHost.empty() && */ mEndPoint.mUseExternalIP && !mEndPoint.mStunHost.empty() && mEndPoint.mStunEnabled){ if (msg.header(h_Vias).size() > 0) {msg.header(h_Vias).front().sentHost() = Data(mEndPoint.mExternalIP); msg.header(h_Vias).front().sentPort() = mEndPoint.mExternalPort;} if (msg.header(h_Contacts).size() > 0) {msg.header(h_Contacts).front().uri().port() = mEndPoint.mExternalPort; msg.header(h_Contacts).front().uri().host() = resip::Data(mEndPoint.mExternalIP);} } } virtual void rollbackMessage(SipMessage& msg) {if (mEndPoint.mUseExternalIP && !mEndPoint.mStunHost.empty() && mEndPoint.mStunEnabled){ msg = mOriginalMsg; } }Sometimes user agent failes on assignment msg = mOriginalMsg. To be precise: it fails on assignment of mDestination.Now I commented out the rollbackMessage implementation (just empty method) to make workaround... Is it ok?Thank you :) _______________________________________________ resiprocate-users mailing list resiprocate-users@xxxxxxxxxxxxxxx List Archive: http://list.resiprocate.org/archive/resiprocate-users/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature