RestComm / jain-sip

Disclaimer: This repository is a git-svn mirror of the project found at http://java.net/projects/jsip whose original repository is developed collaboratively by the Advanced Networking Technologies Division at the National Institute of Standards and Technology (NIST) - an agency of the United States Department of Commerce and by a community of individual and enterprise contributors. TeleStax, Inc. will perform some productization work, new features experimentation branches, etc for its TelScale jSIP product that doesn't concern the community from the main repository hence this git repository.
http://www.restcomm.com/
145 stars 152 forks source link

Fix for issue #151 https://github.com/RestComm/jain-sip/issues/151 #152

Closed gfigiel closed 7 years ago

gfigiel commented 7 years ago

Please see the fix for issue 151 - modified in-dialog provisional responses improperly marked as restransmitted.

151

gfigiel commented 7 years ago

Could you please let me know when jain-sip-ri library release containing this fix is available? It is needed to modify the SIP11 RA dependency to fix the issue.

gfigiel commented 7 years ago

Hello, It seems that it is not the only needed change. I can see that the retransmission flag is set to true by default in SIPResponse: https://github.com/RestComm/jain-sip/blob/45cd46d03e1e3504750b573dbc1871554c7fdbd4/src/gov/nist/javax/sip/message/SIPResponse.java#L58

Why it is done like that? It seems that in some cases this value is taken into consideration causing my fix is not enough... I will still work on this issue...

jaimecasero commented 7 years ago

Original intention of the author to make isRetranmission true by default is unknown to me. You know when using boolean flags, sometimes it makes more sense(reduce the number of potential modifications) to start with true or not...

Having said that, i think DialogFilter is the class that mostly uses the isRetransmission info/flag. The SIPClientTransactionImpl is responsible to set the actual value of the flag during Response processing(as you already noted in the change that laters this logic). This should be run before reaching DialogFilter, and creating the proper ResponseEvent (where the flag is copied from original response message). The assumption is that Transaction layer is run before Dialog layer ...