Commit Graph

162 Commits

Author SHA1 Message Date
Neels Hofmeyr 649eba0456 fix MGCP_Test.TC_one_crcx_loopback_rtp_implicit expectations
osmo-mgw should not respond to unknown peers. The test expected the
wrong thing, because of an old hack for 3G voice. Fix that.

Related: OS#6424
Change-Id: Ibe2ee59d1ed2c25ffef7e8534c172ac190b4983d
2024-03-27 21:16:55 +00:00
Harald Welte 9e8db33f2d [cosmetic] mgw: fix spelling in comments
Change-Id: I2fb69463b070cdc183fff63ee7dc422169f8928a
2024-03-26 15:10:31 +01:00
Pau Espin 1158cc629c Move SDP templates to its own SDP_Templates.ttcn file
SDP is used in other protocols than MGCP, eg. SIP.

Change-Id: I0610b4cf5533e46a3401c65e60c7cce975c85412
2024-03-22 11:28:51 +01:00
Harald Welte 556e4d2dbc various: update expected-results.xml
Change-Id: I21052636bf892e5da86ef736d16035ec324aedbe
2024-03-04 19:09:58 +00:00
Pau Espin 2f3e56bd46 mgw: Add missing TC_two_crcx_mdcx_and_rtp_clearmode to expected-results.xml
Change-Id: I54fa4aeae49fdae51cfbbf076a56b7185585fc48
2023-09-28 14:36:12 +00:00
Pau Espin 0bc0212195 mgw: Introduce test TC_two_crcx_mdcx_and_iuup_rtp_mdcx_to_iuup
Related: SYS#6578
Change-Id: I08eca9ea123029c37892d5de7c94a8ed6cc0a913
2023-09-28 14:36:12 +00:00
Pau Espin e6d095ca98 mgw: Introduce tests TC_two_crcx_mdcx_and_iuup_(rtp_)mdcx_recvonly
Change-Id: I34d47d0cdde855900798e4cb3efd26af22f5b049
2023-09-28 14:36:12 +00:00
Pau Espin 74d75b19cf mgw: Factor out helper func to test data flows over endp with 2 conns
The logic can be reused by AMR<->IuUP and IuUP<->IuUP tests.

Change-Id: Ic4f3c5bb687373bdae6942e1952797e76bfa3ffb
2023-09-28 14:36:12 +00:00
Pau Espin 30da239be6 mgw: TC_conn_timeout Fix timeout left set upon test exit
The test mentioned in a comment that the value is reset upon each test
start, but that's false.

Change-Id: I9447fa6c6b3103e05fa3ee756ee572ddecb69006
2023-09-28 12:54:29 +00:00
Neels Hofmeyr 6e978dc253 osmo-mgw.cfg syntax fix
was added with mismatching indent in

"mgw: Update to contain similar config from docker-playground.git"
commit cec73acdd4

Change-Id: I5d4d1af40410bfdcc1280f45b85a8ae0c7b94a80
2023-09-27 03:01:43 +02:00
Andreas Eversberg db99cb0378 MGW_Tests: Add test for "confecho" connection.
The test uses two connections: "confecho" and "sendonly". It is expected
that "confecho" connection receives as many RTP packets as it sends,
because it echoes back its packets. It is also expected that "sendonly"
connection receives the same amount of RTP packets.

Change-Id: I7df4a58ad9287a564b2daf7548b882c03787f7f2
2023-07-18 07:08:23 +00:00
Pau Espin b26d446add mgw: Introduce test TC_auep_null
Related: SYS#6481
Change-Id: I9395cd526cf626974fb0e2ed93ff5d95a433d8c0
2023-06-17 06:04:29 +00:00
Philipp Maier 47ec812fd0 MGCP_Test: fix TC_one_crcx_loopback_rtp_implicit
The testcase TC_one_crcx_loopback_rtp_implicit creates a loopback
connection using CRCX but without SDP. It selects AMR using LCO. The MGW
responds with an MDCX and acknowledges AMR with a payload type of 112,
The TTCN3 testcase then sends AMR RTP packets with payload type 111, those
are accepted and looped back but the payload type will be converted to 112
as negotiated in the CRCX response. However the TTCN3 test still expects
111 in the packets comming back from the MGW. This is obviously a wrong
expectation and the testcase did only pass because Osmo-MGW was behaving

To fix this let's just use 112 as payload type as payload type in this
test. This is the recommended payload type number for AMR (3GPP TS 48.103,
Table and used by the MGW by default in case the call agent does
not specify a different one in SDP.

Change-Id: Idc370e9dc2e4954374fc7d07f7b117788028635a
Related: OS#5461
2023-05-23 14:07:45 +02:00
Philipp Maier 714842824d MGCP_Test: add new testcases for oa/bwe conversion
The octet aligned to bandwith efficient conversion is currently only
tested in scenarios where only one codec is assigned on both sides.
However, there may be call agents that will assign bandwith efficient
and octet aligned on one side for compatibility reasons. If this is the
case, then OsmoMGW should always chose the format that requires no

Related: OS#5461
Change-Id: I2b2d7ef7fb4fe31111aa8665c4d4295425502451
2023-05-09 23:54:07 +00:00
Philipp Maier d6c4559271 MGCP_Test: move template RtpFlowData up
The template RtpFlowData is defined in the middle of the code, lets move
it up below the related record definition

Change-Id: If854f708e4da8b3a7b02d1ace2eb7caa3e2f2bfb
2023-05-04 12:04:07 +02:00
Philipp Maier 6b41e15b45 MGCP_Test: add fmtp to template t_RtpFlow
When creating a flow with fmtp parameters we must always add them in a
second step. Lets update t_RtpFlow, so that it supports fmtp as an
optional parameter.

Change-Id: I04b17c0d233c1db4b9ba1306a4e0555914519bf8
2023-05-04 12:04:07 +02:00
Philipp Maier bbe454d27d MGCP_Test: support multiple codecs
At the moment The RTP emulation and MGCP_Test only allow to specify one
codec and one set of RX/TX fixed payload octet strings to verify against.

This is quite limiting since it might be necessary to test against
different types and formats of payloads simultaneously in order to see
if osmo-mgw converts or forwards them correctly.

Let's extend this to support multiple codecs on MGCP/SDP level plus
support for multiple RTP payloads on RTP emulation level.

Related: OS#5461
Change-Id: I8422313fccad1bfcee52c933f643068bebdaf2d5
2023-05-04 09:54:06 +00:00
Philipp Maier eb5e813795 MGCP_Test: fix typo
Change-Id: I1c860acb60267a9b4d8049bf231c49f9c915923b
2023-04-26 12:53:35 +00:00
Philipp Maier cd756ed891 MGCP_Test: use constants to predefine RTP payloads
The function f_TC_amr_x_x_rtp_conversion() is called with RTP payload
octetstrings in the parameter list. Lets define constants for those
octetstrings so that it is better visible which RTP payload is which.

Change-Id: I7efc22e2f8a941e36200dda7841089e6c97185c6
2023-02-27 10:06:57 +00:00
Philipp Maier 8ed48c5316 MGCP_Test: Test ts101318 rfc5993 conversation with fmtp
The MGW now supports explicit HR GSM RTP format announcement via
SDP/fmtp. Lets add a testcase for this.

Depends. osmo-mgw.git Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Change-Id: If562955e7ae73b15dc3c4d742404741e20e31827
Related: OS#5688

Change-Id: I14421f780c4ef9e4c7e91182154070617852e957
2023-02-27 10:06:57 +00:00
Philipp Maier 465115e777 MGCP_Test: reject empty fmtp strings
When setting up an RTP flow the fmtp string is checked using isvalue(),
however this does not guard against empty fmtp strings. Rejecting empty
strings is especially useful in situations where the caller wants to
signal using "" that no fmtp string is present.

Change-Id: I2641a52a3b271681f4f2e424c34be12e125092d6
Related: OS#5688
2023-02-13 09:59:32 +00:00
Oliver Smith 871f45a54e mgw: new test TC_two_crcx_mdcx_and_rtp_clearmode
Add a test that uses SDP CLEARMODE towards the MGW. The SDP parameters
generated by the test look as expected when compared to RFC 4040
section 5.

Related: OS#4395
Change-Id: I89c5dfdcd728ab3b50e77c5062f07e1b802b1f01
2023-01-24 17:50:29 +01:00
Oliver Smith 3cfa2cce75 mgw: f_tc_two_crcx_mdcx_and_rtp: add arguments
Add arguments for codec_name and payload_type.

Related: OS#4395
Change-Id: I94d1628470db49c53eda64c29bc0716bcb339798
2023-01-24 16:46:59 +01:00
Philipp Maier e5af8a3576 MGCP_Test: ensure PT translation works when converting AMR bwe/oa
The tests that test the conversion from AMR octet-aligned to AMR
bandwith-efficient use the same payload type number on both ends. This
does match the reality. Typically the BSS uses 96 as payload type
internally, while 3gpp specifies a payload type of 112 on the link
between BSS and CN. To reflect those conditions in the test as well,
lets use 96 on one RTP end and 112 on the other.

This also increses the test coverage as we now test if PT translation
and bwe/oa conversion work together.

Change-Id: Id734b6954098130bba02f8cdf1b06e0080c3e915
Related: OS#5461
2023-01-19 13:45:42 +00:00
Pau Espin 262584764f mgw: Introduce test to validate Osmux<->RTP-AMR-BWE
Related: SYS#6161
Change-Id: I974e265938da15639acae7e2c9c589d5784ae5c5
2022-10-26 11:16:14 +02:00
Pau Espin cec73acdd4 mgw: Update to contain similar config from docker-playground.git
Change-Id: I2aa4d86e548d6644f1dd9358f6b8b48a19c96c3c
2022-10-11 21:22:16 +02:00
Pau Espin f369983975 mgw: Fix f_two_crcx_mdcx_and_rtp_osmux()
Previously the test was starting to count Osmux packets too early.
Now that osmux conn state has been improved in osmo-mgw [1], Osmux
Rx packets are not forwarded until the conn is completely configured
through MGCP, hence first osmux packets snet by our async emulation
are dropped.
So we must start counting the transmitted valid osmux packets according
to what the test says, when the full conn is set up.

[1] osmo-mgw.git Change-Id I7654ddf51d197a4107e55f4e406053b2e4a02f83.

Related: SYS#5987
Change-Id: I7efd87bbbda2ffa8fd0c5a64658d42edd0f30857
2022-10-11 21:22:16 +02:00
Pau Espin 982b979170 mgw: Remove hack in f_two_crcx_mdcx_and_rtp_osmux() no longer needed
Since osmo-mgw.git 2177919edb3bc0dd308be388272486ffd97f4761, osmo-mgw can handle
properly conns containing a different remote and local CID.
Hence this hack can be dropped.

Related: SYS#5987
Change-Id: I531631d716581f68c11d3c0b07fc6755a822a0d3
2022-10-11 21:22:16 +02:00
Pau Espin 787e2e4292 mgw: Introduce test TC_crcx_osmux_257
Related: SYS#5987
Change-Id: I74e6c760e076fe2547b6297a54524255fb8b
2022-10-11 21:22:09 +02:00
Pau Espin e792887fbb mgw: Avoid hardcoding in test the amount of endpoints configured in osmo-mgw
Some tests require to match what's configured in osmo-mgw.
Let's make it possible to change it through a module parameter.
This will be needed for a follow-up patch to test >256 concurrent osmux
conns, which will require increasing the number of configured endpoints
above that value.

Change-Id: Ia1e5a0b59ba7c49e97c2cf7ee7a009f3827cf36d
2022-10-07 12:45:18 +02:00
Pau Espin db1e068161 mgw: Log osmux stats in f_two_crcx_mdcx_and_rtp_osmux()
Change-Id: I2122e086f828a44ddf1c285e11a1eb79759ae989
2022-10-07 12:45:18 +02:00
Pau Espin 779e4a79af mgw: Rename osmux RtpFlowData fields to clarify them
Change-Id: I64b4060706a321bc1f5e46d791035e6d85fa8e1e
2022-10-07 12:44:42 +02:00
Pau Espin a990b1bb60 mgw: Set osmux bind-ip(-v6) VTY configs
Until now we forgot to properly configure the osmux socket local ip, but
that was fine because was taken as a default.
With addition of IPv6, this changed, and the socket is not bound unless
an IP address is set (to allow conditional use of IPv4, IPv6 or both).

Depends: osmo-mgw.git Change-Id I446cd7da217e9f4a74995d7784ae55dcc60a29b7
Change-Id: I4e0ea11ae7e55da600aec56bebf694f3ba0f7b72
2022-10-04 18:21:47 +02:00
Pau Espin 71ed463957 Move AMR defintions out of OSMUX_Types to its own file
This way they can be used without the need to import OSMUX related

Change-Id: I0edfbb7359516ba77180afab18c3e1ffb2d0c927
2022-09-07 10:46:17 +02:00
Neels Hofmeyr 13b83db5db update various expected-results.xml
Change-Id: I850b79526145307246bca40c70ed8e4d586d8c68
2022-08-12 02:31:23 +00:00
Philipp Maier 13aff99872 MGCP_Test: add testcase TC_e1_dlcx_wildcarded
We are currently testing the behaviour of wildcarded DLCX on the virtual
trunk. Lets run a similar test on the E1 trunk as well.

Change-Id: I6cfbd24982d1e72206f8237b2eaea52cdaebf9dc
Related: OS#5572
2022-07-11 19:14:59 +00:00
Philipp Maier 6c740e8d52 MGCP_Test: fix TC_dlcx_wildcarded
When the final condition of the testcase is verified through statsd,
there may be still (invalid) data from a previous measurement in the
statsd pipeline, querying the stats once before verifying the actual
stats fixes the problem.

Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3
Related: OS#5572
2022-07-11 19:14:59 +00:00
Pau Espin d7963bb037 mgw: Introduce test TC_two_crcx_mdcx_and_iuup{_rtp}_rfci_unordered
Related: SYS#5969
Change-Id: I2523f18a0fdba87f4e13a2ce3c5da482c4af2e3c
2022-05-26 21:08:16 +00:00
Pau Espin 6ed763001d Allow Setting IuUP_Cfg from test using RTP_Emulation
Change-Id: I4e8296dae40277be51974338bc0d21c939eec149
2022-05-26 18:27:39 +00:00
Pau Espin 2803cd3d7d mgw: Introduce test TC_two_crcx_mdcx_and_iuup_rtp
This test validates we can connect 3G to 2G AMR calls fine.

Change-Id: I3627711d80c5e42d56e478c1c4ff3fb5b27adfdf
2022-01-17 09:11:21 +00:00
Pau Espin a6b9c4ced5 mgw: Introduce test TC_two_crcx_mdcx_and_iuup
Related: OS#1937
Change-Id: I0866fb499c6d426386d9811d075a7fe8386c5cb1
2022-01-05 11:27:16 +01:00
Philipp Maier 1298b09cb4 MGCP_Test: fix TC_dlcx_wildcarded
Due to the migration to a multithreading scheme the timing behavior of
the stats items has slightly changed. There is now a 1 sec update cycle
in which the stats items are regenerated. This means we have to wait 1
sec. before we can query the endpoints.used stats item.

Change-Id: I90613616f9ff85ca59464dfd45d331ed1a54d9c5
Related: OS#5316
2021-11-18 19:10:55 +00:00
Oliver Smith f8fe1329e2 set executable name explicitly
Set the executable name in each explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 files/flags in separate lines
Make all more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Philipp Maier 3560bd656a MGCP_Test: add control interface to MGW testsuite
The testsuite for osmo-mgw does not use the control interface yet.

Change-Id: I7324802bf6e692ce8b7d9b269dd2385a7d3d0d77
2021-08-19 11:52:23 +02:00
Philipp Maier 2ff3e66bf0 MGCP_Test: do not use module parameter mp_test_ip (statsd)
The module parameter mp_test_ip was added with the following commit:
Change-Id I61e23e264bc85eb36d07431c7839fb445c110947

There is already mp_local_ipv4, which has the same function, so we
should remove mp_test_ip again and use mp_local_ipv4 to set up the
receiving of statsd information.

Change-Id: I70f33aed4102c67118cc6701c2578a70c0dfe604
Related: SYS#5535
2021-08-19 10:58:25 +02:00
Philipp Maier 4268cd372f osmo-mgw.cfg: add missing statsd configuration
The recently added test TC_dlcx_wildcarded depends on statsd information
from osmo-mgw but in the osmo-mgw configuration no statsd is configured.

Change-Id: I35e07a6b1853234559ab4d7e044f3899e8d0a3e8
Related: SYS#5535
2021-08-17 12:14:06 +00:00
Philipp Maier 21c1cffcec MGCP_Test: test DLCX request to non existant endpoint
Since we now support wildcarded DLCX request, which so not necessarly
require a specific endpoint (the trunk is enough). We should also check
what happens when we send a DLCX request to a non existent endpoint. The
situation would be very similar. osmo-mgw will be unable to resolve the
endpoint, but the trunk will be resolved. However eventually the request
is not wildcarded and we expect that osmo-mgw is rejecting it.

Change-Id: I3d8c6f84404c1c95f97f113813528175523d36b8
Related: SYS#5535
2021-08-03 17:16:04 +02:00
Philipp Maier 55b905446c MGCP_Test: upgrade expected behavior for TC_dlcx_wildcarded
The testcase TC_dlcx_wildcarded expect osmo-mgw to reject wildcarded
DLCX requests but osmo-mgw now implements wildcarded DLCX

Depends: osmo-mgw I6d3a74f6087512130d85002348787bffc672de81
Depends: docker-playground I693cc17dbf6836e7a74b34111671b6e589744a63
Change-Id: I61e23e264bc85eb36d07431c7839fb445c110947
Related: SYS#5535
2021-08-03 17:16:04 +02:00
Neels Hofmeyr cb8d9894af update expected-results.xml files
Change-Id: Idcf764cd2d251210bb123d2a5ea782cda0d670b7
2021-07-05 13:11:14 +02:00