Holger Hans Peter Freyther
d188d2afed
callagent: Introduce high level SIP Call
...
Introduce a high level class that can create multiple transactions,
handles the sequence numbers, the dialogs, the opened session and
provides a nice call, hangup, cancel, terminate interface.
2011-07-04 22:30:14 +02:00
Holger Hans Peter Freyther
44bea36041
callagent: Timeout fixes, pass the dialog along...
...
This is fixing a previous commit, fixes the timed out handling, attempts
to change the initial dialog -> confirmed dialog handling (but still
gets it wrong, it should compare the dialog, or just get a new dialog
from the response and check if it is compatible with the initial dialog).
2011-07-04 22:23:29 +02:00
Holger Hans Peter Freyther
ef0823526f
transaction: Remember if an INVITE has been canceled.
...
Only the INVITE transaction can be canceled, when it gets
canceled we might or might not get a confirmation or we might
be too late to cancel things. With this flag we will be able
to do something sensible when we get a late final response.
2011-06-30 12:11:53 +02:00
Holger Hans Peter Freyther
f720f9ea0a
transaction: Make the callbacks pass the dialog
...
The transaction now work on something called an initial dialog, e.g.
during a INVITE we go from an initial dialog to a confirmed dialog and
maybe create a session. Prepare the code to support this.
It is still not clear how callbacks, dialog confirmation and session
creation will be handled but it will somehow fit together.
2011-06-30 12:08:50 +02:00
Holger Hans Peter Freyther
276fdb54b3
parser: Add the parsing to the From tag as well
2011-06-30 12:05:27 +02:00
Holger Hans Peter Freyther
12a83f9fad
parser: Create the test data using a WriteStream
2011-06-30 11:41:50 +02:00
Holger Hans Peter Freyther
b41d170320
parser: Extract the generic_param/to_param provide access to the tag
...
Parse every generic_param (or specialized) into a SIPGenericParam,
provide a asFoldedString implementation, tell the folding code about
it, create a SIPToFromParam that holds the list of params.
2011-06-30 11:36:57 +02:00
Holger Hans Peter Freyther
59d476b5cd
grammar: Add the category for the display_name selector
2011-06-30 11:36:57 +02:00
Holger Hans Peter Freyther
105718a17b
grammar: Flatten the display_name to not do it later
...
For now we do not need to have fine grained access
to the string and it is easier to flatten things here
than later.
2011-06-30 11:36:57 +02:00
Holger Hans Peter Freyther
460b67e743
grammar: Parse the Contact header properly
2011-06-30 11:36:57 +02:00
Holger Hans Peter Freyther
ed42decd4a
grammar: Parse the To/From header according to the grammar
...
Right now the UTF8 support for the displayname is still
missing and needs to be added later. The to_spec is not
part of the RFC but it makes our code more happy if things
look like the from_spec.
2011-06-30 11:36:57 +02:00
Holger Hans Peter Freyther
c386b9f147
callagent: Dispatch received data with OsmoDispatcher
...
Dispatch the data from thre socket in a new context. This assures
that we will not run into locking issues. One day where we will have
VMs that can use multiple cores we might have a dispatcher set in
each transaction/session. The we could establish a rule that each
transaction is dispatched in the right/same queue.
2011-06-30 11:36:57 +02:00
Holger Hans Peter Freyther
6e2cea1f6c
callagent: Introduce timers, change locking, all work in progress
...
The idea is to introduce locking, but not within the callbacks,
allow to set a different SIPDialog, work on retransmit for simple
messages.
2011-06-30 11:36:56 +02:00
Holger Hans Peter Freyther
2a7a1bb3cb
callagent: Fix the SIPRequests>>#addDefaults: with the OrderedCollection
2011-06-30 11:36:56 +02:00
Holger Hans Peter Freyther
dac5de9a28
callagent: Use symbols for the states to have them easily printable
2011-06-30 11:36:56 +02:00
Holger Hans Peter Freyther
889461ca7f
callagent: Allow multiple Via tags by having an OrderedCollection
2011-06-30 11:36:56 +02:00
Holger Hans Peter Freyther
b6e8dd15c6
grammar: Remove inspect messages, no real value in them
2011-06-30 11:36:56 +02:00
Holger Hans Peter Freyther
becf8a9cd8
callagent: Rename SIPVia.st to SIPParam.st
...
SIPParams.st will hold multiple SIPParameter classes
2011-06-14 20:31:04 +02:00
Holger Hans Peter Freyther
332f3100be
TODO: Add some very obvious todo items for the code
2011-06-14 20:30:09 +02:00
Holger Hans Peter Freyther
08038a93a4
callagent: Parse the CSeq into a special data holder
2011-06-14 19:45:21 +02:00
Holger Hans Peter Freyther
81aa0a0f27
grammar: Parse the ReasonPhrase... UTF8 is still missing.
2011-06-14 19:45:21 +02:00
Holger Hans Peter Freyther
2e0c21cdb1
callagent: Add cancel, fix the invite...
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
5325ac0b84
callagent: Parse the message and print the failure if there was one
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
115842f0e8
callagent: Make it possible to run on a different port
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
11420c62b0
callagent: Add a closeSocket to the transport code
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
c47d0568eb
callagent: Move the creation of messages into the base
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
026e0bd87b
callagent: Simplify the transaction code a small bit
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
4d6b967b21
callagent: Add the bye transaction...
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
2c8cb82c6f
callagent: Extract the SDP from a 200 response
2011-06-14 19:45:20 +02:00
Holger Hans Peter Freyther
8330ad52d6
callagent: Manually parse the 'tag' from a to...
...
This should be done through the grammar instead.
2011-06-14 01:48:14 +02:00
Holger Hans Peter Freyther
88e451670c
callagent: Try to get some part of transactions going
2011-06-14 01:04:32 +02:00
Holger Hans Peter Freyther
b7e261c00c
callagent: Find the transaction... and dispatch there, cleanup
2011-06-14 00:00:31 +02:00
Holger Hans Peter Freyther
65c0f05dfa
callagent: Remove the semapahore from the transport
2011-06-13 23:59:28 +02:00
Holger Hans Peter Freyther
7d0a7945c7
callagent: Parse the Via tag in depth to reach the branch
...
Add the grammar for the Via parameter, introduce a generic
array folding class to turn it into a string. Add a data holder
that returns the complete string but also the branch if that
is required.
2011-06-13 23:11:35 +02:00
Holger Hans Peter Freyther
3c3e759093
callagent: Test the parser a bit more
2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther
df11de6c31
callagent: Add some transaction code...
2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther
75722e9f84
callagent: SIPParser must come after SIPGrammar was loaded
2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther
1fab601303
callagent: Make the Datagram buffer big enough for data
2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther
99d39be944
grammar: One more test packet to parse...
2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther
1f14fda8b4
callagent: Implement a simple SIPParser on the grammar
...
Create a very simple parser based on the grammar. This way
we can easily parse and recreate the message.
2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther
1dde6993ad
callagent: Require the sockets package
2011-06-13 19:57:30 +02:00
Holger Hans Peter Freyther
cd96ee2590
callagent: Fix the contact syntax...
2011-06-13 19:57:30 +02:00
Holger Hans Peter Freyther
93f0b5fd70
transport: Add the socket to the list of finalizers
...
This will close the socket when the transport is recycled
2011-06-13 19:57:30 +02:00
Holger Hans Peter Freyther
b0ef812e6c
doc: Add a usage example of this code
2011-06-13 19:57:30 +02:00
Holger Hans Peter Freyther
ccfd91f650
callagent: Send a Request over the wire
2011-06-13 19:57:30 +02:00
Holger Hans Peter Freyther
67a44dd341
callagent: Use a Base64 encoding to avoid spec issues
...
The branch may not contain '=' and the easiest is to
rename the code.
2011-06-13 19:57:30 +02:00
Holger Hans Peter Freyther
c9362c643e
callagent: Add SIP UserAgent/Transport/Transaction code
...
The code is not yet fully working, it is missing sending
the request, dealing with timeouts, parsing the response,
callbacks and everything.
2011-06-13 14:00:21 +02:00
Holger Hans Peter Freyther
b3d88db189
callagent: Introduce a log area for the sip code
2011-06-13 11:08:51 +02:00
Holger Hans Peter Freyther
a1393aed22
docs: Use the extracted Gramamr from the sofia project
2011-06-13 11:08:10 +02:00
Holger Hans Peter Freyther
ccf62c2edc
callagent: Provide Base64 and Random helper
...
For the Call-ID of SIP one requires a cryptogragic secure
source of random and the GST random number generator is not. For
Linux use /dev/random for others we don't have a solution yet.
2011-06-13 11:06:47 +02:00