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

219 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 104c521a1a pharo: Also change the invocation of the code 2015-07-27 10:17:47 +02:00
Holger Hans Peter Freyther 54c4074b80 pharo: Add a different test implementation 2015-07-27 10:16:16 +02:00
Holger Hans Peter Freyther acf3dced3b pharo: DO not have PP.PPParser as subclass 2015-07-24 18:12:57 +02:00
Holger Hans Peter Freyther 7e9c00525e pharo: Convert the datagram too 2015-07-24 18:07:56 +02:00
Holger Hans Peter Freyther e6f5e3afde pharo: Use something that is now in OsmoCore
Do not relay on the HLR to be loaded
2015-07-24 18:07:36 +02:00
Holger Hans Peter Freyther aa7002b2e1 pharo: Fix the conversion, more crypto, address handling 2015-07-24 16:04:50 +02:00
Holger Hans Peter Freyther 15d8883c95 rand: 1^N == 1 all the time.. 2015-07-24 15:36:01 +02:00
Holger Hans Peter Freyther 57e67cac55 test: Remember the right collection
When executing multiple tests we might not have the collection we
want anymore. Some tests don't stop all the timers so we have a
retransmit and this would cause an exception and log spam.
2015-07-24 14:03:15 +02:00
Holger Hans Peter Freyther d1e8b2dcd5 cseq: Make the testcases work with different cseq as well 2015-07-24 14:01:19 +02:00
Holger Hans Peter Freyther 0d8d65a330 osx: Do not have two files with 'example' in the name 2015-07-24 12:28:05 +02:00
Holger Hans Peter Freyther b122f48fd8 test: Modernize the grammar too 2015-07-24 12:27:18 +02:00
Holger Hans Peter Freyther 21d395593e pharo: Allow converting the authorization message as well
We need >>#do: as nextPutAllOn: is not called/doesn't exist in
this dialect.
2015-07-24 12:13:38 +02:00
Holger Hans Peter Freyther d00bcc74a4 tests: Modernize and use >>#assert:equals
Modernize the tests to use the >>#assert:equals: protocol as
this allows creating/finding failing tests earlier.
2015-07-24 12:09:32 +02:00
Holger Hans Peter Freyther 2abc6e82e5 base64: Remove method we don't use
Avoid porting issue with the MIMERWStream and just kill the method
2015-07-24 11:53:03 +02:00
Holger Hans Peter Freyther 2df9f74284 pharo: Continue with portability changes for pharo
* There is no RecursionLock but Mutex
* MD5 behaves differently on Pharo
* UDP sockets are different..
2015-07-24 11:51:42 +02:00
Holger Hans Peter Freyther 1e249c5e0e cseq: Fix the log message and print old and new cseq 2015-07-24 11:51:04 +02:00
Holger Hans Peter Freyther 61a7928236 cseq: Use asString for portability with pharo 2015-07-24 11:50:45 +02:00
Holger Hans Peter Freyther 54d9f2059b pharo: Update the conversion code
PetitParser has a PPContext in newer versions but the GST code
is older and doesn't have it. Provide an alternative impl.

Provide >>#do: for the SIPVia for Pharo to print the data

Avoid importing MIMERWStream as it is dead in Pharo
2015-07-23 21:37:26 +02:00
Holger Hans Peter Freyther 439f34e675 use an IPv4 address instead of localhost
Depending on the host OS localhost might resolve to something
we can't handle properly. In a FreeBSD jail this started to
behave oddly. There is no point to force AF_INET6 for this
test.

open("/etc/hosts",O_CLOEXEC,0666)		 = 3 (0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=12621,size=1138,blksize=4096 }) = 0 (0x0)
read(3,"# $FreeBSD: src/etc/hosts,v 1.16"...,4096) = 1138 (0x472)
read(3,0x80282e000,4096)			 = 0 (0x0)
close(3)					 = 0 (0x0)
__sysctl(0x7fffffffaff0,0x4,0x0,0x7fffffffb070,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffaff0,0x4,0x82b0aa300,0x7fffffffb070,0x0,0x0) = 0 (0x0)
socket(PF_INET6,0x10000002,17)			 = 3 (0x3)
connect(3,{ AF_INET6 [::1]:1 },28)		 = 0 (0x0)
getsockname(3,{ AF_INET6 [2a01:4f8:150:70c4::5:2]:55378 },0x7fffffffafec) = 0 (0x0)
ioctl(3,SIOCGIFAFLAG_IN6,0xffffaec8)		 ERR#6 'Device not configured'
close(3)					 = 0 (0x0)
socket(PF_INET6,0x10000002,17)			 = 3 (0x3)
connect(3,{ AF_INET6 [::1]:1 },28)		 = 0 (0x0)
getsockname(3,{ AF_INET6 [2a01:4f8:150:70c4::5:2]:14967 },0x7fffffffafec) = 0 (0x0)
ioctl(3,SIOCGIFAFLAG_IN6,0xffffaec8)		 ERR#6 'Device not configured'
close(3)					 = 0 (0x0)
socket(PF_INET6,0x10000002,17)			 = 3 (0x3)
connect(3,{ AF_INET6 [::1]:1 },28)		 = 0 (0x0)
getsockname(3,{ AF_INET6 [2a01:4f8:150:70c4::5:2]:39503 },0x7fffffffafec) = 0 (0x0)
ioctl(3,SIOCGIFAFLAG_IN6,0xffffaec8)		 ERR#6 'Device not configured'
close(3)					 = 0 (0x0)
2015-03-20 08:33:45 +01: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 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