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 -----
  • 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

October 2023

  • 1 participants
  • 1843 discussions
[M] Change in osmocom-bb[master]: mobile: rename voice.[ch] to tch.[ch]
by fixeria 30 Oct '23

30 Oct '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34917?usp=email ) Change subject: mobile: rename voice.[ch] to tch.[ch] ...................................................................... mobile: rename voice.[ch] to tch.[ch] Also take a chance to change the 'tch_' prefix for all functions. Change-Id: I05e1ae777add73672db61565c77c68d8ab2b08f0 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/tch.h D src/host/layer23/include/osmocom/bb/mobile/voice.h M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gapk_io.c M src/host/layer23/src/mobile/gsm44068_gcc_bcc.c M src/host/layer23/src/mobile/gsm48_cc.c R src/host/layer23/src/mobile/tch.c 9 files changed, 43 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/34917/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index 534b865..5d2eeaf 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,4 +1,4 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h gsm44068_gcc_bcc.h \ - transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ - app_mobile.h voice.h gapk_io.h + tch.h transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ + app_mobile.h gapk_io.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/tch.h b/src/host/layer23/include/osmocom/bb/mobile/tch.h new file mode 100644 index 0000000..0e81769 --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/tch.h @@ -0,0 +1,9 @@ +#pragma once + +struct osmocom_ms; +struct gsm_data_frame; +struct msgb; + +int tch_init(struct osmocom_ms *ms); +int tch_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg); +int tch_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame); diff --git a/src/host/layer23/include/osmocom/bb/mobile/voice.h b/src/host/layer23/include/osmocom/bb/mobile/voice.h deleted file mode 100644 index 8c4c5b6..0000000 --- a/src/host/layer23/include/osmocom/bb/mobile/voice.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -struct osmocom_ms; -struct gsm_data_frame; -struct msgb; - -int gsm_voice_init(struct osmocom_ms *ms); -int gsm_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg); -int gsm_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame); diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 7b05f65..ed2146f 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -30,9 +30,9 @@ mnccms.c \ mncc_sock.c \ primitives.c \ + tch.c \ transaction.c \ vty_interface.c \ - voice.c \ $(NULL) bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index b08976c..cada8fc 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -41,7 +41,7 @@ #include <osmocom/bb/mobile/vty.h> #include <osmocom/bb/mobile/app_mobile.h> #include <osmocom/bb/mobile/mncc.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <osmocom/bb/mobile/gapk_io.h> #include <osmocom/bb/mobile/primitives.h> @@ -256,7 +256,7 @@ gsm480_ss_init(ms); gsm411_sms_init(ms); gsm44068_gcc_init(ms); - gsm_voice_init(ms); + tch_init(ms); gsm_subscr_init(ms); gsm48_rr_init(ms); gsm48_mm_init(ms); diff --git a/src/host/layer23/src/mobile/gapk_io.c b/src/host/layer23/src/mobile/gapk_io.c index d6c913a..be4d0e0 100644 --- a/src/host/layer23/src/mobile/gapk_io.c +++ b/src/host/layer23/src/mobile/gapk_io.c @@ -36,7 +36,7 @@ #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/logging.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <osmocom/bb/mobile/gapk_io.h> /* The RAW PCM format is common for both audio source and sink */ @@ -585,7 +585,7 @@ &gapk_io->tch_ul_fb_len); /* Push a voice frame to the lower layers */ - gsm_send_voice_msg(ms, tch_msg); + tch_send_voice_msg(ms, tch_msg); work |= 1; } diff --git a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c index 4fe0b82..65e016d 100644 --- a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c +++ b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c @@ -64,7 +64,7 @@ #include <osmocom/bb/mobile/mncc.h> #include <osmocom/bb/mobile/transaction.h> #include <osmocom/bb/mobile/gsm44068_gcc_bcc.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <osmocom/bb/mobile/vty.h> #include <l1ctl_proto.h> diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index 9691c68..4e26713 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -33,7 +33,7 @@ #include <osmocom/bb/mobile/transaction.h> #include <osmocom/bb/mobile/gsm48_cc.h> #include <osmocom/bb/mobile/gsm44068_gcc_bcc.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <l1ctl_proto.h> static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); @@ -1978,7 +1978,7 @@ case GSM_TCHH_FRAME: case GSM_TCH_FRAME_AMR: case GSM_BAD_FRAME: - return gsm_send_voice_frame(ms, arg); + return tch_send_voice_frame(ms, arg); case MNCC_LCHAN_MODIFY: return 0; case MNCC_FRAME_RECV: diff --git a/src/host/layer23/src/mobile/voice.c b/src/host/layer23/src/mobile/tch.c similarity index 85% rename from src/host/layer23/src/mobile/voice.c rename to src/host/layer23/src/mobile/tch.c index b80d6a4..29c8790 100644 --- a/src/host/layer23/src/mobile/voice.c +++ b/src/host/layer23/src/mobile/tch.c @@ -31,10 +31,10 @@ #include <osmocom/bb/mobile/gapk_io.h> #include <osmocom/bb/mobile/mncc.h> #include <osmocom/bb/mobile/mncc_sock.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> /* Forward a Downlink voice frame to the external MNCC handler */ -static int gsm_forward_mncc(struct osmocom_ms *ms, struct msgb *msg) +static int tch_forward_mncc(struct osmocom_ms *ms, struct msgb *msg) { struct gsm_data_frame *mncc; @@ -74,16 +74,16 @@ } /* Receive a Downlink voice frame from the lower layers */ -static int gsm_recv_voice(struct osmocom_ms *ms, struct msgb *msg) +static int tch_recv_voice(struct osmocom_ms *ms, struct msgb *msg) { switch (ms->settings.tch.voice_handler) { case TCH_VOICE_IOH_LOOPBACK: /* Remove the DL info header */ msgb_pull_to_l2(msg); /* Send voice frame back */ - return gsm_send_voice_msg(ms, msg); + return tch_send_voice_msg(ms, msg); case TCH_VOICE_IOH_MNCC_SOCK: - return gsm_forward_mncc(ms, msg); + return tch_forward_mncc(ms, msg); case TCH_VOICE_IOH_GAPK: #ifdef WITH_GAPK_IO /* Enqueue a frame to the DL TCH buffer */ @@ -103,14 +103,14 @@ } /* Send an Uplink voice frame to the lower layers */ -int gsm_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg) +int tch_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg) { /* Forward to RR */ return gsm48_rr_tx_traffic(ms, msg); } -/* gsm_send_voice_msg() wrapper accepting an MNCC structure */ -int gsm_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame) +/* tch_send_voice_msg() wrapper accepting an MNCC structure */ +int tch_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame) { struct msgb *nmsg; int len; @@ -139,13 +139,13 @@ nmsg->l2h = msgb_put(nmsg, len); memcpy(nmsg->l2h, frame->data, len); - return gsm_send_voice_msg(ms, nmsg); + return tch_send_voice_msg(ms, nmsg); } -/* Initialize voice router */ -int gsm_voice_init(struct osmocom_ms *ms) +/* Initialize the TCH router */ +int tch_init(struct osmocom_ms *ms) { - ms->l1_entity.l1_traffic_ind = gsm_recv_voice; + ms->l1_entity.l1_traffic_ind = tch_recv_voice; return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34917?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: I05e1ae777add73672db61565c77c68d8ab2b08f0 Gerrit-Change-Number: 34917 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmocom-bb[master]: mobile: cosmetic: use '#pragma once' in mncc.h
by fixeria 30 Oct '23

30 Oct '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34909?usp=email ) Change subject: mobile: cosmetic: use '#pragma once' in mncc.h ...................................................................... mobile: cosmetic: use '#pragma once' in mncc.h Change-Id: I2f350c5b67e57097b71b12ba42c90ce0941b8fea --- M src/host/layer23/include/osmocom/bb/mobile/mncc.h 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/09/34909/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc.h b/src/host/layer23/include/osmocom/bb/mobile/mncc.h index 1ab83ef..f587e1f 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc.h @@ -19,8 +19,7 @@ * */ -#ifndef _MNCC_H -#define _MNCC_H +#pragma once #include <osmocom/core/linuxlist.h> #include <osmocom/core/timer.h> @@ -174,6 +173,3 @@ const char *get_mncc_name(int value); int mncc_recv(struct osmocom_ms *ms, int msg_type, void *arg); void mncc_set_cause(struct gsm_mncc *data, int loc, int val); - -#endif - -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34909?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: I2f350c5b67e57097b71b12ba42c90ce0941b8fea Gerrit-Change-Number: 34909 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: rework L1CTL TRAFFIC.{ind,req} related logging
by fixeria 30 Oct '23

30 Oct '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34908?usp=email ) Change subject: layer23: rework L1CTL TRAFFIC.{ind,req} related logging ...................................................................... layer23: rework L1CTL TRAFFIC.{ind,req} related logging Make these Rx/Tx messages more informative. Change-Id: I9c73db3c3650547030b8c354016e65195daebb62 Related: OS#4396 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/08/34908/1 diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index c4589f0..349f048 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -844,7 +844,6 @@ { struct l1ctl_info_dl *dl; struct l1ctl_traffic_ind *ti; - size_t frame_len; uint8_t *frame; if (msgb_l1len(msg) < sizeof(*dl)) { @@ -861,11 +860,8 @@ msg->l2h = dl->payload; msg->l3h = frame; - /* Calculate the frame length */ - frame_len = msgb_l3len(msg); - - DEBUGP(DL1C, "TRAFFIC IND len=%zu (%s)\n", frame_len, - osmo_hexdump(frame, frame_len)); + LOGP(DL1C, LOGL_DEBUG, "Rx TRAFFIC.ind (fn=%u, chan_nr=0x%02x, len=%u): %s\n", + ntohl(dl->frame_nr), dl->chan_nr, msgb_l3len(msg), msgb_hexdump_l3(msg)); /* distribute or drop */ if (ms->l1_entity.l1_traffic_ind) @@ -882,7 +878,6 @@ struct l1ctl_hdr *l1h; struct l1ctl_info_ul *l1i_ul; struct l1ctl_traffic_req *tr; - size_t frame_len; uint8_t *frame; /* Header handling */ @@ -890,11 +885,8 @@ frame = (uint8_t *) tr->data; msg->l3h = frame; - /* Calculate the frame length */ - frame_len = msgb_l3len(msg); - - DEBUGP(DL1C, "TRAFFIC REQ len=%zu (%s)\n", frame_len, - osmo_hexdump(frame, frame_len)); + LOGP(DL1C, LOGL_DEBUG, "Tx TRAFFIC.req (chan_nr=0x%02x, len=%u): %s\n", + chan_nr, msgb_l3len(msg), msgb_hexdump_l3(msg)); /* prepend uplink info header */ l1i_ul = (struct l1ctl_info_ul *) msgb_push(msg, sizeof(*l1i_ul)); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34908?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: I9c73db3c3650547030b8c354016e65195daebb62 Gerrit-Change-Number: 34908 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: move 'struct gsm_call' from <mncc.h> to <mncc_ms.h>
by fixeria 30 Oct '23

30 Oct '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34910?usp=email ) Change subject: mobile: move 'struct gsm_call' from <mncc.h> to <mncc_ms.h> ...................................................................... mobile: move 'struct gsm_call' from <mncc.h> to <mncc_ms.h> The only file using this structure is mnccms.c. Change-Id: Iaa43609849ac3c755d47258d3aca4bfe7a6b3a49 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/mobile/mncc.h M src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h 2 files changed, 38 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/10/34910/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc.h b/src/host/layer23/include/osmocom/bb/mobile/mncc.h index f587e1f..d6facbb 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc.h @@ -21,27 +21,8 @@ #pragma once -#include <osmocom/core/linuxlist.h> -#include <osmocom/core/timer.h> #include <osmocom/gsm/mncc.h> -struct gsm_call { - struct llist_head entry; - - struct osmocom_ms *ms; - - uint32_t callref; - - bool init; /* call initiated, no response yet */ - bool hold; /* call on hold */ - bool ring; /* call ringing/knocking */ - - struct osmo_timer_list dtmf_timer; - uint8_t dtmf_state; - uint8_t dtmf_index; - char dtmf[32]; /* dtmf sequence */ -}; - #define DTMF_ST_IDLE 0 /* no DTMF active */ #define DTMF_ST_START 1 /* DTMF started, waiting for resp. */ #define DTMF_ST_MARK 2 /* wait tone duration */ @@ -127,6 +108,8 @@ #define MNCC_F_KEYPAD 0x1000 #define MNCC_F_SIGNAL 0x2000 +struct osmocom_ms; + struct gsm_mncc { /* context based information */ uint32_t msg_type; diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h index 705c681..4006688 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h @@ -1,5 +1,29 @@ #pragma once +#include <stdint.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/timer.h> + +struct osmocom_ms; + +struct gsm_call { + struct llist_head entry; + + struct osmocom_ms *ms; + + uint32_t callref; + + bool init; /* call initiated, no response yet */ + bool hold; /* call on hold */ + bool ring; /* call ringing/knocking */ + + struct osmo_timer_list dtmf_timer; + uint8_t dtmf_state; + uint8_t dtmf_index; + char dtmf[32]; /* dtmf sequence */ +}; + int mncc_call(struct osmocom_ms *ms, const char *number); int mncc_hangup(struct osmocom_ms *ms); int mncc_answer(struct osmocom_ms *ms); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34910?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: Iaa43609849ac3c755d47258d3aca4bfe7a6b3a49 Gerrit-Change-Number: 34910 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: rename 'audio' node to 'tch' node
by fixeria 30 Oct '23

30 Oct '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34911?usp=email ) Change subject: mobile: rename 'audio' node to 'tch' node ...................................................................... mobile: rename 'audio' node to 'tch' node Change-Id: I2cab597c5de92ecb343cad7aaaa48035ca5f8365 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 35 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/11/34911/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h index 511348b..87487e6 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/vty.h +++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h @@ -10,7 +10,7 @@ enum ms_vty_node { SUPPORT_NODE = _LAST_L23VTY_NODE + 1, - AUDIO_NODE, + TCH_NODE, VGCS_NODE, VBS_NODE, }; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index e79a5a1..9a1652b 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -49,9 +49,9 @@ 1 }; -struct cmd_node audio_node = { - AUDIO_NODE, - "%s(audio)# ", +struct cmd_node tch_node = { + TCH_NODE, + "%s(tch)# ", 1 }; @@ -1475,7 +1475,7 @@ vty_out(vty, " %sasci-allow-any%s", (set->asci_allow_any) ? "" : "no ", VTY_NEWLINE); - vty_out(vty, " audio%s", VTY_NEWLINE); + vty_out(vty, " tch%s", VTY_NEWLINE); vty_out(vty, " io-handler %s%s", audio_io_handler_name(set->audio.io_handler), VTY_NEWLINE); if (set->audio.io_handler == AUDIO_IOH_GAPK) { @@ -2477,14 +2477,18 @@ SUP_EN_DI(vgcs, "vgcs", "Voice Group Call Service (VGCS)", 0); SUP_EN_DI(vbs, "vbs", "Voice Broadcast Service (VBS)", 0); -/* per audio config */ -DEFUN(cfg_ms_audio, cfg_ms_audio_cmd, "audio", - "Configure audio settings") +/* TCH config */ +DEFUN(cfg_ms_tch, cfg_ms_tch_cmd, "tch", + "Configure TCH (Traffic CHannel) settings\n") { - vty->node = AUDIO_NODE; + vty->node = TCH_NODE; return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_ms_tch, cfg_ms_audio_cmd, + "audio", "Configure audio settings\n"); + + static int set_audio_io_handler(struct vty *vty, enum audio_io_handler val) { struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; @@ -2501,7 +2505,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_audio_io_handler, cfg_ms_audio_io_handler_cmd, +DEFUN(cfg_ms_tch_io_handler, cfg_ms_tch_io_handler_cmd, "io-handler (none|gapk|l1phy|mncc-sock|loopback)", "Set TCH frame I/O handler\n" "No handler, drop TCH frames (default)\n" @@ -2531,13 +2535,13 @@ return set_audio_io_handler(vty, val); } -DEFUN(cfg_ms_audio_no_io_handler, cfg_ms_audio_no_io_handler_cmd, +DEFUN(cfg_ms_tch_no_io_handler, cfg_ms_tch_no_io_handler_cmd, "no io-handler", NO_STR "Disable TCH frame processing") { return set_audio_io_handler(vty, AUDIO_IOH_NONE); } -DEFUN(cfg_ms_audio_io_tch_format, cfg_ms_audio_io_tch_format_cmd, +DEFUN(cfg_ms_tch_io_tch_format, cfg_ms_tch_io_tch_format_cmd, "io-tch-format (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" @@ -2558,7 +2562,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_audio_alsa_out_dev, cfg_ms_audio_alsa_out_dev_cmd, +DEFUN(cfg_ms_tch_alsa_out_dev, cfg_ms_tch_alsa_out_dev_cmd, "alsa-output-dev (default|NAME)", "Set ALSA output (playback) device name (for GAPK only)\n" "Default system playback device (default)\n" @@ -2572,7 +2576,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_audio_alsa_in_dev, cfg_ms_audio_alsa_in_dev_cmd, +DEFUN(cfg_ms_tch_alsa_in_dev, cfg_ms_tch_alsa_in_dev_cmd, "alsa-input-dev (default|NAME)", "Set ALSA input (capture) device name (for GAPK only)\n" "Default system recording device (default)\n" @@ -2757,6 +2761,7 @@ install_element(MS_NODE, &cfg_ms_no_codec_half_cmd); install_element(MS_NODE, &cfg_ms_abbrev_cmd); install_element(MS_NODE, &cfg_ms_no_abbrev_cmd); + install_element(MS_NODE, &cfg_ms_tch_cmd); install_element(MS_NODE, &cfg_ms_audio_cmd); install_element(MS_NODE, &cfg_ms_neighbour_cmd); install_element(MS_NODE, &cfg_ms_no_neighbour_cmd); @@ -2842,12 +2847,12 @@ install_element(MS_NODE, &cfg_ms_script_load_run_cmd); install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); - install_node(&audio_node, config_write_dummy); - install_element(AUDIO_NODE, &cfg_ms_audio_io_handler_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_no_io_handler_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_io_tch_format_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_alsa_out_dev_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_alsa_in_dev_cmd); + install_node(&tch_node, config_write_dummy); + install_element(TCH_NODE, &cfg_ms_tch_io_handler_cmd); + install_element(TCH_NODE, &cfg_ms_tch_no_io_handler_cmd); + install_element(TCH_NODE, &cfg_ms_tch_io_tch_format_cmd); + install_element(TCH_NODE, &cfg_ms_tch_alsa_out_dev_cmd); + install_element(TCH_NODE, &cfg_ms_tch_alsa_in_dev_cmd); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34911?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: I2cab597c5de92ecb343cad7aaaa48035ca5f8365 Gerrit-Change-Number: 34911 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmocom-bb[master]: mobile: cosmetic: rename TCH_IOFF_RTP to TCH_IOFF_OSMO
by fixeria 30 Oct '23

30 Oct '23
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
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: clarify TCH I/O {handler,format} naming
by fixeria 30 Oct '23

30 Oct '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34912?usp=email ) Change subject: mobile: clarify TCH I/O {handler,format} naming ...................................................................... mobile: clarify TCH I/O {handler,format} naming Before we add handling of TCH I/O for data calls, let's rename the existing voice related symbols, fields, and the VTY commands to have 'voice' in their names. Add backward compatibility aliases. Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0 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/gsm48_rr.c M src/host/layer23/src/mobile/voice.c M src/host/layer23/src/mobile/vty_interface.c 6 files changed, 128 insertions(+), 91 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/12/34912/1 diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index e56e201..aeb4abd 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -26,39 +26,39 @@ MNCC_HANDLER_DUMMY, }; -/* TCH frame I/O handler */ -enum audio_io_handler { +/* TCH I/O handler for voice calls */ +enum tch_voice_io_handler { /* No handler, drop frames */ - AUDIO_IOH_NONE = 0, + TCH_VOICE_IOH_NONE = 0, /* libosmo-gapk based handler */ - AUDIO_IOH_GAPK, + TCH_VOICE_IOH_GAPK, /* L1 PHY (e.g. Calypso DSP) */ - AUDIO_IOH_L1PHY, + TCH_VOICE_IOH_L1PHY, /* External MNCC app (via MNCC socket) */ - AUDIO_IOH_MNCC_SOCK, + TCH_VOICE_IOH_MNCC_SOCK, /* Return to sender */ - AUDIO_IOH_LOOPBACK, + TCH_VOICE_IOH_LOOPBACK, }; -extern const struct value_string audio_io_handler_names[]; -static inline const char *audio_io_handler_name(enum audio_io_handler val) -{ return get_value_string(audio_io_handler_names, val); } +extern const struct value_string tch_voice_io_handler_names[]; +static inline const char *tch_voice_io_handler_name(enum tch_voice_io_handler val) +{ return get_value_string(tch_voice_io_handler_names, val); } -/* TCH frame I/O format */ -enum audio_io_format { - /* RTP format (RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR) */ - AUDIO_IOF_RTP, +/* 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, /* Texas Instruments format, used by Calypso based phones (e.g. Motorola C1xx) */ - AUDIO_IOF_TI, + TCH_IOFF_TI, }; -extern const struct value_string audio_io_format_names[]; -static inline const char *audio_io_format_name(enum audio_io_format val) -{ return get_value_string(audio_io_format_names, val); } +extern const struct value_string tch_io_frame_format_names[]; +static inline const char *tch_io_frame_format_name(enum tch_io_frame_format val) +{ return get_value_string(tch_io_frame_format_names, val); } -struct audio_settings { - enum audio_io_handler io_handler; - enum audio_io_format io_format; +struct tch_settings { + enum tch_voice_io_handler voice_handler; + enum tch_io_frame_format frame_format; char alsa_output_dev[128]; char alsa_input_dev[128]; }; @@ -119,8 +119,8 @@ /* MNCC handler */ enum mncc_handler_t mncc_handler; - /* Audio settings */ - struct audio_settings audio; + /* TCH settings */ + struct tch_settings tch; /* IMEI */ char imei[GSM23003_IMEI_NUM_DIGITS + 1]; diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index 5bae325..6caaa00 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -48,10 +48,10 @@ snprintf(set->mncc_socket_path, sizeof(set->mncc_socket_path) - 1, "%s_%s", mncc_socket_path, ms->name); - /* Audio settings: drop TCH frames by default */ - set->audio.io_handler = AUDIO_IOH_NONE; - OSMO_STRLCPY_ARRAY(set->audio.alsa_output_dev, alsa_dev_default); - OSMO_STRLCPY_ARRAY(set->audio.alsa_input_dev, alsa_dev_default); + /* TCH voice: drop frames by default */ + set->tch.voice_handler = TCH_VOICE_IOH_NONE; + OSMO_STRLCPY_ARRAY(set->tch.alsa_output_dev, alsa_dev_default); + OSMO_STRLCPY_ARRAY(set->tch.alsa_input_dev, alsa_dev_default); /* Built-in MNCC handler */ set->mncc_handler = MNCC_HANDLER_INTERNAL; @@ -226,18 +226,18 @@ return 0; } -const struct value_string audio_io_handler_names[] = { - { AUDIO_IOH_NONE, "none" }, - { AUDIO_IOH_GAPK, "gapk" }, - { AUDIO_IOH_L1PHY, "l1phy" }, - { AUDIO_IOH_MNCC_SOCK, "mncc-sock" }, - { AUDIO_IOH_LOOPBACK, "loopback" }, +const struct value_string tch_voice_io_handler_names[] = { + { TCH_VOICE_IOH_NONE, "none" }, + { TCH_VOICE_IOH_GAPK, "gapk" }, + { TCH_VOICE_IOH_L1PHY, "l1phy" }, + { TCH_VOICE_IOH_MNCC_SOCK, "mncc-sock" }, + { TCH_VOICE_IOH_LOOPBACK, "loopback" }, { 0, NULL } }; -const struct value_string audio_io_format_names[] = { - { AUDIO_IOF_RTP, "rtp" }, - { AUDIO_IOF_TI, "ti" }, +const struct value_string tch_io_frame_format_names[] = { + { TCH_IOFF_RTP, "rtp" }, + { 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 a2a4e84..e86d625 100644 --- a/src/host/layer23/src/mobile/gapk_io.c +++ b/src/host/layer23/src/mobile/gapk_io.c @@ -409,16 +409,16 @@ return -ENOTSUP; } - switch (set->audio.io_format) { - case AUDIO_IOF_RTP: + switch (set->tch.frame_format) { + case TCH_IOFF_RTP: phy_fmt = phy_fmt_pick_rtp(codec); break; - case AUDIO_IOF_TI: + case TCH_IOFF_TI: phy_fmt = phy_fmt_pick_ti(codec); break; default: LOGP(DGAPK, LOGL_ERROR, "Unhandled I/O format %s\n", - audio_io_format_name(set->audio.io_format)); + tch_io_frame_format_name(set->tch.frame_format)); return -ENOTSUP; } @@ -447,8 +447,8 @@ osmo_gapk_set_talloc_ctx(gapk_io); /* Prepare both source and sink chains */ - rc |= prepare_audio_source(gapk_io, set->audio.alsa_input_dev); - rc |= prepare_audio_sink(gapk_io, set->audio.alsa_output_dev); + rc |= prepare_audio_source(gapk_io, set->tch.alsa_input_dev); + rc |= prepare_audio_sink(gapk_io, set->tch.alsa_output_dev); /* Fall back to ms instance */ osmo_gapk_set_talloc_ctx(ms); diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 68670b7..b4eac3c 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -4434,7 +4434,7 @@ #ifdef WITH_GAPK_IO /* Poke GAPK audio back-end, if it is chosen */ - if (ms->settings.audio.io_handler == AUDIO_IOH_GAPK) { + if (ms->settings.tch.voice_handler == TCH_VOICE_IOH_GAPK) { int rc = gapk_io_init_ms_chan(ms, ch_type, mode); if (rc) return rc; @@ -4989,7 +4989,7 @@ #ifdef WITH_GAPK_IO /* Poke GAPK audio back-end, if it is chosen */ - if (ms->settings.audio.io_handler == AUDIO_IOH_GAPK) + if (ms->settings.tch.voice_handler == TCH_VOICE_IOH_GAPK) gapk_io_init_ms_chan(ms, ch_type, cda->mode); #endif @@ -7028,16 +7028,16 @@ rr->tch_loop_mode = L1CTL_TCH_LOOP_OPEN; /* Configure audio handling in the L1PHY */ - switch (ms->settings.audio.io_handler) { - case AUDIO_IOH_L1PHY: + switch (ms->settings.tch.voice_handler) { + case TCH_VOICE_IOH_L1PHY: rr->audio_mode = AUDIO_RX_SPEAKER | AUDIO_TX_MICROPHONE; break; - case AUDIO_IOH_MNCC_SOCK: - case AUDIO_IOH_LOOPBACK: - case AUDIO_IOH_GAPK: + case TCH_VOICE_IOH_MNCC_SOCK: + case TCH_VOICE_IOH_LOOPBACK: + case TCH_VOICE_IOH_GAPK: rr->audio_mode = AUDIO_RX_TRAFFIC_IND | AUDIO_TX_TRAFFIC_REQ; break; - case AUDIO_IOH_NONE: + case TCH_VOICE_IOH_NONE: rr->audio_mode = 0x00; } @@ -7156,7 +7156,7 @@ struct gsm48_rrlayer *rr = &ms->rrlayer; uint8_t ch_type, ch_subch, ch_ts; - if (ms->settings.audio.io_handler != AUDIO_IOH_NONE) + if (ms->settings.tch.voice_handler != TCH_VOICE_IOH_NONE) return 0; LOGP(DRR, LOGL_INFO, "setting audio mode to %d\n", mode); diff --git a/src/host/layer23/src/mobile/voice.c b/src/host/layer23/src/mobile/voice.c index acc0dce..b838576 100644 --- a/src/host/layer23/src/mobile/voice.c +++ b/src/host/layer23/src/mobile/voice.c @@ -76,15 +76,15 @@ /* Receive a Downlink voice frame from the lower layers */ static int gsm_recv_voice(struct osmocom_ms *ms, struct msgb *msg) { - switch (ms->settings.audio.io_handler) { - case AUDIO_IOH_LOOPBACK: + switch (ms->settings.tch.voice_handler) { + case TCH_VOICE_IOH_LOOPBACK: /* Remove the DL info header */ msgb_pull_to_l2(msg); /* Send voice frame back */ return gsm_send_voice_msg(ms, msg); - case AUDIO_IOH_MNCC_SOCK: + case TCH_VOICE_IOH_MNCC_SOCK: return gsm_forward_mncc(ms, msg); - case AUDIO_IOH_GAPK: + case TCH_VOICE_IOH_GAPK: #ifdef WITH_GAPK_IO /* Enqueue a frame to the DL TCH buffer */ if (ms->gapk_io != NULL) @@ -93,8 +93,8 @@ msgb_free(msg); break; #endif - case AUDIO_IOH_L1PHY: - case AUDIO_IOH_NONE: + case TCH_VOICE_IOH_L1PHY: + case TCH_VOICE_IOH_NONE: /* Drop voice frame */ msgb_free(msg); } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 9a1652b..445ad4a 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1476,15 +1476,15 @@ (set->asci_allow_any) ? "" : "no ", VTY_NEWLINE); vty_out(vty, " tch%s", VTY_NEWLINE); - vty_out(vty, " io-handler %s%s", - audio_io_handler_name(set->audio.io_handler), VTY_NEWLINE); - if (set->audio.io_handler == AUDIO_IOH_GAPK) { + vty_out(vty, " voice-io-handler %s%s", + tch_voice_io_handler_name(set->tch.voice_handler), VTY_NEWLINE); + if (set->tch.voice_handler == TCH_VOICE_IOH_GAPK) { vty_out(vty, " io-tch-format %s%s", - audio_io_format_name(set->audio.io_format), VTY_NEWLINE); + tch_io_frame_format_name(set->tch.frame_format), VTY_NEWLINE); vty_out(vty, " alsa-output-dev %s%s", - set->audio.alsa_output_dev, VTY_NEWLINE); + set->tch.alsa_output_dev, VTY_NEWLINE); vty_out(vty, " alsa-input-dev %s%s", - set->audio.alsa_input_dev, VTY_NEWLINE); + set->tch.alsa_input_dev, VTY_NEWLINE); } if (ms->lua_script) @@ -2478,26 +2478,29 @@ SUP_EN_DI(vbs, "vbs", "Voice Broadcast Service (VBS)", 0); /* TCH config */ -DEFUN(cfg_ms_tch, cfg_ms_tch_cmd, "tch", +DEFUN(cfg_ms_tch, + cfg_ms_tch_cmd, + "tch", "Configure TCH (Traffic CHannel) settings\n") { vty->node = TCH_NODE; return CMD_SUCCESS; } -ALIAS_DEPRECATED(cfg_ms_tch, cfg_ms_audio_cmd, - "audio", "Configure audio settings\n"); +ALIAS_DEPRECATED(cfg_ms_tch, + cfg_ms_audio_cmd, + "audio", + "Configure audio settings\n"); - -static int set_audio_io_handler(struct vty *vty, enum audio_io_handler val) +static int set_voice_io_handler(struct vty *vty, enum tch_voice_io_handler val) { struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; struct gsm_settings *set = &ms->settings; /* Don't restart on unchanged value */ - if (val == set->audio.io_handler) + if (val == set->tch.voice_handler) return CMD_SUCCESS; - set->audio.io_handler = val; + set->tch.voice_handler = val; /* Restart required */ vty_restart_if_started(vty, ms); @@ -2505,59 +2508,77 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_tch_io_handler, cfg_ms_tch_io_handler_cmd, - "io-handler (none|gapk|l1phy|mncc-sock|loopback)", - "Set TCH frame I/O handler\n" - "No handler, drop TCH frames (default)\n" - "libosmo-gapk based I/O handler (requires ALSA)\n" - "L1 PHY (e.g. Calypso DSP in Motorola C1xx phones)\n" - "External MNCC application (e.g. LCR) via MNCC socket\n" - "Return TCH frame payload back to sender\n") +#define TCH_VOICE_IOH_SEL \ + "(none|gapk|l1phy|mncc-sock|loopback)" +#define TCH_VOICE_IOH_SEL_DESC \ + "No handler, drop TCH frames (default)\n" \ + "libosmo-gapk based I/O handler (requires ALSA)\n" \ + "L1 PHY (e.g. Calypso DSP in Motorola C1xx phones)\n" \ + "External MNCC application (e.g. LCR) via MNCC socket\n" \ + "Return TCH frame payload back to sender\n" + +DEFUN(cfg_ms_tch_voice_io_handler, + cfg_ms_tch_voice_io_handler_cmd, + "voice-io-handler " TCH_VOICE_IOH_SEL, + "Set TCH I/O handler for voice calls\n" + TCH_VOICE_IOH_SEL_DESC) { struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; - int val = get_string_value(audio_io_handler_names, argv[0]); + int val = get_string_value(tch_voice_io_handler_names, argv[0]); - if (val == AUDIO_IOH_MNCC_SOCK) { + if (val == TCH_VOICE_IOH_MNCC_SOCK) { if (ms->settings.mncc_handler != MNCC_HANDLER_INTERNAL) { - vty_out(vty, "Audio I/O handler 'mncc-sock' can only be used " + vty_out(vty, "TCH I/O handler 'mncc-sock' can only be used " "with MNCC handler 'external'%s", VTY_NEWLINE); return CMD_WARNING; } } #ifndef WITH_GAPK_IO - if (val == AUDIO_IOH_GAPK) { + if (val == TCH_VOICE_IOH_GAPK) { vty_out(vty, "GAPK I/O is not compiled in (--with-gapk-io)%s", VTY_NEWLINE); return CMD_WARNING; } #endif - return set_audio_io_handler(vty, val); + return set_voice_io_handler(vty, val); } -DEFUN(cfg_ms_tch_no_io_handler, cfg_ms_tch_no_io_handler_cmd, - "no io-handler", NO_STR "Disable TCH frame processing") +ALIAS_DEPRECATED(cfg_ms_tch_voice_io_handler, + cfg_ms_tch_io_handler_cmd, + "io-handler " TCH_VOICE_IOH_SEL, + "Set TCH I/O handler for voice calls\n" TCH_VOICE_IOH_SEL_DESC); + +DEFUN(cfg_ms_tch_no_voice_io_handler, + cfg_ms_tch_no_voice_io_handler_cmd, + "no voice-io-handler", + NO_STR "Disable TCH I/O handling for voice calls\n") { - return set_audio_io_handler(vty, AUDIO_IOH_NONE); + return set_voice_io_handler(vty, TCH_VOICE_IOH_NONE); } +ALIAS_DEPRECATED(cfg_ms_tch_no_voice_io_handler, + cfg_ms_tch_no_io_handler_cmd, + "no io-handler", + 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)", "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" "Texas Instruments format, used by Calypso based phones (e.g. Motorola C1xx)\n") { - int val = get_string_value(audio_io_format_names, argv[0]); + int val = get_string_value(tch_io_frame_format_names, argv[0]); struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; struct gsm_settings *set = &ms->settings; - if (set->audio.io_handler != AUDIO_IOH_GAPK) { + if (set->tch.voice_handler != TCH_VOICE_IOH_GAPK) { vty_out(vty, "This parameter is only valid for GAPK%s", VTY_NEWLINE); return CMD_WARNING; } OSMO_ASSERT(val >= 0); - set->audio.io_format = val; + set->tch.frame_format = val; return CMD_SUCCESS; } @@ -2571,7 +2592,7 @@ struct osmocom_ms *ms = vty->index; struct gsm_settings *set = &ms->settings; - OSMO_STRLCPY_ARRAY(set->audio.alsa_output_dev, argv[0]); + OSMO_STRLCPY_ARRAY(set->tch.alsa_output_dev, argv[0]); return CMD_SUCCESS; } @@ -2585,7 +2606,7 @@ struct osmocom_ms *ms = vty->index; struct gsm_settings *set = &ms->settings; - OSMO_STRLCPY_ARRAY(set->audio.alsa_input_dev, argv[0]); + OSMO_STRLCPY_ARRAY(set->tch.alsa_input_dev, argv[0]); return CMD_SUCCESS; } @@ -2848,6 +2869,8 @@ install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); install_node(&tch_node, config_write_dummy); + install_element(TCH_NODE, &cfg_ms_tch_voice_io_handler_cmd); + install_element(TCH_NODE, &cfg_ms_tch_no_voice_io_handler_cmd); install_element(TCH_NODE, &cfg_ms_tch_io_handler_cmd); install_element(TCH_NODE, &cfg_ms_tch_no_io_handler_cmd); install_element(TCH_NODE, &cfg_ms_tch_io_tch_format_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34912?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: If6c799d11e225ad00ca5da5ae63dca20568a0ce0 Gerrit-Change-Number: 34912 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmocom-bb[master]: ASCI: Use correct mobile identiy in TALKER INDICATION message
by laforge 28 Oct '23

28 Oct '23
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
1 0
0 0
[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly
by laforge 28 Oct '23

28 Oct '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34864?usp=email ) Change subject: ASCI: Handle rejection of voice group/broadcast call correctly ...................................................................... ASCI: Handle rejection of voice group/broadcast call correctly If joining a call gets rejected, the call must not be released, instead it must return to U3 state (incoming call), because the call still exists in the cell and it might possible to join it later. If a call notification is gone, a new event is used in the state machine to release incoming call. Change-Id: I605387c6be409ef0e67caf7b9e2a83e1032b45f1 Related: OS#5364 --- M src/host/layer23/src/mobile/gsm44068_gcc_bcc.c 1 file changed, 43 insertions(+), 12 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c index 0cef1c3..4fe0b82 100644 --- a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c +++ b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c @@ -138,10 +138,11 @@ VGCS_GCC_EV_DI_CONNECT, /* network indicates connect */ VGCS_GCC_EV_TIMEOUT, /* several timeout events */ VGCS_GCC_EV_SETUP_IND, /* notification of ongoing call received */ + VGCS_GCC_EV_REL_IND, /* notification of call being gone */ VGCS_GCC_EV_JOIN_GC_REQ, /* user wants to join ongoing call */ VGCS_GCC_EV_JOIN_GC_CNF, /* MM confirms joining ongoing call */ VGCS_GCC_EV_ABORT_REQ, /* user rejects or leaves call */ - VGCS_GCC_EV_ABORT_IND, /* MM indicates call gone / channel released or failed */ + VGCS_GCC_EV_ABORT_IND, /* MM indicates channel released or failed */ VGCS_GCC_EV_TALK_REQ, /* user wants to talk */ VGCS_GCC_EV_TALK_CNF, /* MM confirms talk */ VGCS_GCC_EV_TALK_REJ, /* MM rejects talk */ @@ -162,6 +163,7 @@ OSMO_VALUE_STRING(VGCS_GCC_EV_DI_CONNECT), OSMO_VALUE_STRING(VGCS_GCC_EV_TIMEOUT), OSMO_VALUE_STRING(VGCS_GCC_EV_SETUP_IND), + OSMO_VALUE_STRING(VGCS_GCC_EV_REL_IND), OSMO_VALUE_STRING(VGCS_GCC_EV_JOIN_GC_REQ), OSMO_VALUE_STRING(VGCS_GCC_EV_JOIN_GC_CNF), OSMO_VALUE_STRING(VGCS_GCC_EV_ABORT_REQ), @@ -1104,7 +1106,7 @@ /* Change to GROUP CALL PRESENT state. */ osmo_fsm_inst_state_chg(fi, VGCS_GCC_ST_U3_GROUP_CALL_PRESENT, 0, 0); break; - case VGCS_GCC_EV_ABORT_IND: + case VGCS_GCC_EV_REL_IND: /* The MM layer indicates that group channel is gone. */ LOG_GCC(trans, LOGL_INFO, "Group call notification is gone.\n"); /* Change to NULL state. */ @@ -1165,12 +1167,12 @@ /* Free transaction. */ trans_free(trans); break; - case VGCS_GCC_EV_ABORT_IND: + case VGCS_GCC_EV_REL_IND: /* The notified call is gone. */ LOG_GCC(trans, LOGL_INFO, "Received call from network is gone.\n"); /* Change to NULL state. */ osmo_fsm_inst_state_chg(fi, VGCS_GCC_ST_U0_NULL, 0, 0); - /* Notify termination at VTY. (No cause, because notification is gone.) */ + /* Notify termination at VTY. */ vgcs_vty_notify(trans, "Released\n"); /* Free transaction. */ trans_free(trans); @@ -1193,6 +1195,7 @@ static void vgcs_gcc_fsm_u4_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_trans *trans = fi->priv; + uint8_t *cause = data; switch (event) { case VGCS_GCC_EV_JOIN_GC_CNF: @@ -1209,16 +1212,24 @@ /* Free transaction. */ trans_free(trans); break; - case VGCS_GCC_EV_ABORT_IND: + case VGCS_GCC_EV_REL_IND: /* The notified call is gone. */ LOG_GCC(trans, LOGL_INFO, "Received call from network is gone.\n"); /* Change to NULL state. */ osmo_fsm_inst_state_chg(fi, VGCS_GCC_ST_U0_NULL, 0, 0); - /* Notify termination at VTY. (No cause, because notification is gone.) */ + /* Notify termination at VTY. */ vgcs_vty_notify(trans, "Released\n"); /* Free transaction. */ trans_free(trans); break; + case VGCS_GCC_EV_ABORT_IND: + /* The notified call is gone. */ + LOG_GCC(trans, LOGL_INFO, "Call rejected.\n"); + /* Change back to U3 state, so that call may be joined later. */ + osmo_fsm_inst_state_chg(fi, VGCS_GCC_ST_U3_GROUP_CALL_PRESENT, 0, 0); + /* Notify termination at VTY. */ + vgcs_vty_notify(trans, "Released (cause %d)\n", *cause); + break; case VGCS_GCC_EV_TIMEOUT: /* Group channel timed out. */ LOG_GCC(trans, LOGL_INFO, "Timeout waiting for group channel.\n"); @@ -1417,7 +1428,7 @@ .in_event_mask = S(VGCS_GCC_EV_SETUP_IND) | S(VGCS_GCC_EV_TERM_REQ) | S(VGCS_GCC_EV_ABORT_REQ) | - S(VGCS_GCC_EV_ABORT_IND) | + S(VGCS_GCC_EV_REL_IND) | S(VGCS_GCC_EV_TIMEOUT), .out_state_mask = S(VGCS_GCC_ST_U2r_U6_GROUP_CALL_ACTIVE) | S(VGCS_GCC_ST_U4_GROUP_CALL_CONN_REQUEST) | @@ -1430,7 +1441,7 @@ .name = "GROUP CALL PRESENT (U3)", .in_event_mask = S(VGCS_GCC_EV_JOIN_GC_REQ) | S(VGCS_GCC_EV_ABORT_REQ) | - S(VGCS_GCC_EV_ABORT_IND), + S(VGCS_GCC_EV_REL_IND), .out_state_mask = S(VGCS_GCC_ST_U0_NULL) | S(VGCS_GCC_ST_U4_GROUP_CALL_CONN_REQUEST) | S(VGCS_GCC_ST_U2nc_GROUP_CALL_ACTIVE), @@ -1441,9 +1452,11 @@ .name = "GROUP CALL CONNECTION REQUEST (U4)", .in_event_mask = S(VGCS_GCC_EV_JOIN_GC_CNF) | S(VGCS_GCC_EV_ABORT_REQ) | + S(VGCS_GCC_EV_REL_IND) | S(VGCS_GCC_EV_ABORT_IND) | S(VGCS_GCC_EV_TIMEOUT), .out_state_mask = S(VGCS_GCC_ST_U2r_U6_GROUP_CALL_ACTIVE) | + S(VGCS_GCC_ST_U3_GROUP_CALL_PRESENT) | S(VGCS_GCC_ST_U0_NULL), .onenter = vgcs_gcc_fsm_u4_onenter, .action = vgcs_gcc_fsm_u4_action, @@ -1610,7 +1623,6 @@ uint8_t pdisc; struct gsm_trans *trans; int rc = 0; - uint8_t cause; /* Check for message class and get protocol type. */ switch ((msg_type & GSM48_MMXX_MASK)) { @@ -1684,6 +1696,9 @@ case GSM48_MMBCC_ERR_IND: case GSM48_MMGCC_REL_IND: case GSM48_MMBCC_REL_IND: + /* Ignore release confirm or release collision. */ + if (trans->gcc.fi->state == VGCS_GCC_ST_U3_GROUP_CALL_PRESENT) + break; /* If MM fails or is rejected during U0.p state, this is a MM-EST-REJ. */ if (trans->gcc.fi->state == VGCS_GCC_ST_U0p_MM_CONNECTION_PENDING) osmo_fsm_inst_dispatch(trans->gcc.fi, VGCS_GCC_EV_MM_EST_REJ, &mmh->cause); @@ -1713,9 +1728,8 @@ if (trans->gcc.fi->state == VGCS_GCC_ST_U3_GROUP_CALL_PRESENT || trans->gcc.fi->state == VGCS_GCC_ST_U4_GROUP_CALL_CONN_REQUEST || trans->gcc.fi->state == VGCS_GCC_ST_U2nc_GROUP_CALL_ACTIVE) { - /* If notification is gone, abort pending received call. */ - cause = GSM48_CC_CAUSE_NORM_CALL_CLEAR; - osmo_fsm_inst_dispatch(trans->gcc.fi, VGCS_GCC_EV_ABORT_IND, &cause); + /* If notification is gone, release pending received call. */ + osmo_fsm_inst_dispatch(trans->gcc.fi, VGCS_GCC_EV_REL_IND, NULL); } break; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34864?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: I605387c6be409ef0e67caf7b9e2a83e1032b45f1 Gerrit-Change-Number: 34864 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
1 0
0 0
[M] Change in osmocom-bb[master]: ASCI: Add option to join voice group/broadcast calls without valid SIM
by laforge 28 Oct '23

28 Oct '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34866?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: Add option to join voice group/broadcast calls without valid SIM ...................................................................... ASCI: Add option to join voice group/broadcast calls without valid SIM This option must be enabled in the VTY and is disabled by default. Calls can be joined when service is limited or normal. With that option enabled, calls can be joined even with invalid SIM. Talking is allowed when service is normal. With that option enabled, talking is always allowed. It depends on the network, if it accepts the talker. Change-Id: I6ea851a8cb015ff685b985335968c6184beca816 Related: OS#5364 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 75 insertions(+), 6 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index 884578b..3b9473f 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -191,6 +191,7 @@ /* ASCI settings */ bool uplink_release_local; + bool asci_allow_any; }; struct gsm_settings_abbrev { diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 5e02659..378cd2d 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -61,7 +61,9 @@ static int gsm48_mm_loc_upd_normal(struct osmocom_ms *ms, struct msgb *msg); static int gsm48_mm_loc_upd_periodic(struct osmocom_ms *ms, struct msgb *msg); static int gsm48_mm_loc_upd(struct osmocom_ms *ms, struct msgb *msg); +static int gsm48_mm_group_reject(struct osmocom_ms *ms, struct msgb *msg); static int gsm48_mm_group_rel_req(struct osmocom_ms *ms, struct msgb *msg); +static int gsm48_mm_uplink_reject(struct osmocom_ms *ms, struct msgb *msg); /* * notes @@ -3805,9 +3807,13 @@ static int gsm48_mm_group_req(struct osmocom_ms *ms, struct msgb *msg) { struct gsm48_mmlayer *mm = &ms->mmlayer; + struct gsm_settings *set = &ms->settings; struct gsm48_mmxx_hdr *mmh = (struct gsm48_mmxx_hdr *)msg->data; struct msgb *nmsg; + if (mm->substate == GSM48_MM_SST_NO_IMSI && !set->asci_allow_any) + return gsm48_mm_group_reject(ms, msg); + LOGP(DMM, LOGL_INFO, "Request for joining a group call, trying to establish group receive mode.\n"); /* Store infos about group/broadcast call. */ @@ -3881,6 +3887,7 @@ static int gsm48_mm_group_rel_ind(struct osmocom_ms *ms, struct msgb *msg) { struct gsm48_mmlayer *mm = &ms->mmlayer; + struct gsm_subscriber *subscr = &ms->subscr; struct gsm48_rr_hdr *rrh = (struct gsm48_rr_hdr *)msg->data; uint16_t msg_type; struct msgb *nmsg; @@ -3892,8 +3899,10 @@ mm->vgcs.enabled = false; /* Change mode back to normal or limited service. */ - if (mm->substate == GSM48_MM_SST_RX_VGCS_LIMITED) - new_mm_state(mm, GSM48_MM_ST_MM_IDLE, GSM48_MM_SST_LIMITED_SERVICE); + if (mm->substate == GSM48_MM_SST_RX_VGCS_LIMITED) { + new_mm_state(mm, GSM48_MM_ST_MM_IDLE, (subscr->sim_valid) ? GSM48_MM_SST_LIMITED_SERVICE + : GSM48_MM_SST_NO_IMSI); + } if (mm->substate == GSM48_MM_SST_RX_VGCS_NORMAL) new_mm_state(mm, GSM48_MM_ST_MM_IDLE, GSM48_MM_SST_NORMAL_SERVICE); @@ -3932,6 +3941,7 @@ static int gsm48_mm_group_rel_req(struct osmocom_ms *ms, struct msgb *msg) { struct gsm48_mmlayer *mm = &ms->mmlayer; + struct gsm_subscriber *subscr = &ms->subscr; struct msgb *nmsg; LOGP(DMM, LOGL_INFO, "Request to release group call in receive or transmit mode.\n"); @@ -3940,8 +3950,10 @@ mm->vgcs.enabled = false; /* Change mode back to normal or limited service. */ - if (mm->substate == GSM48_MM_SST_RX_VGCS_LIMITED) - new_mm_state(mm, GSM48_MM_ST_MM_IDLE, GSM48_MM_SST_LIMITED_SERVICE); + if (mm->substate == GSM48_MM_SST_RX_VGCS_LIMITED) { + new_mm_state(mm, GSM48_MM_ST_MM_IDLE, (subscr->sim_valid) ? GSM48_MM_SST_LIMITED_SERVICE + : GSM48_MM_SST_NO_IMSI); + } if (mm->substate == GSM48_MM_SST_RX_VGCS_NORMAL) new_mm_state(mm, GSM48_MM_ST_MM_IDLE, GSM48_MM_SST_NORMAL_SERVICE); @@ -3960,8 +3972,12 @@ static int gsm48_mm_uplink_req(struct osmocom_ms *ms, struct msgb *msg) { struct gsm48_mmlayer *mm = &ms->mmlayer; + struct gsm_settings *set = &ms->settings; struct msgb *nmsg; + if (mm->substate != GSM48_MM_SST_RX_VGCS_NORMAL && !set->asci_allow_any) + return gsm48_mm_uplink_reject(ms, msg); + LOGP(DMM, LOGL_INFO, "Request for uplink, trying to establish group transmit mode.\n"); /* Go into uplink pending state. */ @@ -4201,6 +4217,12 @@ {SBIT(GSM48_MM_ST_MM_IDLE), SBIT(GSM48_MM_SST_NO_IMSI), GSM48_MMCC_EST_REQ, gsm48_mm_init_mm_no_rr}, + {SBIT(GSM48_MM_ST_MM_IDLE), SBIT(GSM48_MM_SST_NO_IMSI), + GSM48_MMBCC_GROUP_REQ, gsm48_mm_group_req}, + + {SBIT(GSM48_MM_ST_MM_IDLE), SBIT(GSM48_MM_SST_NO_IMSI), + GSM48_MMGCC_GROUP_REQ, gsm48_mm_group_req}, + /* 4.2.2.5 PLMN search, normal service */ {SBIT(GSM48_MM_ST_MM_IDLE), SBIT(GSM48_MM_SST_PLMN_SEARCH_NORMAL), GSM48_MMCC_EST_REQ, gsm48_mm_init_mm_no_rr}, @@ -4254,10 +4276,10 @@ GSM48_MMBCC_REL_REQ, gsm48_mm_group_rel_req}, {SBIT(GSM48_MM_ST_MM_IDLE), SBIT(GSM48_MM_SST_RX_VGCS_LIMITED), - GSM48_MMGCC_UPLINK_REQ, gsm48_mm_uplink_reject}, + GSM48_MMGCC_UPLINK_REQ, gsm48_mm_uplink_req}, {SBIT(GSM48_MM_ST_MM_IDLE), SBIT(GSM48_MM_SST_RX_VGCS_LIMITED), - GSM48_MMBCC_UPLINK_REQ, gsm48_mm_uplink_reject}, + GSM48_MMBCC_UPLINK_REQ, gsm48_mm_uplink_req}, /* 4.5.1.1 MM Connection (EST) */ {SBIT(GSM48_MM_ST_RR_CONN_RELEASE_NA), ALL_STATES, diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 1766071..7611c0f 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1327,6 +1327,9 @@ if (!l23_vty_hide_default || !set->uplink_release_local) vty_out(vty, " %suplink-release-local%s", (set->uplink_release_local) ? "no " : "", VTY_NEWLINE); + if (!l23_vty_hide_default || set->asci_allow_any) + vty_out(vty, " %sasci-allow-any%s", + (set->asci_allow_any) ? "" : "no ", VTY_NEWLINE); vty_out(vty, " audio%s", VTY_NEWLINE); vty_out(vty, " io-handler %s%s", @@ -1997,6 +2000,28 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_asci_allow_any, cfg_ms_asci_allow_any_cmd, "asci-allow-any", + "Allow any ASCI related call feature, even if service is limited or SIM invalid.") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->asci_allow_any = true; + + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_asci_allow_any, cfg_ms_no_asci_allow_any_cmd, "no asci-allow-any", + NO_STR "Do not allow any ASCI related call feature, if service is not normal.") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->asci_allow_any = false; + + return CMD_SUCCESS; +} + static int config_write_dummy(struct vty *vty) { return CMD_SUCCESS; @@ -2586,6 +2611,8 @@ install_element(MS_NODE, &cfg_ms_no_sms_store_cmd); install_element(MS_NODE, &cfg_ms_uplink_release_local_cmd); install_element(MS_NODE, &cfg_ms_no_uplink_release_local_cmd); + install_element(MS_NODE, &cfg_ms_asci_allow_any_cmd); + install_element(MS_NODE, &cfg_ms_no_asci_allow_any_cmd); install_element(MS_NODE, &cfg_ms_support_cmd); install_node(&support_node, config_write_dummy); install_element(SUPPORT_NODE, &cfg_ms_set_en_cc_dtmf_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34866?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: I6ea851a8cb015ff685b985335968c6184beca816 Gerrit-Change-Number: 34866 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
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • ...
  • 185
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.