I'm struggling with an implementation problem and I'd like to hear your
comments about it.
For a cleaner design, it would be better if we could enforce that all
incoming SIP messages part of a same dialog were dispatched to the SIP
account which received the first message.
In other words, if I receive consecutively within a dialog the following
messages: (remote end initiating and ending the call)
(2) and (3) should be dispatched to the same account (1) was dispatched
to. Therefore, we must find a way to retrieve this account when
processing (2) *without* repeating the algorithm which led to the
dispatching of (1) (there are corner cases where this algorithm could
possibly be not consistent over time when dispatching messages of a same
dialog - for instance with same username and broken/intolerant registrar).
Which tools do we have? JAIN-SIP provides means to attach (ie mark) an
Object to a Message, a Transaction or a Dialog, but:
- (2) is obviously not the same Message as (1), nor the same Transaction
- when receiving (1), the Dialog does not exist yet (it is created when
SIP Communicator creates the Response, so after the dispatching
- JAIN-SIP provides a very convenient Dialog.getFirstTransaction() but
it is unfortunately marked as deprecated.
I'm CC'ing users@jain-sip.