Enforcing the legemtimate status values is better done in
the parser and not in the grammar. We don't do it in the
parser yet but that can be done later.
* Do not use >>#instVarNamed:put: but add selectors
* Pre-allocate some arrays with a default string to avoid
re-allocations at the start
* Share same parser trees to avoid construction costs
* Remove some lazy allocation and always allocate it
In the SIPDialog we need to switch from/to to send messages
from the right "From" but for a response we musn't do that.
YATE doesn't like if we respond with From/To mixed to their
BYE request.
So this code acks the 401 Unauthorized message. It is possible
that this message is lost on the way we will not be able to
respond to the 401 again. The right thing would be to "fork" off
the transaction to deal with re-transmissions.
In case the remote will do a re-invite to verify that we are
still aware of the call we need to handle >>#sessionAcked:dialog:
This probably got introduced when I introduced the incoming
call support that will send a 200 and receive the ACK.
The incoming call will print a warning that session->session is
not a valid state transition but nothing bad will happen.
In case our reject does not arrive and is re-transmitted we
should reject it too.
* Modify SIPDialog>>#checkCompatible. We have to accept that
the remote does not know the tag we assigned. Be more forgiving
* Send the INVITE again and count our rejects.
Create a SIPIncomingCall and register the dialog. The "Via" and
remote handling is broken. The "respond with" is broken too. The
whole dialog/request passing to the UserAgent is broken and needs
to be fixed.
I nee to differentiate between incoming and outgoing calls. At
the same time a lot of logic can be shared. Specially at the
time the call is established the hangup will work the same on
both sides.
A rule like "ANY star / quoted_string" will only parse the ANY
rules for '0' times. Change the order to avoid this and add a
small test that we properly parse the From address now.
token requires the presence of at least one match. The usage of
star has been wrong and is corrected now. This was seen due not
being able to parse a From address that included a diplay name.
Remove the trailing ";" to fix the parsing bug.
When we receive a message and there is rport and such set we
should include the "seen" remote address in the VIA. The code
should also handle having multiple VIA entries as per the spec.
The code allows (and that looks like a good thing) to have a different
from and username in the authorization. The userString was not really
right as it was missing the URL part (sip/sips) and the splitting was
broken as well.
In preparation of introducing multiple identities we need to
remove usage of SIPUserAgent>>#username. The next step is to
actually be able to pass a different identity.
The Transport to UserAgent relationship is a one to one. E.g. we
need this to generate unique branch and call-ids to make sure the
dialogues are different. To be able to use multiple identities I
introduce a SIPIdentity class. Currently the user agent has one
main identity but this could change over time.
Pass in the dialogue from the lower layer to make sure to respond
to the right party (including the from/to being in the right order).
Implement the re-invite that is needed to keep a phone call alive
for more than 45 seconds on this system.