Commit Graph

459 Commits

Author SHA1 Message Date
Pau Espin ef85dfa942 regen-makefile.sh: Exit with clear error if ttcn3 bin not found
Change-Id: I866a758ec472968f368866e3b3b24dc6f14ac7cb
2018-01-29 11:51:52 +01:00
Pau Espin 5c9d99f735 regen-makefile.sh: Support Archlinux install paths
Archlinux (titan-git AUR package) installs everything (includes, libs
and bin) into /usr/ttcn/ prefix.

Change-Id: I545f2f04890310e98233b04b44c4614df34f2f17
2018-01-29 11:51:52 +01:00
Pau Espin bd939f0307 start-testsuite.sh: Add archlinux tccn3 path to LD_LIBRARY_PATH
Archlinux installs ttcn33 libaries in /usr/ttcn3/lib (titan-git package from AUR).

Change-Id: I99219f4ab36c82e562ef3fed047d3c52d64497f1
2018-01-29 11:51:49 +01:00
Harald Welte 9de8479399 msc: Cipher mode negotiation test
This adds a series of test cases that test various combinations of
A5/0, A5/1, A5/2 and A5/3 on both phone as well as network config
side.

Change-Id: I552fa4a23b7b65613a69b1a822e28e7dea401102
2018-01-28 01:08:18 +01:00
Harald Welte de37149345 msc: Introduce BSC_ConnHdlrNetworkPars
This record collects information about the network configuration,
such as whether or not authentication, tmsi allocation and/or
encryption are enabled.  The individual helper functions can then
react according to this information, without having to pass long
argument lists along the call chain.

Change-Id: I01a931f1cbbca4593fff2fd12689f040ceaa79b6
2018-01-28 01:08:18 +01:00
Harald Welte d95da56490 GSUP: Initialize ExpectTable
For some reason TITAN 6.1.0 requires the table to be explicitly
initialized, while 6.3.0 is happy without it.

Change-Id: I4f9ac98fb60ad16b98acd627efd617bfb4f6abcb
2018-01-27 21:55:34 +01:00
Harald Welte 473676b879 BSSMAP_Emulation: ispresent(bssap.pdu.bssmap) before accessing fields
This seems not to be required on TITAN 6.3.0 on my laptop, but the
older 6.1.0 on Debian 9 seems to need it.

Change-Id: I574d8b79ac43e0fceddb3f9815666aef0ed66a3f
2018-01-27 20:38:54 +01:00
Harald Welte 6126fb0ee0 msc: Make MGW ip/port parameters configurable as module parameters
Change-Id: I9148ebd687a1cf96a4b8c433e771785e30216cbc
2018-01-27 20:08:41 +01:00
Harald Welte 3c68a54896 msc: rename sub-directory from msc_tests to msc (to be in line with bsc, etc.)
Change-Id: Ib219dee5e587bca3b79d29d631836cf1ef2be81c
2018-01-27 19:10:07 +01:00
Harald Welte 89a3249b85 msc: Make TC_lu_clear_request tolerant to double ClearCommand from MSC
See https://osmocom.org/issues/2862

Change-Id: Ic266151038dc29220ec62279d16fcd181836bb42
2018-01-27 19:08:09 +01:00
Harald Welte 167458a5c1 msc: Add TC_gsup_cancel testing GSUP Location Cancel
Related: OS#2886
Change-Id: Ib962c4a1e71f926631503fe4b3459ca49360dfa4
2018-01-27 19:00:04 +01:00
Harald Welte 8a1dd53367 GSUP_Types: Add tr_GSUP_IMSI as helper for messages with IMSI as first IE
Change-Id: Ie1b9682d102da28fa7de4cb391d61aeb52f1676b
2018-01-27 19:00:04 +01:00
Harald Welte 6aa04e313b GSUP_Types: Use (value) annotation for send (ts_) templates
Change-Id: I5c74ad71e8a0966f10bddcdf800cd94226cd900d
2018-01-27 19:00:04 +01:00
Harald Welte d2328a2d7b msc: Enable all test cases in control section
Change-Id: Idc8c88de1b55d1f7e1e19be1b218edaebd7d767b
2018-01-27 14:27:38 +01:00
Harald Welte f466eb47c4 msc: Fastert timeout in TC_cl3_{rnd,no}_payload
Change-Id: Ida2674fca10e164385f68d2ab7f8d300abd8b6f7
2018-01-27 14:27:38 +01:00
Harald Welte 1ddc716eaf msc: Introduce shared f_expect_clear()
Avoid having to copy+paste the matching of a channel clear/relesae

Change-Id: If070b079f2ffadb8065fb99d1c8951ac9baec88b
2018-01-27 14:27:38 +01:00
Harald Welte ad2952e063 msc: Accept optional f_init_handler() argument for Tguard
Some tests may want an extended guard timer as they're waiting for
some particularly slow events.  They can override the default now.

Change-Id: Iee6f50559a8fe45c7655b9f41e7fa163199b39a6
2018-01-27 14:27:38 +01:00
Harald Welte c98b42c8c3 deps: Use SCTPasp from osmocom github fork (SO_REUSEADDR, usleep hack)
Change-Id: I9169d231358a9a7e9e10302044a895087f7e7d78
2018-01-27 14:27:38 +01:00
Harald Welte 53a06cd2f4 deps: Switch back to upstream titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Upstream TITAN has merged our SOCK_SEQPACKET support, so there's no
need for using our private repo anymore.

Change-Id: Ib04d9a3095cf93609af07af0de0b701cba460f67
2018-01-27 14:27:38 +01:00
Harald Welte ec6e5b43cf msc: Add missing 'repeat' in TC_mo_crcx_ran_reject
Change-Id: Id5c538546ba59f8a8d5f4379f16df2d99c8c2669
2018-01-27 12:45:39 +01:00
Harald Welte a10db90e42 msc: Add global g_Tguard timer to make sure BSC_ConnHdlr terminates
Change-Id: I10fc0ff04c16eacc12f09ac1759940676ae62213
2018-01-27 12:45:39 +01:00
Harald Welte fa03ecb252 msc: Don't explicitly enable TMSI allocation
f_init() already enables TMSI allocation, no need to re-do that.
Only tests *without* TMSI allocation must explicitly change this config.

Change-Id: I123b44b36c3ed7e6bc0347d9703b8bd6288ba060
2018-01-27 12:45:39 +01:00
Harald Welte 7ec4fa8c99 msc: Fix TC_lu_tmsi_noauth_unknown
As the MSC allocates a new TMSI to us, we must send a TMSI REALLOC COMPL
to avoid a LU REJ after the LU ACK.

Change-Id: I6f0d85750a68e71e9b589b23ad74b945a46a6a88
2018-01-27 12:45:39 +01:00
Harald Welte 4f9cdb8739 msc: Fix TC_cmserv_imsi_unknown
g_pars was not initialized, leading to IMSI encoding failure.

Change-Id: Iadab7aed3d3d39186002f1ed25e83f3d3c1ed177
2018-01-27 12:45:39 +01:00
Harald Welte 812f7a45e3 WIP: msc: First test case for mobile terminated call testing
We start the call from the MNCC side, match on the paging and then
pick it up from there.

It currently fails as the MNCC_Emulation cannot yet handle "ConnHdlr
originated" MNCC calls yet.

Change-Id: I28c465187fd8b1dcfd687180b373a47bb9ac6734
2018-01-27 12:45:39 +01:00
Harald Welte 3f95be8fff GSUP_Types: Make sure our MSISDN encoding agrees with OsmoMSC
OsmoMSC seems to have broken encoding of MSISDN which is not in-line
with the spec.  Let's adapt to it.

Change-Id: I4892df63f1a135573dcac977f5eb0a79cbaffad3
Related: OS#2883
2018-01-27 12:45:39 +01:00
Harald Welte 17d2115ab8 BSSMAP: Add IMSI/TMSI mapping table to dispatch incoming paging
If we're emulating BSC/BTS/MS, then we must be able to dispatch
incoming paging requests based on their IMSI or TMSI to the right
ConnHdlr component.  This introduces a new table to facilitate that
dispatch.

Change-Id: I85c1ea3bcf8fb4a100f20cffdc991826b58e290b
2018-01-27 12:45:39 +01:00
Harald Welte 1852a84a70 msc: Ensure all MO call related tests are in control section
Change-Id: Id836b695d9ac1bc8135af95be2b90b5a3e29fd34
2018-01-26 22:53:57 +01:00
Harald Welte 946a5387b9 msc: Add missing timer start in MO call related tests
Change-Id: I13958b40426ef871b4c69561385a39eea95e24e4
2018-01-26 22:53:57 +01:00
Harald Welte 0cc82d95ba msc: Add TC_mo_crcx_ran_reject
Change-Id: I9b1e24c505e1d5911bb1f0335034ff8d0641895d
Related: OS#2882
2018-01-26 22:53:57 +01:00
Harald Welte 3ab88009fc msc: Add TC_mo_crcx_ran_timeout
Change-Id: I085457bd0af429fd3cde6b442604c08cb60eaae3
Related: OS#2881
2018-01-26 22:53:57 +01:00
Harald Welte 12510c5d1f msc: Add TC_mo_setup_and_nothing (MO SETUP with no follow-up)
Change-Id: Ie0352dd91736b04722cf3fb44f90537bc87218c7
2018-01-26 22:53:57 +01:00
Harald Welte 116e433f21 msc: Add TC_establish_and_nothing
Change-Id: Ia8782558d8570750fd95c2b41953aaa61839ef8c
Related: OS#2879
2018-01-26 22:53:57 +01:00
Harald Welte 4017d55bbe msc: Make TC_lu_and_mo_call succeed with osmo-mg enabled osmo-msc
This is for patch https://gerrit.osmocom.org/#/c/4980 in osmo-msc

Change-Id: Ieec52d5e0da776d35d6a473bd726b368af9d5c66
2018-01-26 22:53:57 +01:00
Harald Welte be48a7c081 BSSMAP_Templates: tr_BSSMAP_AssignmentReq support for cic + aoip
Change-Id: I666e70d265d9d5dea7516640809b6081ddeecb88
2018-01-26 22:53:57 +01:00
Harald Welte b6e1d7ec31 BSSMAP_Templates: Make ts_BSSMAP_IE_AoIP_TLA also usable for receive
Change-Id: I8ef753e448453fcab845fbd2936e37a0c22075a0
2018-01-26 22:53:57 +01:00
Harald Welte b71901a52f msc: Rewrite TC_lu_and_mo_call() to be more modular
All relevant parameters are passed in in form of a CallParameters
record, and the bulk of the work has been moved to
BSC_ConnectionHandler.

Change-Id: I932c6c9f7a48b6a1f1ec399e8bba6a413c8bc69e
2018-01-26 22:53:57 +01:00
Harald Welte 9601c8106a MGCP_Emulation: Move from connetion-based to endpoint-based model
In the end, we will often see two connections that relate to one
endpoint, so let's dispatch based on the endpoint name and not based
on the connection identifier.

In the BSC case, we have
* two MGCP connections on one EP in case of RTP/IP based Abis
* one MGCP connectio on one EP in case of E1/T1 based Abis

In the MSC case, we have
* two MGCP connections on one EP: BSS and MSS/MNCC side

Change-Id: I8cd7395ee7b076a9a9ef513cc1b71f2db5009845
2018-01-26 22:53:57 +01:00
Harald Welte 148a7082e8 msc: Move auth/ciph handling in shared f_mm_common()
This shared function can now be used not only from f_perform_lu()
but also from f_establish_fully() and others.

Change-Id: Ib174b1e7153ce2ae531755cd0ba586bb12264551
2018-01-26 22:53:57 +01:00
Harald Welte c2461d66a5 msc: Move f_sleep() to common Osmocom_Types.ttcn
Change-Id: Ic748e1dfe002cb6ee4d785e9b7f8dca34873e504
2018-01-26 22:53:57 +01:00
Harald Welte 1623e6e385 msc: Make use of MGCP_Emulation in f_tc_lu_and_mo_call
Change-Id: Id33f17007b99776129e99625f8f6258a1653d863
2018-01-26 10:42:53 +01:00
Harald Welte 4aa970c218 msc: Start to integrate MGCP_Emulation component
Change-Id: I5330a06b7868b3f3a362cb5b640cd0cb985f2143
2018-01-26 10:42:53 +01:00
Harald Welte bb5a1212c8 MGCP_Emulation: More complete implementation
* re-introduce connection table
* introduce unitdata_cb for connectionless MGCP messages (like AUEP)
* rename MGCP_Emulation_CT members to avoid clashes with other similar
  component names when using "multiple inheritance"
* Use HostName/PortNumber types on MGCP_conn_parameters
* allow "bind to local UDP port only, permit any UDP source port" behavior
* implement expect matching criteria + expect matching only on CRCX
* add helper function f_create_mgcp_expect() like in other Emulations

Change-Id: I953a91e663648715fa4fe98acacca393c8747001
2018-01-26 10:42:53 +01:00
Harald Welte a02515f82f MGCP_Emulation: Add comment + license disclaimer
Change-Id: Ibf1a1ed80a99c8d8754cce3b47b11b5186b9c52d
2018-01-26 10:42:53 +01:00
Harald Welte b6c6ec15f2 BSSMAP_Templates: Permit tr_BSSMAP_AssignmentReq without CIC
Change-Id: Id0379fcb676698d92effce755dbc07c26a6a1101
2018-01-26 10:42:53 +01:00
Harald Welte 4b2b3a673a L3_Templates: ts_Bcap_voice(): Include speech version octets
Change-Id: Iff48bff6df6fa7dae3bc8467be4d75b0305f68ad
2018-01-26 10:42:53 +01:00
Daniel Willmann 166bbb3310 bsc: CRCX is answered with (malformed) ACK
Change-Id: I09c1ed467e95be236e0758d6a9c8bbef405c02eb
2018-01-26 10:42:53 +01:00
Harald Welte c27eaaeb8b MGCP library part of "bsc: Reply to CRCX with ACK"
Change-Id: I68b66d26dfbbba11e1b3a8c04435f08d095f68ed
2018-01-26 10:42:53 +01:00
Daniel Willmann 955627afed MGCP_Emulation part of "bsc: Register expect criteria for MGCP CRCX"
Change-Id: I466df816eef9863bf1664e785b996c0697dc04e3
2018-01-26 10:42:53 +01:00
Daniel Willmann 34e7dd0cca MGCP_CodecPort: Receive MGCP command or response
If we act as MGW we need to accept MGCP commands sent to us as well

Change-Id: I895cfb688a2923b278828f5ae918c73fda18636d
2018-01-26 10:42:53 +01:00