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

219 Commits

Author SHA1 Message Date
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
Holger Hans Peter Freyther 2ef6591666 Add todo item after showing my testcase to roch. :( 2014-03-25 08:54:38 +01:00
Holger Hans Peter Freyther fd1d3829ad proxy: Handle ProxyAuthenticate/ProxyAuthorize
Add a testcase for testing ProxyAuthenticate and ProxyAuthorize,
extend the grammar and parser to handle the needed bits. Document
another error/failure with the dialog handling code and create a
testcase that fully connects a call.
2014-03-24 14:53:14 +01:00
Holger Hans Peter Freyther 3dd23b46dd invite: Work-around canceling a dialog issue
*  -> INVITE
*  <- 100 Trying
*  -> Cancel
*  <- 200 ACK
*  -> OK
*  <- 100 Trying
...
*  <- 463 Timeout

and we would run through the same circle again. Instead opt for
a simple work-around right now and remember if we canceled once.
We should spawn a transaction and remember the result.
2014-03-24 14:04:03 +01:00
Holger Hans Peter Freyther c3c038f2c8 register: The SIP Proxy didn't like 0 expiration time and match all
Add a real != 0 expiration time and do not use the Contact '*'
wildcard match but name a specific contact we want to register.
2014-03-24 14:03:56 +01:00
Holger Hans Peter Freyther 5cf343d198 contact: Use the real username insteadof the osmo_st_sip name 2014-03-24 14:03:21 +01:00
Holger Hans Peter Freyther 00b85bc583 rport: For dealing with NATed environments ask for a return
To support servers behind a NAT we need to include the rport
parameter in our via. This way the server will respond to us
on the sourceport it got the message from.

We will probably need to implement the same and return the
sourceport as rport=1234 to the other end.
2014-03-24 13:52:06 +01:00
Holger Hans Peter Freyther 22a6e96545 grammar: Parse the cnonce properly
The rules are concatinaions and not alternatives..
2014-03-22 15:11:49 +01:00
Holger Hans Peter Freyther a6f5ac9e4f digest: Be able to calculate digest with qop=auth pattern 2014-03-22 10:00:01 +01:00
Holger Hans Peter Freyther 1fffd8daf1 Add todo entry about the handling of final responses
The SIP RFC specifies that after a final response everything should
be ignored. It is not clear if an ACK should be sent for a 503 message
or if the dialog has been terminated. It looks like for 4xx, 5xx and
6xx the dialogue is gone. No ack needed.
2014-03-14 14:16:24 +01:00
Holger Hans Peter Freyther dd874d294a grammar: The header fields may be case insensitivie
We must extend the grammar to add caseInsensitive to a lot of
fields as they are case-insensitive as part of the specification
this even applies to some parameter names where expires and
eXpiReS are considered to be the same. Start with the simple
case of the parameter.
2014-03-14 13:51:22 +01:00
Holger Hans Peter Freyther 6f2a50603f call: Handle SIP redirects with a special call 2014-03-13 14:55:48 +01:00
Holger Hans Peter Freyther 26ff752344 call: Create a testcase for 301 redirect messages 2014-03-13 13:59:36 +01:00
Holger Hans Peter Freyther 5282dff121 register: Add an implementation for the register handling. 2014-02-25 17:00:01 +01:00
Holger Hans Peter Freyther 5222b4d508 auth: Change the branch and cseq during the second auth request
Avoid infinite auth retries and remember if the last message has
been an authentication request. Ignore the 100 TRYING like messages
as they do not add much value.
2014-02-25 15:32:02 +01:00
Holger Hans Peter Freyther 58f8c6e4f8 misc: Remove duplication of strings and go through the request class 2014-02-25 10:55:49 +01:00
Holger Hans Peter Freyther 32cba85ab4 misc: Split CallAgent/UserAgent into two 2014-02-15 18:33:01 +01:00
Holger Hans Peter Freyther 91bfff21b7 misc: Split SIPParser into multiple files 2014-02-15 18:27:37 +01:00
Holger Hans Peter Freyther 812d164391 misc: Split SIPRandom into separate files 2014-02-15 18:05:37 +01:00
Holger Hans Peter Freyther 1e4cb83af0 misc: Split SIPCall.st into separate files 2014-02-15 18:03:31 +01:00
Holger Hans Peter Freyther 2454ca1372 misc: Split SIPtransactions.st into one file per class 2014-02-15 17:56:49 +01:00
Holger Hans Peter Freyther 19c98f3ec9 misc: Move tests into the test directory 2014-02-15 09:47:33 +01:00
Holger Hans Peter Freyther b739a69829 misc: Split SIPRequests.st into many files 2014-02-15 09:45:29 +01:00
Holger Hans Peter Freyther 150e7849df misc: Move the transport code to the transport directory 2014-02-15 09:40:12 +01:00
Holger Hans Peter Freyther ac05185999 misc: Move the auth related items to the authentication directory 2014-02-15 09:38:37 +01:00
Holger Hans Peter Freyther 13d4223a23 misc: Split the SIPParams into one class per file 2014-02-15 09:37:14 +01:00
Holger Hans Peter Freyther 9ea9eafc2a auth: Implement handling 401 and re-sending the message with auth
This should work for all transactions carried out by the transaction
layer but the unit test is only created for INVITE. It has not been
verified against another SIP engine yet. It has not been verified for
BYE/ACK. Specially for ACK the code might still be wrong as the wrong
operation name is taken into account for the digest.
2014-02-14 18:50:03 +01:00
Holger Hans Peter Freyther 7294d8add0 authorization: Parse the Authorization parse of a SIP request 2014-02-14 18:34:58 +01:00