Commit Graph

49 Commits

Author SHA1 Message Date
Harald Welte e057146df7 re-organize configuration files; add tcpdump integration
Let's make sure we share common configuration between the test
suites and split the config file into a "default" part which is
used (but not copied) in the Docker images, and a "local" part
which is basically those overrides that the user (or docker image)
wants to do from the default.

Change-Id: I3db452e24e5238aa05254d903739c64d202e61db
2018-02-14 18:50:16 +01:00
Max 6367d7b807 Don't symlink non-existent file
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-02-05 16:58:27 +01:00
Philipp Maier 8a3dc925da MGCP_Test: test illegal wildcarded DLCX and MDCX
- Add tests to check the behaviour on wildcarded DLCX and MDCX,
  both commands not supported by the MGW and should fail.

Change-Id: I140c6d9e337cd16d6147bb582a9474cf76b5170b
2018-02-02 16:14:37 +01:00
Philipp Maier dffa6a46e6 MGCP_Test: Clean up after TC_crcx_sdp
The testcase TC_crcx_sdp does not clean up the connection it
created. This can cause subsequent tests to fail.

- Use f_dlcx_ok() to clean up the connection once the test
  is done.

Change-Id: I4e0f5ce218fadc5debe0bbf548b69919584ab66c
2018-02-02 16:14:37 +01:00
Philipp Maier 5e06ceefbe MCGP_Test: Add tests for wildcarded CRCX
The wildcarded CRCX is not tested yet.

- Add a test function that executes a single wildcarded CRCX
  request

- Add a test function that exchausts all MGW resources using
  wildcarded CRCX requests

Change-Id: I70cf486dc21aef19e4199289f5a5509f6927713e
2018-02-02 16:14:37 +01:00
Philipp Maier bb7a01c696 mgw: add constants for mgw endpoint and domain name
The testcase for osmo-mgw hardcodes the mgw domain and also lacks
an endpoint identifier, which was deprecated recently.

- replace the hardcoded occurrences of the mgw domain name with
  a constant

- add a constant for the rtpbridge endpoint identifier

- add a testcase that still uses the old method without prefix
  on the endpoint identifier.

Change-Id: If4455c4cb521270b2fe24881ade9b578a5132205
2018-02-02 16:14:28 +01:00
Harald Welte 818b6e4225 Add "SourceInfoFormat := Single;" to all test configs
This will make sure that all log files will contain information about
the .ttcn source file name and line number that has caused the log,
which is extremely useful during debugging.

Change-Id: Id6785757f20279ba84b34747f878baf67d065b20
2018-01-17 11:11:29 +00:00
Harald Welte f91edf3b49 MGCP_Test: be more liberal in some of the error codes we expect
Sometimes it's not entirely clear which error code should be returned,
so let's accept multiple options, depending on the situation

Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521
2017-12-28 14:21:03 +01:00
Harald Welte 33d8216ab4 MGCP: Add 30 endpoint number test to control section
Change-Id: Ifa03697531680c72e4179a4195aeac371660b722
2017-12-28 14:20:53 +01:00
Harald Welte 646ecdb8e4 MGCP_Test: Test use of 30 endpoint numbers
We used to have a big (OS#2784) where only endpoint numbers below
10 (0x0A) were working due to failed interpretation in hex/dec.

Let's use up to 30 endpoints to ensure hex as well as two-digit
digit numbers.

Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579
2017-12-28 03:28:40 +01:00
Harald Welte 152c38c765 move RTP_CodecPort.ttcn to library
Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3
2017-12-13 13:19:26 +01:00
Harald Welte 20a58c6d6f generalize shared code from regen_makefile.sh into shared helper script
Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba
2017-12-13 01:04:42 +01:00
Harald Welte 9fbe93f532 regen_makefile.sh: Fix TITAN 6.1.0 support
When introducing the rewriting for 6.3.0 we broke the 6.1.0 support.
Now the result should build on Debian with both 6.1.0 and 6.3.0

Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d
2017-12-13 00:50:11 +01:00
Harald Welte 6807982106 Makefile: clone dependencies into 'deps' folder
We used to rely on out-of-tree git clones to be prepared by the user.

This commit changes the system to make sure we clone all git repos
we depend upon into the 'deps' folder, and then setup the symlinks
to that folder.  As a result, we should be able to support
self-contained builds using the makefiles in this repo.
2017-12-12 16:30:53 +01:00
Harald Welte 140714d89d regen_makefile.sh: Add Regex's for TITAN 6.3.0
The TITAN 6.3.0 makefile generator needs some new regular expressions
for patching the generated makefile to work on Debian
2017-12-08 14:03:28 +01:00
Harald Welte 5aa1803ef9 Move MGCP_CodecPort to library directory 2017-11-25 02:05:04 +01:00
Harald Welte 4029e8cd03 Move MGCP_Types.ttcn to library; extract MGCP_Templates.ttcn to library 2017-11-24 20:52:06 +01:00
Harald Welte cda8b9add1 mgw: Use dynamic runtime to allow use with log output plugins 2017-11-19 01:47:40 +01:00
Harald Welte 34ca5b4796 mgw: Fix SDP transport string "RTP/AVP" (one surplus "A" removed) 2017-11-18 22:15:10 +01:00
Harald Welte 2bcfd3a00b mgw: Include mandatory connection-id in MDCX 2017-11-18 22:14:35 +01:00
Harald Welte 5e5cce533a mgw: Add missing audio codec specification "a:PCMU"
Let's make sure we request a reasonable audio codec in the
LocalConnectionOptions
2017-11-18 22:14:08 +01:00
Harald Welte e0b331fa69 mgw: update comment to reflect implemented tests 2017-11-18 20:35:40 +01:00
Harald Welte 8d2fbb4d61 mgw: Move f_mgcp_par_append() to top of file 2017-11-18 20:34:21 +01:00
Harald Welte 0d19861719 mgw: Check for 535 in case of invalid packetization period 2017-11-18 19:58:31 +01:00
Harald Welte f53f1647bc mgw: Test for duplicate transmission of DLCX 2017-11-18 19:57:11 +01:00
Harald Welte 6d167f8472 mgw: Add test cases for invalid DLCX commands 2017-11-18 19:41:35 +01:00
Harald Welte 10889c1d13 mgw: generalize f_dlcx versions, avoiding copy+paste 2017-11-18 19:40:31 +01:00
Harald Welte 79181ffc8b mgw: Test DLCX in three diffeent (valid) configurations
DLCX can be with EP-only, with EP+CallId or with EP+CallId+ConnId,
let's test all three valid cases.
2017-11-18 19:26:25 +01:00
Harald Welte 9988d28228 mgw: Avoid copy+paste of CRCX_ACK template 2017-11-18 19:22:00 +01:00
Harald Welte edc45c19fd mgw: Delete all connections of EP before starting a test case
as part of f_init() we now issue an endpoint-wide DLCX without
call-id or connection-id.  This means that the endpoint should be
in a pristine state after f_init() returns.
2017-11-18 19:15:05 +01:00
Harald Welte c40e0c3cbd mgw: make f_dlcx_{ok,ignore}() support EP, EP+call_id or EP+call_id+conn_id
A MGCP DLCX can contain either only the EP, or EP+call_id or
EP+call_id+conn_id in order to specify what shall be deleted.  Let's
structure ts_DLCX() and the f_dlcx_{ok,ignore}() function in a way to
support this in an intuitive way.
2017-11-18 19:08:22 +01:00
Harald Welte a01e38d371 mgw: Handle MgcpParameterList more elegantly, less repetition 2017-11-18 18:40:01 +01:00
Harald Welte ba62c8c95b mgw: properly clean up endpoint by use of DLCX at end of each testcase 2017-11-18 18:27:01 +01:00
Harald Welte f07c286a55 mgw: Add sockets for RTP packets + code for bind/connect/send RTP 2017-11-18 17:19:21 +01:00
Harald Welte 5501536e81 mgw: Prepare for RTP support: Prefix ambiguous functions/variable names 2017-11-18 16:02:42 +01:00
Harald Welte a7261d7312 mgw: Add RTP_CodecPort throguh which we can send/receive RTP+RTCP 2017-11-18 13:28:07 +01:00
Harald Welte 45295c517f MGCP_CodecPort: Update to IPL4asp R.29.A of 2017-Oct-17
This introduces a new ASP_ConnId_ReadyToRelease which we must
handle in the translation port
2017-11-18 13:00:57 +01:00
Harald Welte cbae9d109f Fix TC_crcx_and_dlcx(): Don't assume DLCX returnsConncetionID 2017-11-17 23:25:26 +01:00
Harald Welte 6f960b1bd6 mgw: Ensure that CRCX succeeds only if ConnectionId is present in response 2017-11-17 23:24:46 +01:00
Harald Welte 21ba5574f9 MGCP_Test: Add comments throughout the code to help readability 2017-09-19 17:55:05 +08:00
Harald Welte 5b4c44ec5a MGCP: Test for CRCX followed by DLCX 2017-09-17 16:35:27 +08:00
Harald Welte e636afd5d1 MGCP: Extend tests significantly
We're now testing a variety of different permitted and illegal
transactions of the MGW.  Still lots of bits pending, particularly
also actual RTP flows.
2017-09-17 16:24:09 +08:00
Harald Welte e1e18c5e33 MGCP: introduce global variable + accessor function for transaction ID 2017-09-17 16:23:07 +08:00
Harald Welte 9ccb480a87 MGCP: don't use dec_MGCP_Message to avoid (possible) TITAN bug
See https://www.eclipse.org/forums/index.php/t/1088893/ for details
2017-09-17 16:22:34 +08:00
Harald Welte 3c6ebb9c93 MGCP_Test: Some templates to encode MGCP messages 2017-09-16 09:37:28 +08:00
Harald Welte 2c6dba145a Introduce MGCP_CodecPort on top of UDP port 2017-09-16 00:50:08 +08:00
Harald Welte 12000e2a7a mgw: Use official Titan SDP library for encode/decode of SDP in MGCP 2017-09-14 22:43:08 +08:00
Harald Welte 2871d0b000 mgw: Add missing mandatory "s=" to SDP of c_mdcx4 2017-09-14 22:42:12 +08:00
Harald Welte 00a067f54d Add minimal MGCP parser/encoder based on TEXT codec 2017-09-13 23:27:17 +02:00