I was planning to cleanup the code and rename "The Thing" into MATE
(if every one agrees on that name).
I would like to consolidate all changes before going ahead with a
major change in the "leg analysis" phase.
The problem: Sessions should merge if their keys match later on after creation.
Example scenario: In some cases, on calls origitaing from SIP and
going towards H323, the admission request comes before the Q931 SETUP
and as such there's no way to match the calling number (from SIP) with
the GUID (from H225_UU) since the SETUP that will create the leg that
has both (q931) has not yet appeared.
By now what happens is:
I either assign the q931 leg to the session with the RAS leg or to
the session with the SIP leg depending on which SesKey was defined
first in the config.
What should happe is:
I should look for any match and create a list of sessions then move
the legs of the later sessions to the former session clean their keys
from the sessions collection, reanalize the merged session and
recreate the keys.
What I plan to do is: when new attributes are added to the session I
should look for all sessions matching any of the keys remove all their
keys from the sessions collection, merge them and recreate the keys.
Luis