I'm getting a bit confused by this discussion, and I think part of the
problem is terminology:
Let's avoid using the word "match" unless we mean a process which has
the usual properties of "match": (1) If A matches B, then B matches A.
(2) If A matches B, then A and B are considered to some degree to be the
same thing. Thus, if two requests have the same Via branch parameters,
they "match" because they are (should be) identical. And if two
requests have the same call-id and tags, then they "match" because they
are part of the same dialog. (And that relationship is symmetric.)
I think what people want is the concept "references". If A references
B, then B does not necessarily reference A. Thus, a dialog event
package references a dialog, but the dialog does not reference the
dialog event package.
I believe that we intend for two message to have the same Session-Id if
and only if they are legs of the same dialog (in the sense that each leg
was generated by a B2BUA as a continuation of another leg). (Actually,
that should be "dialog set", as created by one out-of-dialog request.)