Attention is currently required from: falconia.
laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email )
Change subject: codec: add some constant frames for HR and EFR
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f
Gerrit-Change-Number: 39636
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Thu, 27 Feb 2025 09:23:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email )
Change subject: codec: add some constant frames for HR and EFR
......................................................................
codec: add some constant frames for HR and EFR
With all 3 classic GSM codecs (FR, HR and EFR) sometimes a need
arises for a constant fill frame, to be inserted when no good speech
frame is available. For GSM-FR codec the substitution/muting spec
(GSM 06.11) explicitly defines a silence frame for this purpose,
but no such officially defined fill frames exist for HR or EFR.
Those newer codecs do, however, have homing frames that all decoders
are required to implement, and there is an unofficial silence frame
for GSM-HR, observed as the output from the official encoder fed with
all-zeros input.
Add these 3 constant frames (HR silence, HR homing, EFR homing) to
libosmocodec in order to make them easily usable in any application
that may need them, including applications that cannot have ThemWi
codec libraries as dependencies.
Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f
---
M include/osmocom/codec/codec.h
M src/codec/gsm620.c
M src/codec/gsm660.c
3 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/39636/1
diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h
index 7a23e7f..008eab1 100644
--- a/include/osmocom/codec/codec.h
+++ b/include/osmocom/codec/codec.h
@@ -34,6 +34,9 @@
extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */
extern const uint8_t osmo_gsm611_silence_frame[GSM_FR_BYTES];
+extern const uint8_t osmo_gsm620_silence_frame[GSM_HR_BYTES];
+extern const uint8_t osmo_gsm620_homing_frame[GSM_HR_BYTES];
+extern const uint8_t osmo_gsm660_homing_frame[GSM_EFR_BYTES];
extern const struct value_string osmo_amr_type_names[];
diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c
index 49ee724..a24d762 100644
--- a/src/codec/gsm620.c
+++ b/src/codec/gsm620.c
@@ -263,6 +263,37 @@
81, /* Code 3:7 */
};
+/*
+ * There is no officially defined silence frame for GSM-HR codec like there is
+ * for GSM-FR. However, if one feeds all-zeros (complete silence) linear PCM
+ * input to the official GSM-HR encoder, the result will be an endless stream
+ * of these frames:
+ *
+ * R0=00 LPC=164,171,cb Int=0 Mode=0
+ * s1=00,00,00 s2=00,00,00 s3=00,00,00 s4=00,00,00
+ *
+ * The following const datum is the above unofficial GSM-HR silence frame in
+ * the packed RTP format of TS 101 318.
+ */
+const uint8_t osmo_gsm620_silence_frame[GSM_HR_BYTES] = {
+ 0x01, 0x64, 0xB8, 0xE5, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/*
+ * GSM 06.20 defines, by reference to GSM 06.06 C code and GSM 06.07 test
+ * sequences, a special frame of codec parameters called the decoder homing
+ * frame (DHF). When a spec-compliant speech decoder processes this frame,
+ * it resets itself to the spec-defined home state.
+ *
+ * The following const datum is GSM-HR DHF in the packed RTP format of
+ * TS 101 318.
+ */
+const uint8_t osmo_gsm620_homing_frame[GSM_HR_BYTES] = {
+ 0x03, 0x71, 0xAF, 0x61, 0xC8, 0xF2, 0x80,
+ 0x25, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00
+};
+
/*! Check whether RTP frame contains HR SID code word according to
* TS 101 318 §5.2.2
* \param[in] rtp_payload Buffer with RTP payload
diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c
index b15bdf3..fbb69c4 100644
--- a/src/codec/gsm660.c
+++ b/src/codec/gsm660.c
@@ -258,6 +258,21 @@
246, /* 259 -> PULSE 4_10: b0 */
};
+/*
+ * GSM 06.60 defines (in Table 7) a special frame of codec parameters called
+ * the decoder homing frame (DHF). When a spec-compliant speech decoder
+ * processes this frame, it resets itself to the spec-defined home state.
+ *
+ * The following const datum is GSM-EFR DHF in the packed RTP format of
+ * TS 101 318 or RFC 3551.
+ */
+const uint8_t osmo_gsm660_homing_frame[GSM_EFR_BYTES] = {
+ 0xC0, 0x85, 0xEB, 0x49, 0x0F, 0xAA, 0xD6, 0x03,
+ 0xE3, 0xA1, 0x86, 0x07, 0xB0, 0xC4, 0x2C, 0x08,
+ 0x04, 0x80, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
static const uint8_t sid_code_word_bits[95] = {
/* bit numbers are relative to "pure" EFR frame beginning,
* not counting the signature bits. */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f
Gerrit-Change-Number: 39636
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39634?usp=email )
Change subject: asp: Refactor osmo_ss7_asp_restart() into smaller chunks
......................................................................
asp: Refactor osmo_ss7_asp_restart() into smaller chunks
This is a preparation patch towards fixing osmo_ss7_asp_restart() doing
too many things at the same time, like tearing down the stream, FSMs,
recreating them etc, not always in the best order.
This function split steps into functions, better ordering the steps in
the process.
For instance, when reopening the stream_cli, make sure to close it
beforehand. This would anyway be done inside osmo_stream_cli_open() but
then all events (and hence logging) even weird, due to disconnect_cb
triggering in the middle of the creation and then calling
osmo_ss7_asp_restart() again while it is being called.
The later will be fixed in a follow-up commit.
Change-Id: I5c3461b724924f528b46f7fe815f017a5b4a1ff5
---
M src/osmo_ss7_asp.c
M src/ss7_asp.h
2 files changed, 124 insertions(+), 90 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/34/39634/1
diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index ab772ff..faf4a0a 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -612,95 +612,82 @@
static int xua_cli_disconnect_cb(struct osmo_stream_cli *cli);
static int xua_cli_close_and_reconnect(struct osmo_stream_cli *cli);
-int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
+
+static int ss7_asp_start_client(struct osmo_ss7_asp *asp)
{
- int rc;
- char bufloc[512], bufrem[512];
uint8_t byte;
+ int rc;
- OSMO_ASSERT(ss7_initialized);
- ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local);
- ss7_asp_peer_snprintf(bufrem, sizeof(bufrem), &asp->cfg.remote);
- LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, r=%s<->l=%s\n",
- asp->cfg.name, bufrem, bufloc);
-
- if (!asp->cfg.is_server) {
- /* We are in client mode now */
- if (asp->server) {
- /* if we previously were in server mode,
- * destroy it */
- osmo_stream_srv_destroy(asp->server);
- asp->server = NULL;
- }
- if (!asp->client)
- asp->client = osmo_stream_cli_create(asp);
- if (!asp->client) {
- LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to create stream"
- " client for ASP %s\n", asp->cfg.name);
- return -1;
- }
- osmo_stream_cli_set_name(asp->client, asp->cfg.name);
- osmo_stream_cli_set_nodelay(asp->client, true);
- osmo_stream_cli_set_addrs(asp->client, (const char **)asp->cfg.remote.host, asp->cfg.remote.host_cnt);
- osmo_stream_cli_set_port(asp->client, asp->cfg.remote.port);
- osmo_stream_cli_set_local_addrs(asp->client, (const char **)asp->cfg.local.host, asp->cfg.local.host_cnt);
- osmo_stream_cli_set_local_port(asp->client, asp->cfg.local.port);
- osmo_stream_cli_set_proto(asp->client, asp->cfg.trans_proto);
- osmo_stream_cli_set_reconnect_timeout(asp->client, 5);
- osmo_stream_cli_set_connect_cb(asp->client, xua_cli_connect_cb);
- osmo_stream_cli_set_disconnect_cb(asp->client, xua_cli_disconnect_cb);
- switch (asp->cfg.proto) {
- case OSMO_SS7_ASP_PROT_IPA:
- OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_TCP);
- osmo_stream_cli_set_read_cb2(asp->client, ipa_cli_read_cb);
- osmo_stream_cli_set_segmentation_cb(asp->client, osmo_ipa_segmentation_cb);
- break;
- case OSMO_SS7_ASP_PROT_M3UA:
- if (asp->cfg.trans_proto == IPPROTO_SCTP) {
- osmo_stream_cli_set_read_cb2(asp->client, xua_cli_read_cb);
- osmo_stream_cli_set_segmentation_cb(asp->client, NULL);
- } else if (asp->cfg.trans_proto == IPPROTO_TCP) {
- osmo_stream_cli_set_read_cb2(asp->client, m3ua_tcp_cli_read_cb);
- osmo_stream_cli_set_segmentation_cb(asp->client, xua_tcp_segmentation_cb);
- } else
- OSMO_ASSERT(0);
- break;
- default:
- OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_SCTP);
+ if (!asp->client)
+ asp->client = osmo_stream_cli_create(asp);
+ if (!asp->client) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to create stream"
+ " client for ASP %s\n", asp->cfg.name);
+ return -1;
+ }
+ osmo_stream_cli_set_name(asp->client, asp->cfg.name);
+ osmo_stream_cli_set_nodelay(asp->client, true);
+ osmo_stream_cli_set_addrs(asp->client, (const char **)asp->cfg.remote.host, asp->cfg.remote.host_cnt);
+ osmo_stream_cli_set_port(asp->client, asp->cfg.remote.port);
+ osmo_stream_cli_set_local_addrs(asp->client, (const char **)asp->cfg.local.host, asp->cfg.local.host_cnt);
+ osmo_stream_cli_set_local_port(asp->client, asp->cfg.local.port);
+ osmo_stream_cli_set_proto(asp->client, asp->cfg.trans_proto);
+ osmo_stream_cli_set_reconnect_timeout(asp->client, 5);
+ osmo_stream_cli_set_connect_cb(asp->client, xua_cli_connect_cb);
+ osmo_stream_cli_set_disconnect_cb(asp->client, xua_cli_disconnect_cb);
+ switch (asp->cfg.proto) {
+ case OSMO_SS7_ASP_PROT_IPA:
+ OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_TCP);
+ osmo_stream_cli_set_read_cb2(asp->client, ipa_cli_read_cb);
+ osmo_stream_cli_set_segmentation_cb(asp->client, osmo_ipa_segmentation_cb);
+ break;
+ case OSMO_SS7_ASP_PROT_M3UA:
+ if (asp->cfg.trans_proto == IPPROTO_SCTP) {
osmo_stream_cli_set_read_cb2(asp->client, xua_cli_read_cb);
osmo_stream_cli_set_segmentation_cb(asp->client, NULL);
- break;
- }
- osmo_stream_cli_set_data(asp->client, asp);
- byte = 1; /*AUTH is needed by ASCONF. enable, don't abort socket creation if AUTH can't be enabled */
- osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_AUTH_SUPPORTED, &byte, sizeof(byte));
- byte = 1; /* enable, don't abort socket creation if ASCONF can't be enabled */
- osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_ASCONF_SUPPORTED, &byte, sizeof(byte));
- if (asp->cfg.sctp_init.num_ostreams_present)
- osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_NUM_OSTREAMS,
- &asp->cfg.sctp_init.num_ostreams_value,
- sizeof(asp->cfg.sctp_init.num_ostreams_value));
- if (asp->cfg.sctp_init.max_instreams_present)
- osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_INSTREAMS,
- &asp->cfg.sctp_init.max_instreams_value,
- sizeof(asp->cfg.sctp_init.max_instreams_value));
- if (asp->cfg.sctp_init.max_attempts_present)
- osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_ATTEMPTS,
- &asp->cfg.sctp_init.max_attempts_value,
- sizeof(asp->cfg.sctp_init.max_attempts_value));
- if (asp->cfg.sctp_init.max_init_timeo_present)
- osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_TIMEOUT,
- &asp->cfg.sctp_init.max_init_timeo_value,
- sizeof(asp->cfg.sctp_init.max_init_timeo_value));
- rc = osmo_stream_cli_open(asp->client);
- if (rc < 0) {
- LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to open stream"
- " client for ASP %s, %s ==> %s\n", asp->cfg.name, bufloc, bufrem);
- /* we don't return error in here because osmo_stream_cli_open()
- will continue to retry (due to timeout being explicitly set with
- osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */
- }
- } else {
+ } else if (asp->cfg.trans_proto == IPPROTO_TCP) {
+ osmo_stream_cli_set_read_cb2(asp->client, m3ua_tcp_cli_read_cb);
+ osmo_stream_cli_set_segmentation_cb(asp->client, xua_tcp_segmentation_cb);
+ } else
+ OSMO_ASSERT(0);
+ break;
+ default:
+ OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_SCTP);
+ osmo_stream_cli_set_read_cb2(asp->client, xua_cli_read_cb);
+ osmo_stream_cli_set_segmentation_cb(asp->client, NULL);
+ break;
+ }
+ osmo_stream_cli_set_data(asp->client, asp);
+ byte = 1; /*AUTH is needed by ASCONF. enable, don't abort socket creation if AUTH can't be enabled */
+ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_AUTH_SUPPORTED, &byte, sizeof(byte));
+ byte = 1; /* enable, don't abort socket creation if ASCONF can't be enabled */
+ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_ASCONF_SUPPORTED, &byte, sizeof(byte));
+ if (asp->cfg.sctp_init.num_ostreams_present)
+ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_NUM_OSTREAMS,
+ &asp->cfg.sctp_init.num_ostreams_value,
+ sizeof(asp->cfg.sctp_init.num_ostreams_value));
+ if (asp->cfg.sctp_init.max_instreams_present)
+ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_INSTREAMS,
+ &asp->cfg.sctp_init.max_instreams_value,
+ sizeof(asp->cfg.sctp_init.max_instreams_value));
+ if (asp->cfg.sctp_init.max_attempts_present)
+ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_ATTEMPTS,
+ &asp->cfg.sctp_init.max_attempts_value,
+ sizeof(asp->cfg.sctp_init.max_attempts_value));
+ if (asp->cfg.sctp_init.max_init_timeo_present)
+ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_TIMEOUT,
+ &asp->cfg.sctp_init.max_init_timeo_value,
+ sizeof(asp->cfg.sctp_init.max_init_timeo_value));
+ rc = osmo_stream_cli_open(asp->client);
+ return rc;
+}
+
+/* Force stream disconnection, which should trigger disconnect_cb/close_cb() and
+ * announce disconnection to upper layers. */
+int ss7_asp_disconnect_stream(struct osmo_ss7_asp *asp)
+{
+ /* First tear down previous state if existing: */
+ if (asp->cfg.is_server) {
/* We are in server mode now */
if (asp->client) {
/* if we previously were in client mode,
@@ -708,18 +695,64 @@
osmo_stream_cli_destroy(asp->client);
asp->client = NULL;
}
- /* FIXME: ensure we have a SCTP server */
- LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server "
- "not implemented yet!\n");
+ } else {
+ /* We are in client mode now */
+ if (asp->server) {
+ /* if we previously were in server mode,
+ * destroy it */
+ osmo_stream_srv_destroy(asp->server);
+ asp->server = NULL;
+ }
+ if (asp->client) {
+ /* Make sure we close the previous stream before starting a new one: */
+ osmo_stream_cli_close(asp->client);
+ }
}
+ return 0;
+}
- /* (re)start the ASP FSM */
- if (asp->fi)
+int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
+{
+ int rc;
+ char bufloc[512], bufrem[512];
+
+ OSMO_ASSERT(ss7_initialized);
+ ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local);
+ ss7_asp_peer_snprintf(bufrem, sizeof(bufrem), &asp->cfg.remote);
+ LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, r=%s<->l=%s\n",
+ asp->cfg.name, bufrem, bufloc);
+
+ /* First tear down previous state if existing: */
+ ss7_asp_disconnect_stream(asp);
+
+ /* The ASP FSM must be terminated *after* tearing down the conn, so that
+ * DISCONNECT events go up the stack */
+ if (asp->fi) {
osmo_fsm_inst_term(asp->fi, OSMO_FSM_TERM_REQUEST, NULL);
- OSMO_ASSERT(!asp->fi);
+ OSMO_ASSERT(!asp->fi);
+ }
if ((rc = xua_asp_fsm_start(asp, asp->cfg.role, LOGL_DEBUG)) < 0)
return rc;
OSMO_ASSERT(asp->fi);
+
+ /* Now start the new stream: */
+
+ if (asp->cfg.is_server) {
+ /* We are in server mode now */
+ /* FIXME: ensure we have a SCTP server */
+ LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server "
+ "not implemented yet!\n");
+ } else {
+ /* We are in client mode now */
+ rc = ss7_asp_start_client(asp);
+ if (rc < 0) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to open stream"
+ " client for ASP %s, %s ==> %s\n", asp->cfg.name, bufloc, bufrem);
+ /* we don't return error in here because osmo_stream_cli_open()
+ will continue to retry (due to timeout being explicitly set with
+ osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */
+ }
+ }
return 0;
}
diff --git a/src/ss7_asp.h b/src/ss7_asp.h
index e2bd46d..377274a 100644
--- a/src/ss7_asp.h
+++ b/src/ss7_asp.h
@@ -103,6 +103,7 @@
bool ss7_asp_set_default_peer_hosts(struct osmo_ss7_asp *asp);
bool ss7_asp_is_started(const struct osmo_ss7_asp *asp);
int ss7_asp_get_fd(const struct osmo_ss7_asp *asp);
+int ss7_asp_disconnect_stream(struct osmo_ss7_asp *asp);
int ss7_asp_apply_peer_primary_address(const struct osmo_ss7_asp *asp);
int ss7_asp_apply_primary_address(const struct osmo_ss7_asp *asp);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39634?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I5c3461b724924f528b46f7fe815f017a5b4a1ff5
Gerrit-Change-Number: 39634
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39635?usp=email )
Change subject: default_lm_fsm: Trigger ASP restart by disconnecting the stream
......................................................................
default_lm_fsm: Trigger ASP restart by disconnecting the stream
Previous behavior was to restart the ASP top-to-bottom in the stack,
which doesn't play well with the disconnect_cb().
For instance, upon LM FSM timer callback, osmo_ss7_asp_restart() would call
osmo_stream_cli_open() which in turn would call osmo_stream_close(). As
a result, in that code path events were being sent to the LM FSM itself
notifying the disconnection of the SCTP conn, which in turn would call
osmo_ss7_asp_restart() again, and everything ended up in a weird state
where it couldn't create sockets properly.
The better approach is to, from LM FSM, trigger disconnection of the
SCTP conn, which will in turn, through disconnect_cb(), send the SCTP
disconnect notification up the stack, which should then trigger
re-establishment of the SCTP conn in the SCTP client case.
Change-Id: I21ebc3cd716a0bcc74da0a789032570f038e119d
---
M src/xua_default_lm_fsm.c
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/35/39635/1
diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c
index 7c27b19..fc01605 100644
--- a/src/xua_default_lm_fsm.c
+++ b/src/xua_default_lm_fsm.c
@@ -207,7 +207,7 @@
/* we have been waiting for the ASP to come up, but it
* failed to do so */
LOGPFSML(fi, LOGL_NOTICE, "Peer didn't send any ASP_UP in time! Restarting ASP\n");
- restart_asp(fi);
+ ss7_asp_disconnect_stream(lmp->asp);
break;
case SS7_ASP_LM_T_WAIT_NOTIFY:
if (lmp->asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_NO_NOTIFY) {
@@ -226,7 +226,7 @@
as = find_first_as_in_asp(lmp->asp);
if (!as) {
LOGPFSML(fi, LOGL_ERROR, "Unable to find AS!\n");
- restart_asp(fi);
+ ss7_asp_disconnect_stream(lmp->asp);
return 0;
}
/* Fill in settings from first AS (TODO: multiple AS support) */
@@ -237,11 +237,11 @@
case SS7_ASP_LM_T_WAIT_NOTIY_RKM:
/* No AS has reported via NOTIFY even after dynamic RKM
* configuration */
- restart_asp(fi);
+ ss7_asp_disconnect_stream(lmp->asp);
break;
case SS7_ASP_LM_T_WAIT_RK_REG_RESP:
/* timeout of registration of routing key */
- restart_asp(fi);
+ ss7_asp_disconnect_stream(lmp->asp);
break;
}
return 0;
@@ -285,12 +285,12 @@
oxp = data;
if (oxp->u.rk_reg.status != M3UA_RKM_REG_SUCCESS) {
LOGPFSML(fi, LOGL_NOTICE, "Received RKM_REG_RSP with negative result\n");
- restart_asp(fi);
+ ss7_asp_disconnect_stream(lmp->asp);
} else {
unsigned long timeout_sec;
rc = handle_reg_conf(fi, oxp->u.rk_reg.key.l_rk_id, oxp->u.rk_reg.key.context);
if (rc < 0)
- restart_asp(fi);
+ ss7_asp_disconnect_stream(lmp->asp);
/* RKM registration was successful, we can transition to WAIT_NOTIFY
* state and assume that an NOTIFY/AS-INACTIVE arrives within
* T_WAIT_NOTIFY_RKM seconds */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39635?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I21ebc3cd716a0bcc74da0a789032570f038e119d
Gerrit-Change-Number: 39635
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: falconia.
pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email )
Change subject: rtp2trau HR to DL: validate ToC octet of RFC 5993
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/trau/trau_rtp_conv.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/39626/comment/83da1da0_224fe334… :
PS1, Line 671: if (data[0] & 0xD0)
> The check in question needs to be performed in two functions, HR to TRAU-16k-DL and HR to TRAU-8k-DL […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ibbaa1e1e12254eaf75a999dd1b58e2145eff158c
Gerrit-Change-Number: 39626
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Wed, 26 Feb 2025 21:14:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: falconia <falcon(a)freecalypso.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email )
Change subject: sctp_server: invalidate handler's Pid on 'EXIT'
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631/comment/6bd3e0db_62b2… :
PS1, Line 11: happens, the current implementation sends an EOF to the eNB and simply
> I meant graceful termination of the SCTP association, which is performed by calling `gen_sctp:eof/2` […]
yes, because it definetly doesn't send an EOF, probably an SCTP SHUTDOWN, I was confused by this.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?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: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4
Gerrit-Change-Number: 39631
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: Wed, 26 Feb 2025 21:13:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>