Avoid call disconnection due to request timeout when network is changing#2737
Merged
Avoid call disconnection due to request timeout when network is changing#2737
Conversation
sauwming
previously approved these changes
Jun 17, 2021
| PJ_UNUSED_ARG(user_data); | ||
|
|
||
| PJ_LOG(4,(THIS_FILE,"IP change stops ignoring request timeout")); | ||
| pjsip_cfg()->endpt.keep_inv_after_tsx_timeout = PJ_FALSE; |
Member
There was a problem hiding this comment.
Shouldn't we revert it to the previous value instead?
Member
Author
There was a problem hiding this comment.
The timer is scheduled only when the value is PJ_FALSE.
| ((tsx->status_code == PJSIP_SC_CALL_TSX_DOES_NOT_EXIST && | ||
| tsx->method.id != PJSIP_CANCEL_METHOD) || | ||
| tsx->status_code == PJSIP_SC_REQUEST_TIMEOUT || | ||
| tsx->status_code == PJSIP_SC_TSX_TIMEOUT)) |
Member
There was a problem hiding this comment.
so PJSIP_SC_TSX_TIMEOUT is removed?
Member
Author
There was a problem hiding this comment.
They are the same, see here, and as it is defined in a public header file, it should not be changed.
sauwming
approved these changes
Jun 17, 2021
trengginas
approved these changes
Jun 29, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some requests (within dialog) may be in progress when network is changing, they may eventually get timed out and cause call disconnection.
This PR introduces a new PJSIP endpoint setting:
pjsip_cfg_t.endpt.keep_inv_after_tsx_timeout, default isPJ_FALSE(maintaining the existing behavior). The IP change processing in PJSUA temporarily changes this setting value toPJ_TRUEto avoid call disconnection due to request timeout.