Project

General

Profile

Actions

Bug #6189

closed

SCCPLite: Support mgw pool feature

Added by pespin 5 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
09/22/2023
Due date:
% Done:

100%

Spec Reference:

Description

Right now the mgw pool feature (with more than 1 configured/ready MGW) only works with AoIP.

The expalantion can be found in this commit description:
https://gitea.osmocom.org/cellular-infrastructure/osmo-bsc/commit/da4af65a51ee8b8d7b380330c0301de293347563

The failing scenario described there can be found by running TTCN3 test BSC_Tests.TC_mgwpool_all_used in the ttcn3-bsc-test-sccplite testsuite.
The first call properly does everything through first MGW (port 2427). The second call starts properly using second MGW (port 2428) to set up the BTS-side connection, but then, when the MSC sends the IPA-encapsulated MGCP to osmo-bsc, it forwards it to the first MGW (port 2427), which is wrong, since it should be forwarded to the second MGW.

So in summary, what happens:
  1. BSC <- MSC: AssignmentRequest(CIC=1) // This CIC indicated by the MSC to the BSC the MGW endpoint to use, which means its unique per MSC
  2. (BSC selects an MGW from the pool, sets up the BTS-side conn on MGW endpoint=CIC=1)
  3. BSC -> MSC: ASsignmentCompelte
  4. BSC <-> MSC: IPA
  5. BSC should be able to remember CIC=1 from that MSC links to a specific MGW it selected previously, and submit the MGCP to it.

I attacha sample run of BSC_Tests.TC_mgwpool_all_used to show the problem.


Files

Actions #1

Updated by pespin 5 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

I submitted some patches to support multiple MGWs when in SCCPlite mode:

https://gerrit.osmocom.org/c/osmo-mgw/+/34510 mgcp-client: Introduce API osmo_mgcpc_ep_local_name()
https://gerrit.osmocom.org/c/osmo-bsc/+/34511 sccplite: Support multiple MGW in MGW pool

However, I still need to fix some problems in TTCN3 BSC_Tests.TC_mgwpool_all_used when running through ttcn3-bsc-test-sccplite.
First of all, it seems the 1st conn is not torn down properly at the BSC by the emulated MSC, and then the emulated MSC attempts to re-use the same MGCP-endpoint=1, and as a result osmo-bsc ends up picking the first conn (which was somehow not freed) and hence forwarding the message to the first MGW.

Here's the output proving what I'm saying, by removing the "break" line in the loop in osmo-bsc patch iterating over conns:

20230922182836616 DMSC NOTICE SUBSCR_CONN(msc0-conn1_subscr-IMSI-001011113915361)[0x612000021e20]{ACTIVE}: ep_local_name='1' vs rcv_ep_local_name='1' (osmo_bsc_mgcp.c:132)
20230922182836616 DMSC NOTICE SUBSCR_CONN(msc0-conn2_subscr-IMSI-001011048855582)[0x6120000228a0]{ACTIVE}: ep_local_name='1' vs rcv_ep_local_name='1' (osmo_bsc_mgcp.c:132

After removing the "break" line, the proper conn is picked and the MGCP message is forwarded to the correct MGW.

However, even then, BSC_Tests seem to be problems finding out the MGCP response message sent back to it through IPA:

18:28:36.636878 5 RAN_Emulation.ttcnpp:1143 Matching on port MGCP succeeded:  matched
18:28:36.636915 5 RAN_Emulation.ttcnpp:1143 Receive operation on port MGCP succeeded, message from VirtMSC-IPA(6): @MGCP_Types.MgcpResponse : { line := { code := "200", trans_id := "0", string := "OK" }, params := { { code := "I", val := "07E8EC18" }, { code := "Z", val := "1@mgw" } }, sdp := { protocol_version := 0, origin := { user_name := "-", session_id := "foo", session_version := "21", net_type := "IN", addr_type := "IP4", addr := "127.0.0.3" }, session_name := "-", information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := "IN", addr_type := "IP4", conn_addr := { addr := "127.0.0.5", ttl := omit, num_of_addr := omit } }, bandwidth := omit, times := { { time_field := { start_time := "0", stop_time := "0" }, time_repeat := omit } }, timezone_adjustments := omit, key := omit, attributes := omit, media_list := { { media_field := { media := "audio", ports := { port_number := 11002, num_of_ports := omit }, transport := "RTP/AVP", fmts := { "3" } }, information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { rtpmap := { attr_value := "3 GSM/8000" } }, { ptime := { attr_value := "20" } } } } } } } id 2
18:28:36.636942 5 RAN_Emulation.ttcnpp:1143 Message with id 2 was extracted from the queue of MGCP.
18:28:36.636977 5 RAN_Emulation.ttcnpp:1147 Sent on CLIENT to TC_mgwpool_all_used(13) @MGCP_Types.MgcpResponse : { line := { code := "200", trans_id := "0", string := "OK" }, params := { { code := "I", val := "07E8EC18" }, { code := "Z", val := "1@mgw" } }, sdp := { protocol_version := 0, origin := { user_name := "-", session_id := "foo", session_version := "21", net_type := "IN", addr_type := "IP4", addr := "127.0.0.3" }, session_name := "-", information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := "IN", addr_type := "IP4", conn_addr := { addr := "127.0.0.5", ttl := omit, num_of_addr := omit } }, bandwidth := omit, times := { { time_field := { start_time := "0", stop_time := "0" }, time_repeat := omit } }, timezone_adjustments := omit, key := omit, attributes := omit, media_list := { { media_field := { media := "audio", ports := { port_number := 11002, num_of_ports := omit }, transport := "RTP/AVP", fmts := { "3" } }, information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { rtpmap := { attr_value := "3 GSM/8000" } }, { ptime := { attr_value := "20" } } } } } } }
18:28:36.637131 13 BSC_Tests.ttcn:12154 Message enqueued on BSSAP from VirtMSC-RAN(5) @MGCP_Types.MgcpResponse : { line := { code := "200", trans_id := "0", string := "OK" }, params := { { code := "I", val := "07E8EC18" }, { code := "Z", val := "1@mgw" } }, sdp := { protocol_version := 0, origin := { user_name := "-", session_id := "foo", session_version := "21", net_type := "IN", addr_type := "IP4", addr := "127.0.0.3" }, session_name := "-", information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := "IN", addr_type := "IP4", conn_addr := { addr := "127.0.0.5", ttl := omit, num_of_addr := omit } }, bandwidth := omit, times := { { time_field := { start_time := "0", stop_time := "0" }, time_repeat := omit } }, timezone_adjustments := omit, key := omit, attributes := omit, media_list := { { media_field := { media := "audio", ports := { port_number := 11002, num_of_ports := omit }, transport := "RTP/AVP", fmts := { "3" } }, information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { rtpmap := { attr_value := "3 GSM/8000" } }, { ptime := { attr_value := "20" } } } } } } } id 4
18:28:41.615771 14 MSC_ConnectionHandler.ttcn:1415 Timeout T: 5 s
18:28:41.617575 14 MSC_ConnectionHandler.ttcn:1416 setverdict(fail): pass -> fail reason: "Timeout waiting for response to { line := { verb := "CRCX", trans_id := "0", ep := "1@mgw", ver := "1.0" }, params := { { code := "M", val := "sendrecv" }, { code := "C", val := "51234" }, { code := "L", val := "p:20, a:AMR" } }, sdp := { protocol_version := 0, origin := { user_name := "-", session_id := "23", session_version := "42", net_type := "IN", addr_type := "IP4", addr := "127.0.0.4" }, session_name := "-", information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := "IN", addr_type := "IP4", conn_addr := { addr := "127.0.0.5", ttl := omit, num_of_addr := omit } }, bandwidth := omit, times := { { time_field := { start_time := "0", stop_time := "0" }, time_repeat := omit } }, timezone_adjustments := omit, key := omit, attributes := omit, media_list := { { media_field := { media := "audio", ports := { port_number := 14000, num_of_ports := omit }, transport := "RTP/AVP", fmts := { "3" } }, information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { ptime := { attr_value := "20" } } } } } } }", new component reason: "Timeout waiting for response to { line := { verb := "CRCX", trans_id := "0", ep := "1@mgw", ver := "1.0" }, params := { { code := "M", val := "sendrecv" }, { code := "C", val := "51234" }, { code := "L", val := "p:20, a:AMR" } }, sdp := { protocol_version := 0, origin := { user_name := "-", session_id := "23", session_version := "42", net_type := "IN", addr_type := "IP4", addr := "127.0.0.4" }, session_name := "-", information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := "IN", addr_type := "IP4", conn_addr := { addr := "127.0.0.5", ttl := omit, num_of_addr := omit } }, bandwidth := omit, times := { { time_field := { start_time := "0", stop_time := "0" }, time_repeat := omit } }, timezone_adjustments := omit, key := omit, attributes := omit, media_list := { { media_field := { media := "audio", ports := { port_number := 14000, num_of_ports := omit }, transport := "RTP/AVP", fmts := { "3" } }, information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { ptime := { attr_value := "20" } } } } } } }" 

Actions #2

Updated by pespin 5 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Fixed by osmo-ttcn3-hacks 30da239be672b5aa61253a876dac8da6f716ba3f..aedacf32565d912e452b1a11312468fe9d64c2e9

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)