lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

  • 1 participants
  • 97219 discussions
[S] Change in ...osmo-s1gw[master]: doc/manuals: add a NOTE on ERL_FLAGS="-config ..."
by pespin 09 Nov '26

09 Nov '26
Attention is currently required from: fixeria. pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/44042?usp=email ) Change subject: doc/manuals: add a NOTE on ERL_FLAGS="-config ..." ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/44042?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I4052aed0bbb2fab1b0cf6bad6b8d513830183d56 Gerrit-Change-Number: 44042 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 09 Nov 2026 10:49:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: doc/manuals: fix the Asciidoc source code URL
by pespin 09 Nov '26

09 Nov '26
Attention is currently required from: fixeria. pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/44039?usp=email ) Change subject: doc/manuals: fix the Asciidoc source code URL ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/44039?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I858f1b414f3ebed14075b54ec151f0973266748d Gerrit-Change-Number: 44039 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 09 Nov 2026 10:48:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smf: Introduce test TC_n11_createSession_pfcp_sess_est_timeout_no_pdu...
by osmith 09 Nov '26

09 Nov '26
Attention is currently required from: fixeria, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44047?usp=email ) Change subject: smf: Introduce test TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44047?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idd3ff2bf55477e1c60f05e6e21337e45ceb0102d Gerrit-Change-Number: 44047 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 09 Nov 2026 10:48:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smf: Introduce test TC_n11_createSession_pfcp_sess_est_timeout_no_pdu...
by pespin 09 Nov '26

09 Nov '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44047?usp=email ) Change subject: smf: Introduce test TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej ...................................................................... smf: Introduce test TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej Related: https://github.com/open5gs/open5gs/issues/4878#issuecomment-6575650628 Change-Id: Idd3ff2bf55477e1c60f05e6e21337e45ceb0102d --- M smf/SMF_Session_CT_5G.ttcn M smf/SMF_Tests.ttcn M smf/expected-results.xml 3 files changed, 35 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/44047/1 diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index 86aca29..c818d94 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -589,13 +589,14 @@ ts_HTTP2_Hdr_content_type("application/json; charset=utf-8") }, body := ts_HTTP2_Data_frame(http2_rx.stream_id, - end_stream_flag := true, - data := body_enc)); + end_stream_flag := true, + data := body_enc)); HTTP2_CONN[HTTP2_CONN_SCP].send(http2_tx); } /* 5.2.2.3.1 N1N2MessageTransfer, PDU Session establishment (see clause 4.3.2 of 3GPP TS 23.502) */ -altstep as_namf_comm_post_n1n2_messages_pdu_sess_establishment_reject(template (present) GMM_GSM_Cause exp_cause := ?) +altstep as_namf_comm_post_n1n2_messages_pdu_sess_establishment_reject(template (present) GMM_GSM_Cause exp_cause := ?, + boolean do_reply := true) runs on SMF_Session_CT { var HTTP2_Msg http2_rx; var HTTP2_multipart_part_list parts; @@ -610,10 +611,11 @@ /* Decode 2nd part: NG-NAS: */ dl_nas := dec_NG_NAS_DL_SM_Message_Type(parts[1].data); f_ng_nas_handle_session_establishment_reject(dl_nas, exp_cause); - setverdict(pass); - /* Tx answer: */ - f_namf_comm_N1N2MessageTransferRspData(http2_rx); + if (do_reply) { + /* Tx answer: */ + f_namf_comm_N1N2MessageTransferRspData(http2_rx); + } setverdict(pass); } } diff --git a/smf/SMF_Tests.ttcn b/smf/SMF_Tests.ttcn index f093c4a..9d8c968 100644 --- a/smf/SMF_Tests.ttcn +++ b/smf/SMF_Tests.ttcn @@ -815,8 +815,10 @@ f_TC_n11_createSession_deleteSession_250(c_PFCP_PDN_Type_IPv4v6); } -/* create an IPv4 session, then delete it again */ -private function f_TC_n11_createSession_pfcp_sess_est_timeout() runs on SMF_Session_CT { +/* Create a session, then emulated UPF never answers the PFCP Sess Est Req: + * timeout should release the session in the SMF and reject the UE. + * https://github.com/open5gs/open5gs/issues/4878 */ +private function f_TC_n11_createSession_pfcp_sess_est_timeout_(boolean pdu_sess_rej_reply := true) runs on SMF_Session_CT { var HTTP2_Msg http2_tx; var PrometheusExpects expects0 := valueof({ @@ -874,19 +876,23 @@ /* SMF deregisters on UDM: */ alt { [] as_nudm_sdm_delete_IndividualSubscription() { setverdict(pass); } /* expected incoming msg */ - [] as_namf_comm_post_n1n2_messages_pdu_sess_establishment_reject() { /* Unexpected msg: */ + [] as_namf_comm_post_n1n2_messages_pdu_sess_establishment_reject(do_reply := pdu_sess_rej_reply) { /* Unexpected msg: */ setverdict(fail, "Received PDU SESS REJ while waiting for UDM! https://github.com/open5gs/open5gs/issues/4878"); repeat; } } /* SMF Rejects the Create Session back to the UE: */ - as_namf_comm_post_n1n2_messages_pdu_sess_establishment_reject(cs_GMM_GSM_Cause(omit, int2bit(38 /* Network Failure */, 8))); + as_namf_comm_post_n1n2_messages_pdu_sess_establishment_reject(cs_GMM_GSM_Cause(omit, int2bit(38 /* Network Failure */, 8)), + do_reply := pdu_sess_rej_reply); f_http2_server_emu_unregister(valueof(ts_Nsmf_PDUSession_path_sm_contexts(g_pars.nsmf.smContextRef)), idx := HTTP2_CONN_SCP); - f_prometheus_expect(expects0, wait_converge := true); + f_prometheus_expect(expects0, wait_converge := true, time_out := 15.0); setverdict(pass); } +private function f_TC_n11_createSession_pfcp_sess_est_timeout() runs on SMF_Session_CT { + f_TC_n11_createSession_pfcp_sess_est_timeout_(pdu_sess_rej_reply := true) +} testcase TC_n11_createSession_pfcp_sess_est_timeout() runs on SMF_Test_CT { var SMF_Session_CT vc_conn; var SessionPars pars := f_SessionPars(13, @@ -896,6 +902,20 @@ vc_conn.done; f_shutdown(); } +/* Same TC_n11_createSession_pfcp_sess_est_timeout, but gNodeB never answers the n1n2-messages(PDU Sess Est Rej): + * SBI timeout should release the session and metrics updated accordingly. */ +private function f_TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej() runs on SMF_Session_CT { + f_TC_n11_createSession_pfcp_sess_est_timeout_(pdu_sess_rej_reply := false) +} +testcase TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej() runs on SMF_Test_CT { + var SMF_Session_CT vc_conn; + var SessionPars pars := f_SessionPars(13, + rat_type := GTP2C_RAT_NR); + f_init(); + vc_conn := f_start_handler(refers(f_TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej), pars); + vc_conn.done; + f_shutdown(); +} /* Validate IUT detects PFCP Heartbeat timeout and recovers from it tearing down @@ -1035,6 +1055,7 @@ execute( TC_n11_createSession_deleteSession_250_ipv6() ); execute( TC_n11_createSession_deleteSession_250_ipv4v6() ); execute( TC_n11_createSession_pfcp_sess_est_timeout() ); + execute( TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej() ); execute( TC_5g_pfcp_heartbeat_timeout() ); execute( TC_5g_pfcp_heartbeat_recovery_timestamp() ); } diff --git a/smf/expected-results.xml b/smf/expected-results.xml index aef27e9..3656cc4 100644 --- a/smf/expected-results.xml +++ b/smf/expected-results.xml @@ -22,6 +22,7 @@ <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_250_ipv6' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_250_ipv4v6' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_n11_createSession_pfcp_sess_est_timeout' time='MASKED'/> + <testcase classname='SMF_Tests' name='TC_n11_createSession_pfcp_sess_est_timeout_no_pdu_sess_est_rej' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_5g_pfcp_heartbeat_timeout' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_5g_pfcp_heartbeat_recovery_timestamp' time='MASKED'/> </testsuite> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44047?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idd3ff2bf55477e1c60f05e6e21337e45ceb0102d Gerrit-Change-Number: 44047 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-msc[master]: MNCC debug log: fix logged line number for Tx messages
by fixeria 09 Nov '26

09 Nov '26
Attention is currently required from: falconia. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-msc/+/44043?usp=email ) Change subject: MNCC debug log: fix logged line number for Tx messages ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44043?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5c7070fb383a1aa42ab45478076be444d6b211f4 Gerrit-Change-Number: 44043 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 09 Nov 2026 08:24:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-msc[master]: mgw: add "X-Side: CN" / "X-Side: RAN" to emitted CRCX
by fixeria 09 Nov '26

09 Nov '26
Attention is currently required from: falconia, pespin. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-msc/+/44001?usp=email ) Change subject: mgw: add "X-Side: CN" / "X-Side: RAN" to emitted CRCX ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44001?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie26ece9035ee579f2af84a13d71a553f98817592 Gerrit-Change-Number: 44001 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 09 Nov 2026 08:21:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-msc[master]: mgw: add mgw-type selection between rtpbridge and transcoder
by falconia 09 Nov '26

09 Nov '26
Attention is currently required from: neels, pespin. falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-msc/+/44002?usp=email ) Change subject: mgw: add mgw-type selection between rtpbridge and transcoder ...................................................................... Patch Set 4: (1 comment) This change is ready for review. Patchset: PS1: > I am now working on two more patches in this series that will culminate in actually useful functiona […] The follow-on WIP patches are here, and the present patch is ready for review and merging. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44002?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I095ab75b65f57583ab7f579ba419bbfbfa686afa Gerrit-Change-Number: 44002 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 09 Nov 2026 07:16:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: falconia <falcon(a)freecalypso.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-msc[master]: MNCC debug log: fix logged line number for Tx messages
by falconia 09 Nov '26

09 Nov '26
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/44043?usp=email ) Change subject: MNCC debug log: fix logged line number for Tx messages ...................................................................... MNCC debug log: fix logged line number for Tx messages Every time a message is sent from CC to MNCC, internal function mncc_recvmsg() gets called. It appears the intent was to log the line number from which it was called, but the code would log the line number inside mncc_recvmsg() itself. Fix it. Change-Id: I5c7070fb383a1aa42ab45478076be444d6b211f4 --- M src/libmsc/gsm_04_08_cc.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/43/44043/1 diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 11bebb0..9ac018e 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -306,7 +306,7 @@ unsigned char *data; mncc->msg_type = msg_type; - log_mncc_rx_tx(trans, "tx", (union mncc_msg *)mncc); + _log_mncc_rx_tx(file, line, trans, "tx", (union mncc_msg *)mncc); msg = msgb_alloc(sizeof(struct gsm_mncc), "MNCC"); if (!msg) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44043?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5c7070fb383a1aa42ab45478076be444d6b211f4 Gerrit-Change-Number: 44043 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
[L] Change in osmo-msc[master]: MNCC: add vty-selectable raw mode
by falconia 09 Nov '26

09 Nov '26
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/44045?usp=email ) Change subject: MNCC: add vty-selectable raw mode ...................................................................... MNCC: add vty-selectable raw mode American 2G Cooperative seeks to develop MSC software in which existing OsmoMSC is just one component, with additional components connected via MNCC socket also constituting integral and essential parts of what GSM specs consider to be the MSC as a whole. We desire a raw mode modification to Osmocom MNCC with these changes: 1) Most CC messages should be passed to and from MNCC in raw form, without encoding and decoding of various IEs; 2) All intelligent logic inside OsmoMSC related to speech codec and bearer service selection filters needs to be suppressed and bypassed. Instead the external MNCC shall issue explicit AssCon (Assign & Connect) commands when the user plane connection to the MS needs to be set into a particular GSM 08.08 Channel Type, accompanied by SDP info for the CN side of the OsmoMSC-controlled MGW. Implement this mode of external MNCC operation, selected by a vty option. The present WIP state of this patch is experimental and NOT for merging yet. The code compiles and matches the author's mental model for the desired logic, but it is otherwise untested. The external MNCC code with which these OsmoMSC extensions are intended to operate remains to be written, and this code will reach tested status only then. In the meantime, Osmocom maintainers are invited to review this proposed patch for any phisophical issues that would need to be addressed irrespective of the working state. Related: OS#6652 Change-Id: I8e4268395d4c9a903ac61bdfaac21991d1bc8260 --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/mncc.h M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_builtin.c M src/libmsc/msc_vty.c 5 files changed, 392 insertions(+), 156 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/45/44045/1 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 928eeca..1980502 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -294,6 +294,13 @@ * telling it which CRCX is for CN vs RAN? */ bool mgw_indicate_side; + /* MNCC raw mode: exchange raw CC messages for the most part, + * and require the external MNCC to issue explicit AssCon + * (Assign & Connect) commands to trigger assignment on BSSMAP + * and connection at the OsmoMSC-controlled MGW. + */ + bool mncc_raw_mode; + /* Whether to use call waiting on the network */ bool call_waiting; diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index b835643..78d57a0 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -130,9 +130,10 @@ #define MNCC_F_GCR 0x4000 #define MNCC_F_HIGHL_COMPAT 0x8000 #define MNCC_F_LOWL_COMPAT 0x10000 +#define MNCC_F_RAW_MODE 0x20000 /* UPDATEME when adding new MNCC_F_* entries above */ -#define MNCC_F_ALL 0x1ffff +#define MNCC_F_ALL 0x3ffff #define GSM_MAX_LOWL_COMPAT 16 /* (18 with TLV) */ #define GSM_MAX_HIGHL_COMPAT 3 /* (5 with TLV) */ @@ -192,6 +193,20 @@ uint8_t len; uint8_t compat[GSM_MAX_HIGHL_COMPAT]; } hlc; + + /* raw CC message */ + struct gsm_mncc_raw_cc { + /* The length and body carried in this structure capture + * the remainder of the CC message _after_ struct gsm48_hdr. + * Rationale for stripping proto_disc and msg_type bytes: + * - the function of TID in PD byte is replaced by callref + * in MNCC; + * - there is a 1:1 correspondence between CC and MNCC + * message types, hence CC msg_type would be redundant. + */ + uint8_t len; + uint8_t data[255]; /* maximum with 1-byte length */ + } raw; }; struct gsm_data_frame { diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 71400ba..01028f6 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -610,6 +610,24 @@ trans->cc.Tcurrent = current; } +static void store_raw_cc_in_mncc(struct gsm_trans *trans, struct msgb *msg, + struct gsm_mncc *mncc) +{ + struct gsm48_hdr *gh = msgb_l3(msg); + unsigned len = msgb_l3len(msg) - sizeof(*gh); + + if (len > sizeof(mncc->raw.data)) { + LOG_TRANS(trans, LOGL_ERROR, + "MNCC raw mode: CC msg is too big (%u bytes)\n", len); + /* FIXME: is truncation the best we can do? At least it is + * better than killing the MSC with OSMO_ASSERT()... */ + len = sizeof(mncc->raw.data); + } + mncc->raw.len = len; + memcpy(mncc->raw.data, gh->data, len); + mncc->fields |= MNCC_F_RAW_MODE; +} + static int gsm48_cc_rx_setup(struct gsm_trans *trans, struct msgb *msg) { struct gsm48_hdr *gh = msgb_l3(msg); @@ -643,7 +661,6 @@ OSMO_ASSERT(trans->msc_a); - tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* emergency setup is identified by msg_type */ if (msg_type == GSM48_MT_CC_EMERG_SETUP) { setup.fields |= MNCC_F_EMERGENCY; @@ -663,6 +680,21 @@ OSMO_STRLCPY_ARRAY(setup.calling.number, trans->vsub->msisdn); OSMO_STRLCPY_ARRAY(setup.imsi, trans->vsub->imsi); + rate_ctr_inc(rate_ctr_group_get_ctr(trans->net->msc_ctrs, MSC_CTR_CALL_MO_SETUP)); + + new_cc_state(trans, GSM_CSTATE_INITIATED); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &setup); + LOG_TRANS(trans, setup.emergency ? LOGL_NOTICE : LOGL_INFO, + "%sSETUP in raw MNCC mode\n", + setup.emergency ? "EMERGENCY_" : ""); + return mncc_recvmsg(trans->net, trans, MNCC_SETUP_IND, &setup); + } + + /* regular MNCC mode, not raw - proceed with parsing */ + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); + /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { setup.fields |= MNCC_F_BEARER_CAP; @@ -737,10 +769,6 @@ LOG_TRANS(trans, setup.emergency ? LOGL_NOTICE : LOGL_INFO, "%sSETUP to %s\n", setup.emergency ? "EMERGENCY_" : "", setup.called.number); - rate_ctr_inc(rate_ctr_group_get_ctr(trans->net->msc_ctrs, MSC_CTR_CALL_MO_SETUP)); - - new_cc_state(trans, GSM_CSTATE_INITIATED); - /* To complete the MNCC_SETUP_IND, we need to provide an RTP address and port. First instruct the MGW to create * a CN-side RTP conn, and continue with MNCC_SETUP_IND once that is done. Leave trans.cc in GSM_CSTATE_NULL and * note down the msg_type to indicate that we indeed composed an MNCC_SETUP_IND for later. */ @@ -1070,6 +1098,18 @@ return msg; } +static struct msgb *gsm48_cc_tx_setup_encode_msg_raw(const struct gsm_mncc *setup) +{ + struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC SETUP"); + struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); + uint8_t *data = msgb_put(msg, setup->raw.len); + + gh->msg_type = GSM48_MT_CC_SETUP; + memcpy(data, setup->raw.data, setup->raw.len); + + return msg; +} + static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg) { struct msgb *msg; @@ -1082,18 +1122,19 @@ gsm48_start_cc_timer(trans, 0x303, GSM48_T303); - if (setup->fields & MNCC_F_BEARER_CAP) - trans->bearer_cap.transfer = setup->bearer_cap.transfer; - - rc = gsm48_cc_tx_setup_select_codecs(trans, setup); - if (rc < 0) - goto error; - - rc = gsm48_cc_tx_setup_set_bearer_cap(trans, setup); - if (rc < 0) - goto error; - - msg = gsm48_cc_tx_setup_encode_msg(&trans->bearer_cap, setup); + if (setup->fields & MNCC_F_RAW_MODE) { + msg = gsm48_cc_tx_setup_encode_msg_raw(setup); + } else { + if (setup->fields & MNCC_F_BEARER_CAP) + trans->bearer_cap.transfer = setup->bearer_cap.transfer; + rc = gsm48_cc_tx_setup_select_codecs(trans, setup); + if (rc < 0) + goto error; + rc = gsm48_cc_tx_setup_set_bearer_cap(trans, setup); + if (rc < 0) + goto error; + msg = gsm48_cc_tx_setup_encode_msg(&trans->bearer_cap, setup); + } new_cc_state(trans, GSM_CSTATE_CALL_PRESENT); @@ -1119,6 +1160,17 @@ memset(&call_conf, 0, sizeof(struct gsm_mncc)); call_conf.callref = trans->callref; + /* IMSI of called subscriber */ + OSMO_STRLCPY_ARRAY(call_conf.imsi, trans->vsub->imsi); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &call_conf); + /* no automatic assignment in raw mode! */ + new_cc_state(trans, GSM_CSTATE_MO_TERM_CALL_CONF); + return mncc_recvmsg(trans->net, trans, MNCC_CALL_CONF_IND, + &call_conf); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); #if 0 /* repeat */ @@ -1157,9 +1209,6 @@ TLVP_VAL(&tp, GSM48_IE_CC_CAP)-1); } - /* IMSI of called subscriber */ - OSMO_STRLCPY_ARRAY(call_conf.imsi, trans->vsub->imsi); - /* Assign call (if not done yet) */ rc = msc_a_try_call_assignment(trans); @@ -1222,6 +1271,13 @@ new_cc_state(trans, GSM_CSTATE_MO_CALL_PROC); + if (proceeding->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, proceeding->raw.len); + memcpy(data, proceeding->raw.data, proceeding->raw.len); + /* no automatic assignment in raw mode! */ + return trans_tx_gsm48(trans, msg); + } + /* bearer capability */ if (proceeding->fields & MNCC_F_BEARER_CAP) { /* MNCC should not switch from e.g. CSD to speech */ @@ -1264,6 +1320,15 @@ memset(&alerting, 0, sizeof(struct gsm_mncc)); alerting.callref = trans->callref; + + new_cc_state(trans, GSM_CSTATE_CALL_RECEIVED); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &alerting); + return mncc_recvmsg(trans->net, trans, MNCC_ALERT_IND, + &alerting); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { @@ -1285,8 +1350,6 @@ TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1); } - new_cc_state(trans, GSM_CSTATE_CALL_RECEIVED); - trans_cc_filter_run(trans); rc = sdp_msg_to_sdp_str_buf(alerting.sdp, sizeof(alerting.sdp), &trans->cc.local); if (rc >= sizeof(alerting.sdp)) { @@ -1309,15 +1372,20 @@ gh->msg_type = GSM48_MT_CC_ALERTING; - /* facility */ - if (alerting->fields & MNCC_F_FACILITY) - gsm48_encode_facility(msg, 0, &alerting->facility); - /* progress */ - if (alerting->fields & MNCC_F_PROGRESS) - gsm48_encode_progress(msg, 0, &alerting->progress); - /* user-user */ - if (alerting->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 0, &alerting->useruser); + if (alerting->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, alerting->raw.len); + memcpy(data, alerting->raw.data, alerting->raw.len); + } else { + /* facility */ + if (alerting->fields & MNCC_F_FACILITY) + gsm48_encode_facility(msg, 0, &alerting->facility); + /* progress */ + if (alerting->fields & MNCC_F_PROGRESS) + gsm48_encode_progress(msg, 0, &alerting->progress); + /* user-user */ + if (alerting->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 0, &alerting->useruser); + } new_cc_state(trans, GSM_CSTATE_CALL_DELIVERED); @@ -1338,11 +1406,16 @@ gh->msg_type = GSM48_MT_CC_PROGRESS; - /* progress */ - gsm48_encode_progress(msg, 1, &progress->progress); - /* user-user */ - if (progress->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 0, &progress->useruser); + if (progress->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, progress->raw.len); + memcpy(data, progress->raw.data, progress->raw.len); + } else { + /* progress */ + gsm48_encode_progress(msg, 1, &progress->progress); + /* user-user */ + if (progress->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 0, &progress->useruser); + } return trans_tx_gsm48(trans, msg); } @@ -1358,18 +1431,23 @@ gsm48_stop_cc_timer(trans); gsm48_start_cc_timer(trans, 0x313, GSM48_T313); - /* facility */ - if (connect->fields & MNCC_F_FACILITY) - gsm48_encode_facility(msg, 0, &connect->facility); - /* progress */ - if (connect->fields & MNCC_F_PROGRESS) - gsm48_encode_progress(msg, 0, &connect->progress); - /* connected number */ - if (connect->fields & MNCC_F_CONNECTED) - gsm48_encode_connected(msg, &connect->connected); - /* user-user */ - if (connect->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 0, &connect->useruser); + if (connect->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, connect->raw.len); + memcpy(data, connect->raw.data, connect->raw.len); + } else { + /* facility */ + if (connect->fields & MNCC_F_FACILITY) + gsm48_encode_facility(msg, 0, &connect->facility); + /* progress */ + if (connect->fields & MNCC_F_PROGRESS) + gsm48_encode_progress(msg, 0, &connect->progress); + /* connected number */ + if (connect->fields & MNCC_F_CONNECTED) + gsm48_encode_connected(msg, &connect->connected); + /* user-user */ + if (connect->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 0, &connect->useruser); + } new_cc_state(trans, GSM_CSTATE_CONNECT_IND); @@ -1391,12 +1469,22 @@ memset(&connect, 0, sizeof(struct gsm_mncc)); connect.callref = trans->callref; - tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); /* use subscriber as connected party number */ connect.fields |= MNCC_F_CONNECTED; OSMO_STRLCPY_ARRAY(connect.connected.number, trans->vsub->msisdn); OSMO_STRLCPY_ARRAY(connect.imsi, trans->vsub->imsi); + new_cc_state(trans, GSM_CSTATE_CONNECT_REQUEST); + rate_ctr_inc(rate_ctr_group_get_ctr(trans->net->msc_ctrs, MSC_CTR_CALL_MT_CONNECT)); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &connect); + return mncc_recvmsg(trans->net, trans, MNCC_SETUP_CNF, + &connect); + } + + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); + /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { connect.fields |= MNCC_F_FACILITY; @@ -1416,9 +1504,6 @@ TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1); } - new_cc_state(trans, GSM_CSTATE_CONNECT_REQUEST); - rate_ctr_inc(rate_ctr_group_get_ctr(trans->net->msc_ctrs, MSC_CTR_CALL_MT_CONNECT)); - trans_cc_filter_run(trans); sdp_msg_to_sdp_str_buf(connect.sdp, sizeof(connect.sdp), &trans->cc.local); return mncc_recvmsg(trans->net, trans, MNCC_SETUP_CNF, &connect); @@ -1466,6 +1551,12 @@ memset(&disc, 0, sizeof(struct gsm_mncc)); disc.callref = trans->callref; + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &disc); + return mncc_recvmsg(trans->net, trans, MNCC_DISC_IND, &disc); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, GSM48_IE_CAUSE, 0); /* cause */ if (TLVP_PRESENT(&tp, GSM48_IE_CAUSE)) { @@ -1516,21 +1607,26 @@ gsm48_stop_cc_timer(trans); gsm48_start_cc_timer(trans, 0x306, GSM48_T306); - /* cause */ - if (disc->fields & MNCC_F_CAUSE) - gsm48_encode_cause(msg, 1, &disc->cause); - else - gsm48_encode_cause(msg, 1, &default_cause); + if (disc->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, disc->raw.len); + memcpy(data, disc->raw.data, disc->raw.len); + } else { + /* cause */ + if (disc->fields & MNCC_F_CAUSE) + gsm48_encode_cause(msg, 1, &disc->cause); + else + gsm48_encode_cause(msg, 1, &default_cause); - /* facility */ - if (disc->fields & MNCC_F_FACILITY) - gsm48_encode_facility(msg, 0, &disc->facility); - /* progress */ - if (disc->fields & MNCC_F_PROGRESS) - gsm48_encode_progress(msg, 0, &disc->progress); - /* user-user */ - if (disc->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 0, &disc->useruser); + /* facility */ + if (disc->fields & MNCC_F_FACILITY) + gsm48_encode_facility(msg, 0, &disc->facility); + /* progress */ + if (disc->fields & MNCC_F_PROGRESS) + gsm48_encode_progress(msg, 0, &disc->progress); + /* user-user */ + if (disc->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 0, &disc->useruser); + } /* store disconnect cause for T306 expiry */ memcpy(&trans->cc.msg, disc, sizeof(struct gsm_mncc)); @@ -1552,30 +1648,35 @@ memset(&rel, 0, sizeof(struct gsm_mncc)); rel.callref = trans->callref; - tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); - /* cause */ - if (TLVP_PRESENT(&tp, GSM48_IE_CAUSE)) { - rel.fields |= MNCC_F_CAUSE; - gsm48_decode_cause(&rel.cause, - TLVP_VAL(&tp, GSM48_IE_CAUSE)-1); - } - /* facility */ - if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { - rel.fields |= MNCC_F_FACILITY; - gsm48_decode_facility(&rel.facility, - TLVP_VAL(&tp, GSM48_IE_FACILITY)-1); - } - /* user-user */ - if (TLVP_PRESENT(&tp, GSM48_IE_USER_USER)) { - rel.fields |= MNCC_F_USERUSER; - gsm48_decode_useruser(&rel.useruser, - TLVP_VAL(&tp, GSM48_IE_USER_USER)-1); - } - /* ss-version */ - if (TLVP_PRESENT(&tp, GSM48_IE_SS_VERS)) { - rel.fields |= MNCC_F_SSVERSION; - gsm48_decode_ssversion(&rel.ssversion, - TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &rel); + } else { + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); + /* cause */ + if (TLVP_PRESENT(&tp, GSM48_IE_CAUSE)) { + rel.fields |= MNCC_F_CAUSE; + gsm48_decode_cause(&rel.cause, + TLVP_VAL(&tp, GSM48_IE_CAUSE)-1); + } + /* facility */ + if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { + rel.fields |= MNCC_F_FACILITY; + gsm48_decode_facility(&rel.facility, + TLVP_VAL(&tp, GSM48_IE_FACILITY)-1); + } + /* user-user */ + if (TLVP_PRESENT(&tp, GSM48_IE_USER_USER)) { + rel.fields |= MNCC_F_USERUSER; + gsm48_decode_useruser(&rel.useruser, + TLVP_VAL(&tp, GSM48_IE_USER_USER)-1); + } + /* ss-version */ + if (TLVP_PRESENT(&tp, GSM48_IE_SS_VERS)) { + rel.fields |= MNCC_F_SSVERSION; + gsm48_decode_ssversion(&rel.ssversion, + TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1); + } } if (trans->cc.state == GSM_CSTATE_RELEASE_REQ) { @@ -1615,15 +1716,20 @@ gsm48_stop_cc_timer(trans); gsm48_start_cc_timer(trans, 0x308, GSM48_T308); - /* cause */ - if (rel->fields & MNCC_F_CAUSE) - gsm48_encode_cause(msg, 0, &rel->cause); - /* facility */ - if (rel->fields & MNCC_F_FACILITY) - gsm48_encode_facility(msg, 0, &rel->facility); - /* user-user */ - if (rel->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 0, &rel->useruser); + if (rel->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, rel->raw.len); + memcpy(data, rel->raw.data, rel->raw.len); + } else { + /* cause */ + if (rel->fields & MNCC_F_CAUSE) + gsm48_encode_cause(msg, 0, &rel->cause); + /* facility */ + if (rel->fields & MNCC_F_FACILITY) + gsm48_encode_facility(msg, 0, &rel->facility); + /* user-user */ + if (rel->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 0, &rel->useruser); + } trans->cc.T308_second = 0; memcpy(&trans->cc.msg, rel, sizeof(struct gsm_mncc)); @@ -1646,30 +1752,35 @@ memset(&rel, 0, sizeof(struct gsm_mncc)); rel.callref = trans->callref; - tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); - /* cause */ - if (TLVP_PRESENT(&tp, GSM48_IE_CAUSE)) { - rel.fields |= MNCC_F_CAUSE; - gsm48_decode_cause(&rel.cause, - TLVP_VAL(&tp, GSM48_IE_CAUSE)-1); - } - /* facility */ - if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { - rel.fields |= MNCC_F_FACILITY; - gsm48_decode_facility(&rel.facility, - TLVP_VAL(&tp, GSM48_IE_FACILITY)-1); - } - /* user-user */ - if (TLVP_PRESENT(&tp, GSM48_IE_USER_USER)) { - rel.fields |= MNCC_F_USERUSER; - gsm48_decode_useruser(&rel.useruser, - TLVP_VAL(&tp, GSM48_IE_USER_USER)-1); - } - /* ss-version */ - if (TLVP_PRESENT(&tp, GSM48_IE_SS_VERS)) { - rel.fields |= MNCC_F_SSVERSION; - gsm48_decode_ssversion(&rel.ssversion, - TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &rel); + } else { + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0); + /* cause */ + if (TLVP_PRESENT(&tp, GSM48_IE_CAUSE)) { + rel.fields |= MNCC_F_CAUSE; + gsm48_decode_cause(&rel.cause, + TLVP_VAL(&tp, GSM48_IE_CAUSE)-1); + } + /* facility */ + if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { + rel.fields |= MNCC_F_FACILITY; + gsm48_decode_facility(&rel.facility, + TLVP_VAL(&tp, GSM48_IE_FACILITY)-1); + } + /* user-user */ + if (TLVP_PRESENT(&tp, GSM48_IE_USER_USER)) { + rel.fields |= MNCC_F_USERUSER; + gsm48_decode_useruser(&rel.useruser, + TLVP_VAL(&tp, GSM48_IE_USER_USER)-1); + } + /* ss-version */ + if (TLVP_PRESENT(&tp, GSM48_IE_SS_VERS)) { + rel.fields |= MNCC_F_SSVERSION; + gsm48_decode_ssversion(&rel.ssversion, + TLVP_VAL(&tp, GSM48_IE_SS_VERS)-1); + } } if (trans->callref) { @@ -1707,15 +1818,20 @@ gsm48_stop_cc_timer(trans); - /* cause */ - if (rel->fields & MNCC_F_CAUSE) - gsm48_encode_cause(msg, 0, &rel->cause); - /* facility */ - if (rel->fields & MNCC_F_FACILITY) - gsm48_encode_facility(msg, 0, &rel->facility); - /* user-user */ - if (rel->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 0, &rel->useruser); + if (rel->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, rel->raw.len); + memcpy(data, rel->raw.data, rel->raw.len); + } else { + /* cause */ + if (rel->fields & MNCC_F_CAUSE) + gsm48_encode_cause(msg, 0, &rel->cause); + /* facility */ + if (rel->fields & MNCC_F_FACILITY) + gsm48_encode_facility(msg, 0, &rel->facility); + /* user-user */ + if (rel->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 0, &rel->useruser); + } ret = trans_tx_gsm48(trans, msg); @@ -1733,6 +1849,12 @@ memset(&fac, 0, sizeof(struct gsm_mncc)); fac.callref = trans->callref; + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &fac); + return mncc_recvmsg(trans->net, trans, MNCC_FACILITY_IND, &fac); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, GSM48_IE_FACILITY, 0); /* facility */ if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) { @@ -1758,8 +1880,13 @@ gh->msg_type = GSM48_MT_CC_FACILITY; - /* facility */ - gsm48_encode_facility(msg, 1, &fac->facility); + if (fac->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, fac->raw.len); + memcpy(data, fac->raw.data, fac->raw.len); + } else { + /* facility */ + gsm48_encode_facility(msg, 1, &fac->facility); + } return trans_tx_gsm48(trans, msg); } @@ -1918,6 +2045,15 @@ memset(&modify, 0, sizeof(struct gsm_mncc)); modify.callref = trans->callref; + + new_cc_state(trans, GSM_CSTATE_MO_ORIG_MODIFY); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &modify); + return mncc_recvmsg(trans->net, trans, MNCC_MODIFY_IND, + &modify); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, GSM48_IE_BEARER_CAP, 0); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -1932,8 +2068,6 @@ sizeof(trans->bearer_cap)); } - new_cc_state(trans, GSM_CSTATE_MO_ORIG_MODIFY); - return mncc_recvmsg(trans->net, trans, MNCC_MODIFY_IND, &modify); } @@ -1947,13 +2081,19 @@ gsm48_start_cc_timer(trans, 0x323, GSM48_T323); + new_cc_state(trans, GSM_CSTATE_MO_TERM_MODIFY); + + if (modify->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, modify->raw.len); + memcpy(data, modify->raw.data, modify->raw.len); + return trans_tx_gsm48(trans, msg); + } + /* bearer capability */ bearer_cap_filter_rev_lev(&modify->bearer_cap, trans->vsub->classmark.classmark1.rev_lev); gsm48_encode_bearer_cap(msg, 1, &modify->bearer_cap); memcpy(&trans->bearer_cap, &modify->bearer_cap, sizeof(trans->bearer_cap)); - new_cc_state(trans, GSM_CSTATE_MO_TERM_MODIFY); - return trans_tx_gsm48(trans, msg); } @@ -1968,6 +2108,15 @@ memset(&modify, 0, sizeof(struct gsm_mncc)); modify.callref = trans->callref; + + new_cc_state(trans, GSM_CSTATE_ACTIVE); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &modify); + return mncc_recvmsg(trans->net, trans, MNCC_MODIFY_CNF, + &modify); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, GSM48_IE_BEARER_CAP, 0); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -1982,8 +2131,6 @@ sizeof(trans->bearer_cap)); } - new_cc_state(trans, GSM_CSTATE_ACTIVE); - return mncc_recvmsg(trans->net, trans, MNCC_MODIFY_CNF, &modify); } @@ -1995,13 +2142,19 @@ gh->msg_type = GSM48_MT_CC_MODIFY_COMPL; + new_cc_state(trans, GSM_CSTATE_ACTIVE); + + if (modify->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, modify->raw.len); + memcpy(data, modify->raw.data, modify->raw.len); + return trans_tx_gsm48(trans, msg); + } + /* bearer capability */ bearer_cap_filter_rev_lev(&modify->bearer_cap, trans->vsub->classmark.classmark1.rev_lev); gsm48_encode_bearer_cap(msg, 1, &modify->bearer_cap); memcpy(&trans->bearer_cap, &modify->bearer_cap, sizeof(trans->bearer_cap)); - new_cc_state(trans, GSM_CSTATE_ACTIVE); - return trans_tx_gsm48(trans, msg); } @@ -2016,6 +2169,15 @@ memset(&modify, 0, sizeof(struct gsm_mncc)); modify.callref = trans->callref; + + new_cc_state(trans, GSM_CSTATE_ACTIVE); + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &modify); + return mncc_recvmsg(trans->net, trans, MNCC_MODIFY_REJ, + &modify); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, GSM48_IE_BEARER_CAP, GSM48_IE_CAUSE); /* bearer capability */ if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) { @@ -2036,8 +2198,6 @@ TLVP_VAL(&tp, GSM48_IE_CAUSE)-1); } - new_cc_state(trans, GSM_CSTATE_ACTIVE); - return mncc_recvmsg(trans->net, trans, MNCC_MODIFY_REJ, &modify); } @@ -2049,6 +2209,14 @@ gh->msg_type = GSM48_MT_CC_MODIFY_REJECT; + new_cc_state(trans, GSM_CSTATE_ACTIVE); + + if (modify->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, modify->raw.len); + memcpy(data, modify->raw.data, modify->raw.len); + return trans_tx_gsm48(trans, msg); + } + /* bearer capability */ bearer_cap_filter_rev_lev(&modify->bearer_cap, trans->vsub->classmark.classmark1.rev_lev); gsm48_encode_bearer_cap(msg, 1, &modify->bearer_cap); @@ -2056,8 +2224,6 @@ /* cause */ gsm48_encode_cause(msg, 1, &modify->cause); - new_cc_state(trans, GSM_CSTATE_ACTIVE); - return trans_tx_gsm48(trans, msg); } @@ -2099,12 +2265,17 @@ gh->msg_type = GSM48_MT_CC_USER_INFO; - /* user-user */ - if (user->fields & MNCC_F_USERUSER) - gsm48_encode_useruser(msg, 1, &user->useruser); - /* more data */ - if (user->more) - gsm48_encode_more(msg); + if (user->fields & MNCC_F_RAW_MODE) { + uint8_t *data = msgb_put(msg, user->raw.len); + memcpy(data, user->raw.data, user->raw.len); + } else { + /* user-user */ + if (user->fields & MNCC_F_USERUSER) + gsm48_encode_useruser(msg, 1, &user->useruser); + /* more data */ + if (user->more) + gsm48_encode_more(msg); + } return trans_tx_gsm48(trans, msg); } @@ -2118,6 +2289,13 @@ memset(&user, 0, sizeof(struct gsm_mncc)); user.callref = trans->callref; + + if (trans->net->mncc_raw_mode) { + store_raw_cc_in_mncc(trans, msg, &user); + return mncc_recvmsg(trans->net, trans, MNCC_USERINFO_IND, + &user); + } + tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, GSM48_IE_USER_USER, 0); /* user-user */ if (TLVP_PRESENT(&tp, GSM48_IE_USER_USER)) { @@ -2696,9 +2874,13 @@ return -ENOMEM; } - /* Remember remote SDP, if any */ - rx_mncc_sdp(trans, data->msg_type, data->sdp, - (data->fields & MNCC_F_BEARER_CAP) ? &data->bearer_cap : NULL); + /* Remember remote SDP, if any - but not in raw MNCC mode, + * as the objective of raw mode is to suppress all use + * of the codec filter mechanism. */ + if (!(data->fields & MNCC_F_RAW_MODE)) { + rx_mncc_sdp(trans, data->msg_type, data->sdp, + (data->fields & MNCC_F_BEARER_CAP) ? &data->bearer_cap : NULL); + } /* If subscriber has no conn */ if (!msc_a) { diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c index 6474201..57bbbf5 100644 --- a/src/libmsc/mncc_builtin.c +++ b/src/libmsc/mncc_builtin.c @@ -76,6 +76,14 @@ if (call->remote_ref) return 0; + if (setup->fields & MNCC_F_RAW_MODE) { + LOGP(DMNCC, LOGL_ERROR, + "internal MNCC is incompatible with raw mode\n"); + mncc_set_cause(&mncc, GSM48_CAUSE_LOC_PRN_S_LU, + GSM48_CC_CAUSE_NETWORK_OOO); + goto out_reject; + } + /* transfer mode 1 would be packet mode, which was never specified */ if (setup->bearer_cap.mode != 0) { LOGP(DMNCC, LOGL_NOTICE, "(call %x) We don't support " diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 2c873f6..078e504 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -442,6 +442,26 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_mncc_mode_std, + cfg_msc_mncc_mode_std_cmd, + "mncc mode standard", + MNCC_STR "Select MNCC interface variant to be used\n" + "Traditional Osmocom MNCC\n") +{ + gsmnet->mncc_raw_mode = false; + return CMD_SUCCESS; +} + +DEFUN(cfg_msc_mncc_mode_raw, + cfg_msc_mncc_mode_raw_cmd, + "mncc mode raw", + MNCC_STR "Select MNCC interface variant to be used\n" + "MNCC with raw CC messages and explicit assignment control\n") +{ + gsmnet->mncc_raw_mode = true; + return CMD_SUCCESS; +} + DEFUN(cfg_msc_mncc_guard_timeout, cfg_msc_mncc_guard_timeout_cmd, "mncc guard-timeout <0-255>", @@ -832,6 +852,8 @@ vty_out(vty, " mncc external %s%s", gsmnet->mncc_sock_path, VTY_NEWLINE); else vty_out(vty, " mncc internal%s", VTY_NEWLINE); + if (gsmnet->mncc_raw_mode) + vty_out(vty, " mncc mode raw%s", VTY_NEWLINE); vty_out(vty, " mncc guard-timeout %i%s", gsmnet->mncc_guard_timeout, VTY_NEWLINE); vty_out(vty, " ncss guard-timeout %i%s", @@ -2183,6 +2205,8 @@ install_element(MSC_NODE, &cfg_msc_no_lcls_disable_cmd); install_element(MSC_NODE, &cfg_msc_mncc_internal_cmd); install_element(MSC_NODE, &cfg_msc_mncc_external_cmd); + install_element(MSC_NODE, &cfg_msc_mncc_mode_std_cmd); + install_element(MSC_NODE, &cfg_msc_mncc_mode_raw_cmd); install_element(MSC_NODE, &cfg_msc_mncc_guard_timeout_cmd); install_element(MSC_NODE, &cfg_msc_deprecated_mncc_guard_timeout_cmd); install_element(MSC_NODE, &cfg_msc_ncss_guard_timeout_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44045?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8e4268395d4c9a903ac61bdfaac21991d1bc8260 Gerrit-Change-Number: 44045 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
[XS] Change in osmo-msc[master]: codec mapping: add support for compressed CSD
by falconia 09 Nov '26

09 Nov '26
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/44046?usp=email ) Change subject: codec mapping: add support for compressed CSD ...................................................................... codec mapping: add support for compressed CSD Themyscira Wireless Technical Specification TW-TS-007 defines a compressed format for RTP transport of CSD within a GSM network; it is supported as follows in Osmocom+ThemWi hybrid networks: * Using 'tw-rtp-formats' vty setting, OsmoMSC can request this CSD RTP format from Osmocom BSS, and the latter obliges when using E1 BTS and tw-e1abis-mgw. * Using TW-TS-007 compression and decompression functions in libosmotrau, Hera TC MGW can convert on the fly between CLEARMODE and TW-TS-007. * libosmo-mgcp-client knows about this codec, known in SDP as VND.THEMWI.CCSD and in the API as CODEC_COMPR_CSD. Add knowledge of this codec to the mapping mechanism in OsmoMSC, so it can be requested on CN side by external MNCC via AssCon. A future patch will add mechanism to indicate TW-TS-007 to the MGW on the RAN side when BSSMAP Assignment Complete indicates that the BSS accepted the request to use TW-TS-007 for CSD. Related: OS#6652 Change-Id: I97964ef7edeab3bb29300adb03a8374725eb2a1e --- M src/libmsc/codec_mapping.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/44046/1 diff --git a/src/libmsc/codec_mapping.c b/src/libmsc/codec_mapping.c index f3a707b..c1cac3f 100644 --- a/src/libmsc/codec_mapping.c +++ b/src/libmsc/codec_mapping.c @@ -218,6 +218,14 @@ }, .mgcp = CODEC_CLEARMODE, }, + { + .sdp = { + .payload_type = 127, + .subtype_name = "VND.THEMWI.CCSD", + .rate = 8000, + }, + .mgcp = CODEC_COMPR_CSD, + }, }; #define foreach_codec_mapping(CODEC_MAPPING) \ -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44046?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I97964ef7edeab3bb29300adb03a8374725eb2a1e Gerrit-Change-Number: 44046 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • ...
  • 9722
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.