When executing multiple tests we might not have the collection we
want anymore. Some tests don't stop all the timers so we have a
retransmit and this would cause an exception and log spam.
PetitParser has a PPContext in newer versions but the GST code
is older and doesn't have it. Provide an alternative impl.
Provide >>#do: for the SIPVia for Pharo to print the data
Avoid importing MIMERWStream as it is dead in Pharo
On the sysmoBTS (ARM7TDMI) the parsing of a simple response
with quoted string takes up to 200ms. Parsing the single
digest line takes 40ms itself. Create a custom parser to
speed things up to avoid the backtracking between three
optional parsers that are combined in a choice.
* 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.
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.