laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bts/+/32091 )
Change subject: common/vty: Print AMR MultiRate Configuration in "show lchan"
......................................................................
common/vty: Print AMR MultiRate Configuration in "show lchan"
It can be useful to introspect the current active AMR mode set.
Related: OS#5944
Change-Id: I630af8c3835c2fcbea325c07db269d25e4e18f62
---
M src/common/vty.c
M src/osmo-bts-virtual/Makefile.am
2 files changed, 28 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/common/vty.c b/src/common/vty.c
index bd18221..93fc0d6 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -43,6 +43,7 @@
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/trau/osmo_ortp.h>
#include <osmocom/core/fsm.h>
+#include <osmocom/codec/codec.h>
#include <osmo-bts/logging.h>
#include <osmo-bts/gsm_data.h>
@@ -1941,6 +1942,19 @@
vty_out(vty, " Channel Mode / Codec: %s%s",
gsm48_chan_mode_name(lchan->tch_mode),
VTY_NEWLINE);
+ if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR) {
+ const struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr;
+ const struct gsm48_multi_rate_conf *mr_conf =
+ (const struct gsm48_multi_rate_conf *) amr_mrc->gsm48_ie;
+ vty_out(vty, " AMR Multi-Rate Configuration: ICMI=%u, Start Mode=%u
gsm48=%02x%02x%s",
+ mr_conf->icmi, mr_conf->smod, amr_mrc->gsm48_ie[0], amr_mrc->gsm48_ie[1],
VTY_NEWLINE);
+ for (uint8_t i = 0; i < amr_mrc->num_modes; i++) {
+ const struct amr_mode *amode = &amr_mrc->mode[i];
+ vty_out(vty, " AMR Mode %u (%s), threshold=%u, hysteresis=%u%s",
+ amode->mode, osmo_amr_type_name(amode->mode),
+ amode->threshold, amode->hysteresis, VTY_NEWLINE);
+ }
+ }
if (lchan->abis_ip.bound_ip) {
ia.s_addr = htonl(lchan->abis_ip.bound_ip);
diff --git a/src/osmo-bts-virtual/Makefile.am b/src/osmo-bts-virtual/Makefile.am
index 2ae53b4..bbb79ec 100644
--- a/src/osmo-bts-virtual/Makefile.am
+++ b/src/osmo-bts-virtual/Makefile.am
@@ -7,6 +7,7 @@
$(LIBOSMOABIS_CFLAGS) \
$(LIBOSMOTRAU_CFLAGS) \
$(LIBOSMONETIF_CFLAGS) \
+ $(LIBOSMOCODEC_CFLAGS) \
$(LIBGPS_CFLAGS) \
$(NULL)
@@ -20,6 +21,7 @@
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOTRAU_LIBS) \
$(LIBOSMONETIF_LIBS) \
+ $(LIBOSMOCODEC_LIBS) \
-ldl \
$(NULL)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/32091
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I630af8c3835c2fcbea325c07db269d25e4e18f62
Gerrit-Change-Number: 32091
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.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-MessageType: merged