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

38 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther b122f48fd8 test: Modernize the grammar too 2015-07-24 12:27:18 +02:00
Holger Hans Peter Freyther 3f47d2f6b0 grammar: Change code flow to reduce some bytecode that are executed 2014-09-05 19:24:41 +02:00
Holger Hans Peter Freyther 9fa9a7218f grammar: Kill another amount of redundant parsers
This way we will include a couple less look-up tables for the
digit parsing.
2014-09-05 19:07:11 +02:00
Holger Hans Peter Freyther 6c57c968dd grammar: Speed-up quoted string parsing
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.
2014-09-05 18:56:00 +02:00
Holger Hans Peter Freyther bd38b0d0af misc: Use instance variables and use token more directly
Instead of using auth_param_name which returns token, just use
the token for now. We don't make use of the specific rules in
the SIPParser so there is no used.
2014-09-05 14:25:18 +02:00
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 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 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 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 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 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 7294d8add0 authorization: Parse the Authorization parse of a SIP request 2014-02-14 18:34:58 +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 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 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 1c58c2fe26 misc: Add proper categories to the various SIP classes 2011-09-27 17:43:43 +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 b6e8dd15c6 grammar: Remove inspect messages, no real value in them 2011-06-30 11:36:56 +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 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 99d39be944 grammar: One more test packet to parse... 2011-06-13 19:57:31 +02:00
Holger Hans Peter Freyther 3ff782e8c3 grammar: Add test case from the spec.. just test that is parsed 2011-06-12 00:15:36 +02:00
Holger Hans Peter Freyther 45a86d97fe grammar: Add rules to parse SIP Requests 2011-06-11 23:00:15 +02:00
Holger Hans Peter Freyther 7505ed0c3f grammar: Fix the whitespace handling due not returning things 2011-06-11 21:04:41 +02:00
Holger Hans Peter Freyther 85a359e287 grammar: Add simple parsing tests (without looking at the result) 2011-06-11 20:55:41 +02:00
Holger Hans Peter Freyther afa0ae4c95 sip: Initial version of the Grammar capable of parsing a response
There is still an issue with the white space handling in the
message header.
2011-06-11 20:30:15 +02:00