Commit Graph

118 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
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
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
incorrectly.

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 5.4.2.2.1) 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
conversion.

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
Related: https://www.rfc-editor.org/rfc/rfc4040#section-5
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 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 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
modules.

Change-Id: I0edfbb7359516ba77180afab18c3e1ffb2d0c927
2022-09-07 10:46:17 +02: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
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 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
Philipp Maier 37965088d5 MGCP_Test: avoid crash in latest (TC_one_crcx_loopback_rtp_implicit)
The testcase TC_one_crcx_loopback_rtp_implicit triggers a bug in older
osmo-mgw version that eventually leads into a crash of osmo-mgw. This
also means that all tests after TC_one_crcx_loopback_rtp_implicit will
also fail. Lets move TC_one_crcx_loopback_rtp_implicit to the end of the
control section to postpone the crash to the very end of the testrun.

Change-Id: I25abf30f8c49e580c46e7a61e887bd0add9a4cd4
Related: OS#5123
2021-06-02 18:54:26 +00:00
Philipp Maier c0ca42d119 MGCP_Test: add testcase TC_one_crcx_loopback_rtp_ipv6
There is an TC_one_crcx_loopback_rtp, an ipv6 variant can be added with
minimal effort.

Change-Id: If16ee5186fa697caa9cc404b7159be054cac5196
2021-05-17 20:32:09 +00:00
Philipp Maier eba70db649 MGCP_Test: fix TC_one_crcx_loopback_rtp_implicit
The testcase TC_one_crcx_loopback_rtp_implicit uses
f_TC_one_crcx_loopback_rtp, which creates the RTP flow with IPv4
addresses but since we do not send a local RTP IP address with the CRCX
to the MGW, the MGW will prefer IPv6, which means that we get an IPv6
address back while the RTP strem is IPv4 on the TTCN3 side.

Related: OS#5123
Change-Id: I80498737d5b32f28b62e0c17cce1969b54af948c
2021-05-17 20:32:09 +00:00
Philipp Maier 1ac1398d9f MGCP_Test: test LOOPBACK with implicit destination addr
Test what happens when the MGW gets a CRCX that creates a connection in
LOOPBACK mode but does not specify an RTP destination address. The MGW
is expected to deduct the destination address from the first incoming
RTP packet and loop it back to its originating address.

Change-Id: I7baf827fb0c3f33e13ccbaffd37ba0eb4e20c304
Related: OS#5123
2021-05-13 18:01:25 +00:00
Pau Espin befd3aaca4 mgw: Introduce test TC_crcx_osmo_ign
Related: SYS#5063
Change-Id: I79415c385e89fe859854430bb20940f078fccea0
2020-09-22 19:32:11 +00:00
Pau Espin 9e0141aa84 mgw: Test IPv6 RTP streams in osmo-mgw
Change-Id: I2a47926757af84ffa190a954aac0dcc5369528b3
2020-09-09 18:13:37 +00:00
Pau Espin db2dc0494e mgw: Test IPv6 addresses in MGCP messages
These tests verify that osmo-mgw handles requests no matter of IP
version used in the remote address.

Change-Id: Ib134dda5a8f7c8f50968b6ce330f9986ae72575d
2020-09-09 13:54:42 +00:00
Pau Espin b604af09ea mgw: Rename IP address module parameter specifying IP version
Change-Id: Ia393d7175de277ec8fa524ba74bf3b150b74c766
2020-09-09 13:54:42 +00:00
Pau Espin 25f47a72dc mgw: Fix using incorrect IP version in TC_one_crcx_receive_only_rtp
Send the remote address to MGW so it knows which IP version to return
during CRCX ACK. This actually better suits the test, since there's less
point in checking whether we receive something if we never pass the
IP/port to MGW. In any case, the "recvonly" should still tell MGW to
refrain from sending stuff to us, so we are really testing that here.

Change-Id: Id3452cecf7fb281e5e46471f7f53983c08c6bfdf
2020-09-09 12:22:42 +00:00
Pau Espin e67b1c64ce mgw: Fix logic in test TC_two_crcx_mdcx_and_rtp_osmux
rtpem should be set to BIDIR at the same time where MDCX "sendrecv" is
sent, otherwise if MGW sends us RTP packets (because we set the conn to
sendrecv) they will be counted incorrectly in
stats[0].num_pkts_rx_err_disabled.

This issue doesn't trigger in current code because the MGW doesn't know
anyway the remote IP address of the other connection until an MDCX is
sent to it. However, if for whatever reason the IP address is known (for
instance because it is set during CRCX, which will be done in next
commits), then RTP messages would be sent and the error counter would
be > 0.

Change-Id: I8f2c4e497e522fc17e5cfe76987f802265c486ab
2020-09-09 12:22:42 +00:00