Skip to content

Conversation

vladpaiu
Copy link
Member

Summary
Current bug is :

  • we have branch1 sent to a destination which is dead/down/not replying
  • we have branch2 replying with a code that the script decides should terminate the transaction ( ie. if ($rs == 486) t_cancel_branch("o")

The bug is that the 486 does not get propagated on the spot - it gets saved internally and relayed only when fr_timeout elapses.

Details
Ignore branches scheduled for CANCELation via t_cancel_branch, which don't have any replies on them yet.

Solution
Ignore branches scheduled for CANCELation via t_cancel_branch, which don't have any replies on them yet.

Compatibility
Should be backwards compatible - I hope.

@vladpaiu vladpaiu added this to the 3.6.0 milestone Jul 18, 2025
@vladpaiu vladpaiu added the bug label Jul 18, 2025
@vladpaiu vladpaiu requested a review from bogdan-iancu July 18, 2025 12:30
@bogdan-iancu bogdan-iancu self-assigned this Jul 22, 2025
Copy link
Member

@bogdan-iancu bogdan-iancu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladpaiu , this is not a bug at all. The RFC3261 says you have to forward back to caller a negative final reply only after completing all the branches of the transaction. Now, a branch which haven't received any reply, even if marked for canceling, it is still a open, ongoing branch, you cannot simply ignore it. It is possible for that branch to generate a 200 OK at a point (as a response to your INVITE), so you cannot cancel it anymore.
Also, for the sake of the sanity of the TM internal logic, branches should be properly terminated upon sending a reply back to caller. I mean that unresponsive branch should be marked as completed, like with a 408 timeout at least. So the transactional data is consistent.
In your case, why not setting a low (1-2 secs) fr_timer to avoid waiting too long for such unresponsive branches?

Anyhow, I do not see this as a bug at all. In the best way maybe as a feature request in changing the TM behavior.

@bogdan-iancu bogdan-iancu modified the milestones: 3.6.0, 4.0.0 Jul 22, 2025
@bogdan-iancu
Copy link
Member

ping @vladpaiu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants