smalltalk
/
osmo-st-sip
Archived
1
0
Fork 0
Commit Graph

196 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 07e36f8333 misc: Create a combined parser for a small win 2014-09-05 14:24:00 +02:00
Holger Hans Peter Freyther f13639d443 misc: Use separatedBy: for the beauty of reading it, no big win 2014-09-05 14:23:05 +02:00
Holger Hans Peter Freyther e7c75b7dcd misc: Use "trim" instead of LWS 2014-09-05 12:38:20 +02:00
Holger Hans Peter Freyther 06caf1ef1a misc: Use a combined PPPredicateObjectParser for a small gain
This gives 3ms on parsing 'b787f1fbc9a864af6975d9f59ac49ef1.1401736687'
2014-09-05 12:30:47 +02:00
Holger Hans Peter Freyther 3854696d53 grammar: Use PPPredicateObjectParser to speed it up a bit 2014-09-05 09:52:09 +02:00
Holger Hans Peter Freyther 4451c8e89c grammar: Avoid re-creating parsers used as building block
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.
2014-09-04 15:15:34 +02:00
Holger Hans Peter Freyther 89e653a41a call: Handle CANCEL and verify that the right messages are returned
The code does not verify that sessionFailed is called but it
does verify that the dialogue is scheduled for removal and
that 487/200 is returned.
2014-08-29 20:44:10 +02:00
Holger Hans Peter Freyther 9161371a32 perf: Various changes to speed up various operations
* 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
2014-08-29 20:39:46 +02:00
Holger Hans Peter Freyther a536a7a788 callagent: Do not mix From/To in the response we generate
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.
2014-08-10 20:36:14 +02:00
Holger Hans Peter Freyther 1a20f003aa misc: Re-use the parser for a great speed-up during the tests
Creating a PetitParser is expensive due the usage of >>#become:
so let us re-use the one from the SIPCallAgent.
2014-08-10 20:28:59 +02:00
Holger Hans Peter Freyther 1e43d02ed3 transaction: ACK the 401 Unauthorized message before we change
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.
2014-08-10 19:49:05 +02:00
Holger Hans Peter Freyther df79f4c469 call: Deal with both ends hanging up at the same time 2014-08-10 19:39:28 +02:00
Holger Hans Peter Freyther 88c8005597 misc: Make code more portable by using "self basicNew initialize" 2014-07-24 15:49:29 +02:00
Holger Hans Peter Freyther 4e38ef3ece call: For a re-invite we need to handle the ACK
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.
2014-07-04 19:34:34 +02:00
Holger Hans Peter Freyther 91a745ba90 todo: We need to implement record-route and route parsing for SIPgate
This means that the way we look at headers we need to support a list
of them.
2014-06-20 18:24:37 +02:00
Holger Hans Peter Freyther 804459c35a proxy: And once more. 2014-06-20 15:14:44 +02:00
Holger Hans Peter Freyther cc1d2d3e2f auth: qop is not included by sipgate as well.. 2014-06-20 15:11:39 +02:00
Holger Hans Peter Freyther b0fae4c117 proxy: Add the same default handling for md5 2014-06-20 15:00:43 +02:00
Holger Hans Peter Freyther 4bf83bb523 call: Fix typo in the selector name 2014-06-20 14:35:35 +02:00
Holger Hans Peter Freyther e2d1145639 auth: Sipgate doesn't send the algorithm. assume it is md5 2014-06-20 14:19:10 +02:00
Holger Hans Peter Freyther eb578aa93e call: Document the "sessionAcked" thinko and deal with it later 2014-06-16 15:45:40 +02:00
Holger Hans Peter Freyther 29242f86a1 call: End the session at any hangup result
E.g. the hangup could have failed due the other side already
having hung up but at some point we need to stop caring about
it.
2014-06-05 17:24:39 +02:00
Holger Hans Peter Freyther a28c2ab64c response: Provide a Content-Type/Content-Length as well 2014-06-05 16:30:16 +02:00
Holger Hans Peter Freyther 160b36056a invite: Extend the testcase to actually ask for hanging up 2014-06-05 15:49:52 +02:00
Holger Hans Peter Freyther 8b626c8a52 parser/grammar: Be able to parse domain used by Yate.
It looks like "domain" is not proper in yate. Just parse it as
numbers and words.
2014-06-02 22:06:31 +02:00
Holger Hans Peter Freyther 24dbbc986c callagent: Avoid running into the EndOfStream exception 2014-06-02 21:34:22 +02:00
Holger Hans Peter Freyther 58cd187895 call: Provide access to the remote SDP file 2014-06-02 20:51:50 +02:00
Holger Hans Peter Freyther 8a820162d2 invite: Verify we have a remoteSDP file and it is matching
This way we can fully handle a session once the sessionNew selector
is called by the code.
2014-05-28 12:05:12 +02:00
Holger Hans Peter Freyther 1a3d577894 invite: Debug/test the re-transmit handling and fix it 2014-05-28 12:04:32 +02:00
Holger Hans Peter Freyther 3864d6ae2f invite: Add code to get all the way to an ACKed session
What is probably missing is to start a timer in case something
is not acked to have a call timedout and to send a failure message
to the other side.
2014-05-28 12:04:07 +02:00
Holger Hans Peter Freyther 01260bb20e invite: Deal with re-transmit of a rejected call
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.
2014-05-28 12:03:45 +02:00
Holger Hans Peter Freyther b2099a8474 invite: First shot at handling the SIP Invite
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.
2014-05-28 11:53:17 +02:00
Holger Hans Peter Freyther 69810d6afa invite: Create a base class for the "call"
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.
2014-05-27 18:21:18 +02:00
Holger Hans Peter Freyther 77ef4b6ece session: Fix a typo/grammar in the comment 2014-05-27 15:15:16 +02:00
Holger Hans Peter Freyther a819a8b877 invite: Begin to handle the incoming INVITE from the network
Add a new test, inject a SIP Invite. Verify that the SIPUserAgent
rejects the invite.
2014-05-27 15:01:50 +02:00
Holger Hans Peter Freyther 15f1f07631 parser: Be aple to parse From/To with display_name in it
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.
2014-05-27 14:55:18 +02:00
Holger Hans Peter Freyther 33f1e40cbe parser: Fix the grammar and update the example message
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.
2014-05-27 14:55:18 +02:00
Holger Hans Peter Freyther 100d6bcb10 misc: Update the TODO entry for generalparts
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.
2014-05-27 14:55:18 +02:00
Holger Hans Peter Freyther 1a634a1492 identity: Remove use the "contact" and userString from SIPIdentity
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.
2014-04-22 14:39:42 +02:00
Holger Hans Peter Freyther e89ddfa07a identity: Fix the identity string for the from 2014-04-22 14:39:11 +02:00
Holger Hans Peter Freyther 0c609b9975 identity: Move the identity into the SIPDialog
This way the one that creates a dialog needs to decide which
identity will be used.
2014-04-22 14:18:26 +02:00
Holger Hans Peter Freyther 3779496a4a identity: Make the SIPSession work based on identity 2014-04-03 11:05:08 +02:00
Holger Hans Peter Freyther 858d25e2be identity: Remove direct usage of of useragent username
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.
2014-04-02 18:28:09 +02:00
Holger Hans Peter Freyther 89efe79f71 identity: Make it possible to have a separate proxy username/password
Make it possible that the proxy username and password is different
to the identity of the user.
2014-04-02 18:16:04 +02:00
Holger Hans Peter Freyther 72afcc72e4 identity: Introduce the concept of an identity to the useragent
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.
2014-04-02 17:44:39 +02:00
Holger Hans Peter Freyther 2020d4cdf4 test: Add test for remote-hangup handling
The whole response handling code was broken. Make sure to increase
the test coverage of the system.
2014-03-25 12:59:26 +01:00
Holger Hans Peter Freyther 9625d417fe request: Fix the parameter look-up and make it case-insensitive
Call-ID and Call-Id are the same. So make a lower case compare.
In case a parameter is not found return the result of the block
evaluation.
2014-03-25 12:59:26 +01:00
Holger Hans Peter Freyther 02aa81c92e request: Include the cseq number in the response properly
Currently a string representation of the CSeq class was included
and not the actual number we need to respond to.
2014-03-25 09:13:25 +01:00
Holger Hans Peter Freyther 92d995d2c6 requests: Fix dispatching of requests on an active dialog
When introducing the unit tests I broke the source ip/port
handling. This meant that sending a BYE or a re-INVITE was
broken.
2014-03-25 08:59:51 +01:00
Holger Hans Peter Freyther 2e5d36a435 session: Support the re-invite of a (proxy) server
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.
2014-03-25 08:56:22 +01:00