fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34913?usp=email )
Change subject: mobile: cosmetic: rename TCH_IOFF_RTP to TCH_IOFF_OSMO
......................................................................
mobile: cosmetic: rename TCH_IOFF_RTP to TCH_IOFF_OSMO
This parameter will also determine TCH frame format for data calls,
but saying RTP for data calls is incorrect since the BSS performs
rate adaptation before sending data via RTP. Let's use 'osmo',
which is valid for Osmocom's trxcon and virtphy.
Change-Id: I780d0a9fc20244ffa34307fb3d00f3848b6dcc76
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/gapk_io.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 22 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/13/34913/1
diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h
index aeb4abd..6cec54b 100644
--- a/src/host/layer23/include/osmocom/bb/common/settings.h
+++ b/src/host/layer23/include/osmocom/bb/common/settings.h
@@ -47,7 +47,7 @@
/* TCH I/O frame format */
enum tch_io_frame_format {
/* RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR, packed bits for data */
- TCH_IOFF_RTP,
+ TCH_IOFF_OSMO,
/* Texas Instruments format, used by Calypso based phones (e.g. Motorola C1xx) */
TCH_IOFF_TI,
};
diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c
index 6caaa00..348986b 100644
--- a/src/host/layer23/src/common/settings.c
+++ b/src/host/layer23/src/common/settings.c
@@ -236,7 +236,8 @@
};
const struct value_string tch_io_frame_format_names[] = {
- { TCH_IOFF_RTP, "rtp" },
+ { TCH_IOFF_OSMO, "osmo" },
+ { TCH_IOFF_OSMO, "rtp" }, /* for compatibility */
{ TCH_IOFF_TI, "ti" },
{ 0, NULL }
};
diff --git a/src/host/layer23/src/mobile/gapk_io.c b/src/host/layer23/src/mobile/gapk_io.c
index e86d625..d6c913a 100644
--- a/src/host/layer23/src/mobile/gapk_io.c
+++ b/src/host/layer23/src/mobile/gapk_io.c
@@ -410,7 +410,7 @@
}
switch (set->tch.frame_format) {
- case TCH_IOFF_RTP:
+ case TCH_IOFF_OSMO:
phy_fmt = phy_fmt_pick_rtp(codec);
break;
case TCH_IOFF_TI:
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index 445ad4a..8acc148 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -2563,9 +2563,10 @@
NO_STR "Disable TCH I/O handling for voice calls\n");
DEFUN(cfg_ms_tch_io_tch_format, cfg_ms_tch_io_tch_format_cmd,
- "io-tch-format (rtp|ti)",
+ "io-tch-format (osmo|rtp|ti)",
"Set TCH I/O frame format used by the L1 PHY (for GAPK only)\n"
- "RTP format (RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR)\n"
+ "Osmocom format (RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR)\n"
+ "(same as 'osmo', kept for backwards-compatibility)\n"
"Texas Instruments format, used by Calypso based phones (e.g. Motorola C1xx)\n")
{
int val = get_string_value(tch_io_frame_format_names, argv[0]);
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34913?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I780d0a9fc20244ffa34307fb3d00f3848b6dcc76
Gerrit-Change-Number: 34913
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: ASCI: Use correct mobile identiy in TALKER INDICATION message
......................................................................
ASCI: Use correct mobile identiy in TALKER INDICATION message
Use TMSI only if valid in the current location area. If the MS moves to
a different location area and joins a group call before location update,
TMSI is not valid. Then use IMSI instead. If no IMSI/TSMI is available,
send mobile identity without IMSI/TMSI.
Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Related: OS#5364
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 29 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index 3200412..b898090 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -2085,6 +2085,8 @@
static int gsm48_rr_tx_talker_indication(struct osmocom_ms *ms)
{
struct gsm48_rrlayer *rr = &ms->rrlayer;
+ struct gsm_subscriber *subscr = &ms->subscr;
+ struct gsm322_cellsel *cs = &ms->cellsel;
struct msgb *nmsg;
struct gsm48_hdr *gh;
struct gsm48_talker_indication *ti;
@@ -2103,8 +2105,18 @@
/* classmark 2 */
ti->cm2_len = sizeof(ti->cm2);
gsm48_rr_enc_cm2(ms, &ti->cm2, rr->cd_now.arfcn);
- /* mobile identity (Use TMSI if available.) */
- gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+
+ /* mobile identity */
+ if (ms->subscr.tmsi != GSM_RESERVED_TMSI && (osmo_lai_cmp(&subscr->lai, &cs->sel_cgi.lai) == 0)) {
+ gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+ LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with TMSI.\n");
+ } else if (subscr->imsi[0]) {
+ gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_IMSI, false);
+ LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with IMSI.\n");
+ } else {
+ gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_NONE, false);
+ LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION without TMSI/IMSI.\n");
+ }
/* start establishmnet */
return gsm48_send_rsl(ms, RSL_MT_EST_REQ, nmsg, 0);
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34865?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Gerrit-Change-Number: 34865
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
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