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

219 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 903594e07d authorization: Create a class that can be added as parameter
We would need to have SIPParameter as a baseclass that works without
having a dataobject. Right now this is a duck-type as it implements
the used methods.
2014-02-14 17:01:24 +01:00
Holger Hans Peter Freyther 018dced6b7 callagent: Add username/password to the UserAgent
In preparation for handling authentication add username/password to
the SIPUserAgent class.
2014-02-14 16:59:28 +01:00
Holger Hans Peter Freyther 52927a37c3 callagent/transport: Allow to directly inject messages
Do not go through the code that silently catches the exception. This
is nice when using the debugger to catch the uncaught exception.
2014-02-14 16:59:25 +01:00
Holger Hans Peter Freyther f981fda29e callagent: Mention unhandled messages in the log 2014-02-14 16:59:22 +01:00
Holger Hans Peter Freyther 7be4c70802 callagent: Fix old issue with the >>#parameter:ifAbsent: protocol
Return the result of the block. This was found during the development
of the authentication handling.
2014-02-14 16:59:19 +01:00
Holger Hans Peter Freyther 7f36eeed7f callagent: Rename parameters from request to response 2014-02-14 16:59:16 +01:00
Holger Hans Peter Freyther fc2f937a60 callagent: Create a simple test that verifies creation of a call 2014-02-14 16:59:14 +01:00
Holger Hans Peter Freyther 193126c287 digest: Implement the digest authentication for SIP
This only implements one of the possible approaches for the digest
handling. This is a very simple test and the choiche of the same
username/password was a bit unfortunate.
2014-02-14 16:58:33 +01:00
Holger Hans Peter Freyther abc1a933fd transport: Move the two transport classes into separate files
Follow the one class per file rule and split things up.
2014-02-11 22:57:27 +01:00
Holger Hans Peter Freyther e231ae6f8e auth: Extend Grammar and Parser to properly parse the WWW-Authenticate
Update the grammar to handle the WWW-Authenticate according to the
RFC. Add the parser to compact everything into a Dictionary. Add the
realm last to avoid being overwritten with another parameter.
2014-02-11 17:35:17 +01:00
Holger Hans Peter Freyther 5de74be83c grammar: Fix the quoted_string parsing by fixing the grammar
SWS is optional and will always match. This means the SWS rule
would match everything and we would never finish. Norbert has
pointed out that an optional element will match but not consume
anything. One should avoid a rule like aParser optional plus.
2014-02-11 17:35:17 +01:00
Holger Hans Peter Freyther 2e1967c49b misc: Use String>>#expandMacrosWith.. for the random helpers
These generate random strings so it is difficult to unit test. But
the invocation worked:

st> Osmo.SIPRandomHelper generateTag
'MzU0MjIxMTQ1OTIzODI1ODc3NjU_'
st> Osmo.SIPRandomHelper generateCallId
'MTk3MTU3OTAxOA__@xiaoyu'
st> Osmo.SIPUserAgent generateBranch
'z9hG4bKMzU0MjIwNDM2Myw0MjIxNg__'
2013-03-31 20:52:12 +02:00
Holger Hans Peter Freyther 06285b7135 misc: Use WriteStream>>#nextPutAll: instead of String>>% to generate messages 2013-03-31 20:51:57 +02:00
Holger Hans Peter Freyther 66622eb271 misc: Use WriteStream>>#nextPutAll: instead of String>>%
* String>>% is not available in Pharo and <<1p>> does not work the
  way it should/could work. Move to a WriteStream.
2013-03-31 20:51:36 +02:00
Holger Hans Peter Freyther 90655feda0 misc: Use String>>#expandMacrosWith to increase portability 2013-03-31 20:51:04 +02:00
Holger Hans Peter Freyther 33ecc34cb5 misc: Stop using String>>% for the to/from generation
To be able to port to Pharo more easily use a WriteStream and put
all the formatting in there.
2013-03-31 20:50:32 +02:00
Holger Hans Peter Freyther e6895f28d5 misc: Use String>>#expandWithMacros for all log messages 2013-03-31 20:47:58 +02:00
Holger Hans Peter Freyther e9ab9925d1 pharo: Beging to improve the GSTSocketAddress to be usable 2013-03-31 20:46:01 +02:00
Holger Hans Peter Freyther 6878ac5253 pharo: Povide a pharo specific way to access the /dev/urandom device
We need to start with a FileStream and call binary on it. This
appears to be doing the tick.
2013-03-31 20:46:01 +02:00
Holger Hans Peter Freyther 6559cc6c1c pharo: Add a Makefile and begin with the porting.
* Change the category for the tests and extensions
* Rewrite usages of >>nl and >>cr
* There are still issues with the Socket code, Datagram handling
  and and expands.
2013-03-31 19:40:05 +02:00
Holger Hans Peter Freyther f0d7c722d0 misc: Fix the category strings to ease porting to Pharo 2013-03-31 12:25:05 +02:00
Holger Hans Peter Freyther c9bed5b235 transport: Use the OsmoUDPSocket correctly 2012-09-07 14:59:28 +02:00
Holger Hans Peter Freyther fad5328063 transport: Create a testcase for sending data through the transport 2012-09-07 14:58:08 +02:00
Holger Hans Peter Freyther 554903c345 callagent: Move to the common udp socket handling code 2012-08-09 02:23:21 +02:00
Holger Hans Peter Freyther 90083758e1 sip: Make sure both TX/RX stop on socket close and image restart
Use DatagramSocket>>ensureReadable as this is using async poll,
make sure the socket is still open after ensureReadable returns.
Move the RX/TX into selectors as this allows us to return from
them.
2012-08-09 01:01:31 +02:00
Holger Hans Peter Freyther 895ca4fd4a process: Name all processes started by osmo-sip 2012-08-08 18:08:33 +02:00
Holger Hans Peter Freyther 62e17b57ab callagent: Use /dev/urandom as source and rename the class
The class was called SIPSecureRandom as it used /dev/random for
random numbers. The downside of /dev/random is that a read can
block until enough data has been generated. This does occur, e.g.
on an isolated system. Start using /dev/urandom for the tags. It
is better than the Mersene twister of GST but it is no source
for key material.
2012-08-07 20:57:14 +02:00
Holger Hans Peter Freyther 1f4723a902 callagent: Respond with a failure to OPTIONS requests
There is no proper implementation yet, also no way for an application
to tweak that behavior but there is also no need for that right now.
2012-08-06 01:26:03 +02:00
Holger Hans Peter Freyther 55765c9f0d callagent: Start to deal with requests in new dialogs
* This isn't doing proper routing (e.g. the via is not modified
  properly but we return it to the right address)
* An unknown BYE will be acked with a 481. The 'respondWith:...'
  includes the wrong 'Allow:' but it is good enough from the
  structure for now.
* Re-Order the loading of files as the SIPUserAgent is extended
  the SIPRequests.
* Add the port/ip to the SIPDialog so that responding to the
  request is possible.
2012-08-06 01:20:54 +02:00
Holger Hans Peter Freyther 5b1b3f891d callagent: Move the respond with to the callagent class 2012-08-06 00:34:14 +02:00
Holger Hans Peter Freyther 5b870389f0 callagent: Create a class to handle OPTIONS
Linphone insists on sending it and the RFC says that handling
is mandatory. Start with being able to parse the message.
2012-08-05 16:48:45 +02:00
Holger Hans Peter Freyther b5c4ac5631 grammar: StatusCode 101 is not part of the spec but used by linphone
The spec says that anything between 101-199 can be used as a response
to a INVITE to create an early dialog.
2012-08-05 09:57:18 +02:00
Holger Hans Peter Freyther 536891d433 typo: Fix spelling of mandatory 2012-08-03 11:03:42 +02:00
Holger Hans Peter Freyther 5b057eb5c3 callagent: Parse a status response 2012-08-03 11:02:41 +02:00
Holger Hans Peter Freyther 1c58c2fe26 misc: Add proper categories to the various SIP classes 2011-09-27 17:43:43 +02:00
Holger Hans Peter Freyther e134b1e825 call: Forward the notification and allow a subclass to handle it
For the GSM integration we want to look at the 183 code and then
provide the ringtone.
2011-07-21 00:04:05 +02:00
Holger Hans Peter Freyther bfd9a0c621 cancel: Improve log messages, fix the cancelation of a call
The code changed the state and then compared it to the given
state, remember the old state before changing it.
2011-07-20 21:07:55 +02:00
Holger Hans Peter Freyther 0e699fdee2 callagent: Improve the logging and remove the printNl. 2011-07-06 20:34:57 +02:00
Holger Hans Peter Freyther 907409c0c9 callagent: Handle the BYE Request to close down a connection.
Handle the incoming request, in case of the BYE close down the
session...
2011-07-06 20:34:20 +02:00
Holger Hans Peter Freyther 93f816ea4f callagent: Introduce the SIPSessionBase, prepare handling Requests
The name session base is a bit misleading as it is not the session
that holds the initial dialog, the confirmed dialog, the UAS and then
also the session when it is setup. When the dialog gets confirmed we
will register it with the useragent and then will be called for new
requests. On hangup/cancel the dialog will be scheduled for removal.
2011-07-06 19:45:34 +02:00
Holger Hans Peter Freyther 44efac4f5b callagent: Big performance improvement, cache the parser
Constructing a PetitParser is an expensive operation (Object>>becomeForward:)
we can keep the parser in the class. For the SIPTransactions we keep it as
a global, it is assumed that all SIPTransactions operate through the same
process and will not run into concurrency issues.
2011-07-06 19:25:04 +02:00
Holger Hans Peter Freyther 29fdd40b85 callagent: Add some more tests to the Via parsing. 2011-07-06 18:47:07 +02:00
Holger Hans Peter Freyther faf842cf21 callagent: Handle the the ip address properly... fold/flatten it 2011-07-06 18:39:09 +02:00
Holger Hans Peter Freyther 117fba25ef callagent: Remove the transaction 60s after we think it should go
Do not allow to keep the transaction alive after we decided it
should go.
2011-07-06 15:04:48 +02:00
Holger Hans Peter Freyther e9a9647cad EXAMPLE: Use the new SIPCall class in the example 2011-07-06 10:13:42 +02:00
Holger Hans Peter Freyther 47034082bb Update the DESIGN document for this code 2011-07-06 10:10:07 +02:00
Holger Hans Peter Freyther f997ab4fbc callagent: Work on canceling a transaction..
This is still more complicated (and wrong) then it should be,
when we CANCEL an INVITE we can either send a CANCEL or we need
to wait for a 100. Now the CANCEL could be too late (the server
already sent a 200), in that case we would get a 200 for the
INVITE and pass this to the higher levels (which we probably
should).
2011-07-05 20:27:22 +02:00
Holger Hans Peter Freyther 9aa3efa1f4 callagent: Fix the SIPVia parsing with optional parameters 2011-07-05 17:14:12 +02:00
Holger Hans Peter Freyther 857486d616 callagent: Fix Contact, SIPCall state, leave the transaction
When sending a result, it might get lost and we will get
another request to reply to, allow to change to the same
state, fix the contact header.
2011-07-05 15:44:43 +02:00
Holger Hans Peter Freyther 3a503338e0 callagent: Provide an easy method to either cancel or hangup 2011-07-05 14:25:43 +02:00