Hi,
a recent commit on tm module (b66033d) adds a check for cancelled transactions to t_forward_nonack (cf. http://sip-router.org/tracker/index.php?do=details&task_id=468).
This made me think that the t_append_branches function, recently added to the module, needs the same kind of checks:
- before start adding the branches
- after adding the branches and before sending them out

Attached a patch to implement these checks.
If you agree I can commit it on master.

Regards,

Federico