Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Willmann e4ff537f9b library: Ensure setverdict(fail) is followed by mtc.stop
This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.

Using testcase.stop instead for errors internal to our test
infrastructure to mark them as test errors instead of failed.

Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
2018-07-24 09:54:18 +00:00
Philipp Maier 11a5894165 BSC_Tests: use correct payload types and encoding names on MGCP
The test currently use a hardcoded payload type and encoding name.
This does mean in practice that even when an assignment with EFR
is happeining. The MGCP responses to the BSC tell that the codec
is AMR. This is not correct. The testcases should always pick a
suitable payload type / encoding name in the MGCP response

- Add constants for IANA/3GPP assigned payload types
- Add function to lookup the right encoding name for a payload type
- Initalize the encoding name and payload type in g_media according
  to the BSSAP PDU.

Change-Id: I2735267091059e2f2169da80bdcd30abc2b1554b
Realted: OS#2728
2018-06-25 19:55:09 +00:00
Harald Welte e32ad992af *_Emulation.ttcn: Specify destination when replying on procedure ports
procedure ports (like message ports) require us to specify the
destination of a message ("reply") in case it is connected 1:N and not
just 1:1.  This didn't show up as a problem so far, as we typically only
had one component talking to those procedure ports at any given point
in time.

Change-Id: I696ec67080815348bb95e43ecbbf262e533e39a3
2018-06-01 12:00:56 +02:00
Harald Welte 9220f6336e Print more self-explanatory error message on bind/connect failures
When sockets cannot be bound or connected, the existing TTCN-3 code prints
the following rather cryptic error messages:

"IPA-CTRL-IPA(47)@f70ff1fd5cfd: Dynamic test case error: Using the value of an optional field containing omit. (Transport endpoint is not connected)"

The "Transport endpoint is not connected" sort-of gives it away, but
let's make it more explicit by introducing explicit checks for the
res.connId and manual setverdict(fail) statements with proper error
message.

Change-Id: Id22a1b5189d81c4fca03d5e7aff60ffdd1ad56bf
2018-05-23 20:27:02 +02:00
Harald Welte 930d0a70e3 bsc: Fix tons of TTCN3 compiler warnings
Change-Id: I60dc054d19a249d46d44585c17626746c34f4b09
2018-03-23 12:32:00 +00:00
Harald Welte 363cb0a394 bsc: Handle wildcard endpoint name in MGCP CRCX
MGCP permits for the CallAgent to send a wildcarded endpoint name,
at which point the MGW itself must allocate an endpoint name and
return it as SpecificEndpointId parameter in the CRCX response.

Change-Id: I704bbe4e11b27e83a6ae6a71aa6a715dc8301f34
2018-01-30 20:10:56 +01:00
Harald Welte 06e835fa6d MGCP_Emulation: Remove bogus mgcp_conn_id variable from MGCP_ConnHdlr
A given MGCP_ConnHdlr is handling multiple connections on one Endpoint
anyway, and the variable is not set or used anywhere.

Change-Id: If9eea3f665289a52915f114f0a69234aad28f322
2018-01-29 22:35:41 +01:00
Daniel Willmann aeea76fe5d bsc: Reply to CRCX with ACK
Change-Id: Ieaea431a99241d8844b915e1b46b77c79fff24df
2018-01-29 21:35:12 +00: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 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
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 fa870f5e25 Add MGCP_Emulation
Change-Id: I5245be2b44e98e1c74b9519c610564667b980a67
2018-01-26 10:42:53 +01:00