[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-28 Thread laforge
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. */
+   

[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-27 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34864?usp=email )

Change subject: ASCI: Handle rejection of voice group/broadcast call correctly
..


Patch Set 2: Code-Review+2


--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Fri, 27 Oct 2023 13:17:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-27 Thread fixeria
Attention is currently required from: jolly.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34864?usp=email )

Change subject: ASCI: Handle rejection of voice group/broadcast call correctly
..


Patch Set 2: Code-Review+1


--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Fri, 27 Oct 2023 07:26:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-27 Thread jolly
Attention is currently required from: fixeria.

jolly has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34864?usp=email )

Change subject: ASCI: Handle rejection of voice group/broadcast call correctly
..


Patch Set 2:

(2 comments)

File src/host/layer23/src/mobile/gsm44068_gcc_bcc.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/34864/comment/80e2798d_ac17b8aa
PS1, Line 1228: NULL state
> copy-paste?
Done


https://gerrit.osmocom.org/c/osmocom-bb/+/34864/comment/26ad3c89_91ff29e6
PS1, Line 1231: %d)
> `0x%02x`
All causes are displayed in decimal. The specs do also describe all cause 
values in decimal.



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 27 Oct 2023 07:15:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-27 Thread jolly
Attention is currently required from: fixeria, jolly.

Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmocom-bb/+/34864?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder


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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/64/34864/2
--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-23 Thread fixeria
Attention is currently required from: jolly.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34864?usp=email )

Change subject: ASCI: Handle rejection of voice group/broadcast call correctly
..


Patch Set 1: Code-Review+1

(2 comments)

File src/host/layer23/src/mobile/gsm44068_gcc_bcc.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/34864/comment/facb702f_f37df590
PS1, Line 1228: NULL state
copy-paste?


https://gerrit.osmocom.org/c/osmocom-bb/+/34864/comment/88f58a78_ced4f0a7
PS1, Line 1231: %d)
`0x%02x`



--
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: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Mon, 23 Oct 2023 13:10:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: ASCI: Handle rejection of voice group/broadcast call correctly

2023-10-23 Thread jolly
jolly has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/64/34864/1

diff --git a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c 
b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c
index 0cef1c3..a061cf0 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 to NULL state. */
+   osmo_fsm_inst_state_chg(fi, VGCS_GCC_ST_U3_GROUP_CALL_PRESENT, 
0, 0);
+   /* Notify