-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminate client transaction upon transport error #3806
Conversation
Sorry, it looked like the previous PR introduced backward incompatibility and failed tests. Could you please fix it as well so that it passed the CI tests? |
Failed pjsip-test:
|
Why does 100 response need to be treated differently? |
Currently, retransmission will be done only for > 100 responses. pjproject/pjsip/src/pjsip/sip_transaction.c Line 3029 in bc5e826
This is based on https://datatracker.ietf.org/doc/html/rfc3261#section-17.2.1 (see Figure 7: INVITE server transaction) This will make 100 response to linger (no timeout/retransmission) if it fails to send. |
Ah okay, I understand now that currently we don't retransmit 100, but why doesn't the timeout work? After re-reading both RFCs, I'm still not entirely sure as to what we should do upon 100 failure. Based on my understanding: - the server tsx shouldn't be terminated, - timeout must still run. Not sure about retransmission, I believe we need to do this also, but maybe there's a reason right now we intentionally don't do this? |
Because timer timeout isn't scheduled for provisional responses. pjproject/pjsip/src/pjsip/sip_transaction.c Line 2467 in bc5e826
Regarding rfc6062, the title stated "Correct Transaction Handling for 2xx Responses". so, it should only apply to 2xx responses? |
I believe the title of RFC 6026 states its primary or main content, which doesn't necessarily mean that it will only affect 2xx responses. Section 8 of the RFC elaborates all the revisions, and Figure 7 shows the overall updated INVITE server transaction flow. So, I believe the sip_tsx modification in the previous commit 035bad7 was already correct. We don't need to terminate upon 1xx failure. As for the 100 retransmission, I suggest to comment the 100 condition to activate retransmission for 100, and test if it introduces compatibility issue. pjproject/pjsip/src/pjsip/sip_transaction.c Line 3029 in bc5e826
If it doesn't cause incompatibility, I think it should be okay. |
Yes, the updates on the diagrams seem to affect other responses/tsx-states too.
Agree.
Not sure about this, but I won't vote for 100 retransmission. It is supposed to be unreliable, immediate (to cease INVITE retransmission) and hop-by-hop (101-199 will be forwarded by proxy, but 100 will not), even PRACK's RFC prohibits 100 reliability (ref), so I guess it is better to leave it as is (i.e: no retransmission). Btw, it seems we now support rfc6026 partially in the recent changes, haven't really checked the details myself, but would we consider to support it fully (e.g: add new tsx state "Accepted", etc)? |
Okay, let's go with this.
For now, I plan to put in our roadmap for further discussion, especially since it seems quite major. |
List of changes in the latest commit:
|
* Terminate client transaction upon transport error * Fixed UAS tsx tp error handling and PJSIP test
* Terminate client transaction upon transport error (pjsip#3806) * Terminate client transaction upon transport error * Fixed UAS tsx tp error handling and PJSIP test * version bump --------- Co-authored-by: Riza Sulistyo <[email protected]>
#3805 will prevent immediate transaction termination upon transport error.
This will introduce new behavioral change which is an issue.
Provided an outgoing INVITE without patch
With patch
The outgoing INVITE transaction will be terminated by timeout timer and the call disconnected notification will require additional time.
As stated in RFC 6026 (https://www.rfc-editor.org/rfc/rfc6026.html), section 7.1:
And section 7.2:
Upon transport error, only server transaction that must not be discarded/terminated.
This PR will terminate client transaction upon transport error.