[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 249 insertions(+), 8 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h index 4ac084e..511348b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/vty.h +++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h @@ -11,6 +11,8 @@ enum ms_vty_node { SUPPORT_NODE = _LAST_L23VTY_NODE + 1, AUDIO_NODE, + VGCS_NODE, + VBS_NODE, }; int ms_vty_init(void); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index feb5f84..5e5fa6d 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,18 @@ 1 }; +struct cmd_node vgcs_node = { + VGCS_NODE, + "%s(group-call)# ", + 1 +}; + +struct cmd_node vbs_node = { + VBS_NODE, + "%s(broadcast-call)# ", + 1 +}; + int vty_check_number(struct vty *vty, const char *number) { int i; @@ -79,6 +92,32 @@ return 0; } +int vty_check_callref(struct vty *vty, const char *number) +{ + int i, ii = strlen(number); + + /* First check digits, so that a false command result the following error message. */ + for (i = 0; i < ii; i++) { + if (!(number[i] >= '0' && number[i] <= '9')) { + vty_out(vty, "Invalid digit '%c' in callref!%s", + number[i], VTY_NEWLINE); + return -EINVAL; + } + } + + if (ii < 1) { + vty_out(vty, "Given callref has no digits!%s", VTY_NEWLINE); + return -EINVAL; + } + + if (ii > 8) { + vty_out(vty, "Given callref is too long!%s", VTY_NEWLINE); + return -EINVAL; + } + + return 0; +} + static void vty_restart(struct vty *vty, struct osmocom_ms *ms) { if (l23_vty_reading) @@ -334,6 +373,22 @@ return CMD_SUCCESS; } +#define ASCI_STR SHOW_STR "Display information about ASCI items\nName of MS (see \"show ms\")\n" + +DEFUN(show_asci_calls, show_asci_calls_cmd, "show asci MS_NAME calls", + ASCI_STR "Display ongoing ASCI calls") +{ + struct osmocom_ms *ms; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + + gsm44068_dump_calls(ms, l23_vty_printf, vty); + + return CMD_SUCCESS; +} + DEFUN(monitor_network, monitor_network_cmd, "monitor network MS_NAME", "Monitor...\nMonitor network information\nName of MS (see \"show ms\")") { @@ -583,6 +638,146 @@ return CMD_SUCCESS; } +#define VGCS_STR "Make a voice group call\nName of MS (see \"show ms\")\n" +#define VGCS_CMDS "(CALLREF|hangup|leave|talk|listen)" +#define VGCS_CMDS_TXT \ + "Voice group to call or join\nHangup voice group call\nLeave voice group call\nBecome talker\nBecome listener" + +/* This command enters VGCS call node with given MS. */ +DEFUN(vgcs_enter, vgcs_enter_cmd, "group-call MS_NAME", + VGCS_STR) +{ + struct osmocom_ms *ms; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + + vty->index = ms; + vty->node = VGCS_NODE; + + return CMD_SUCCESS; +} + +/* These commands perform VGCS on VGCS node. */ +DEFUN(vgcs, vgcs_cmd, VGCS_CMDS, + VGCS_CMDS_TXT) +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set; + const char *command; + + set = >settings; + + if (!set->vgcs) { + vty_out(vty, "VGCS not supported by this mobile, please enable VGCS support%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (set->ch_cap == GSM_CAP_SDCCH) { + vty_out(vty, "ASCI call is not supported for SDCCH only mobile%s", VTY_NEWLINE); + return CMD_WARNING; + } + + command = (char *)argv[0]; + if (!strcmp(command, "hangup")) + gcc_bcc_hangup(ms); + else if (!strcmp(command, "leave")) + gcc_leave(ms); + else if (!strcmp(command, "talk")) + gcc_talk(ms); + else if (!strcmp(command, "listen")) + gcc_listen(ms); + else { + if
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly, laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. Patch Set 16: Code-Review+2 (2 comments) File src/host/layer23/src/mobile/vty_interface.c: https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/ab784fd9_021f7042 PS16, Line 700: These commands perform VGCS on given MS without entering the VGCS node > You can switch between talk and listen without having a full command. […] Ok then. Thanks for explaining. https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/c280735f_f008edbd PS16, Line 735: These commands perform VBS on VBS node > Same here, do we really want a separate note? Done -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 16 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Comment-Date: Wed, 04 Oct 2023 12:05:21 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: jolly Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: fixeria, jolly, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. Patch Set 16: Code-Review+1 (1 comment) File src/host/layer23/src/mobile/vty_interface.c: https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/5b302de9_640fbe03 PS16, Line 379: ASCI_STR > It is already added in the #define above. I renamed it to SHOW_ASCI_STR, to > make this clearer. Not sure what do we win by having all that ina define instead of directly, but ok... -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 16 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Wed, 04 Oct 2023 11:48:52 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: jolly Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: fixeria, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. Patch Set 16: (2 comments) File src/host/layer23/src/mobile/vty_interface.c: https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/c75d73d4_ca937e73 PS16, Line 379: ASCI_STR > You're missing `SHOW_STR` here, it should be: […] It is already added in the #define above. I renamed it to SHOW_ASCI_STR, to make this clearer. https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/928e0c2b_e0cf94a9 PS16, Line 700: These commands perform VGCS on given MS without entering the VGCS node > So then is there really a need for having a dedicated VTY node for just one > command, which is also a […] You can switch between talk and listen without having a full command. Just enter "talk" or "listen" or other sub-commands. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 16 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Attention: pespin Gerrit-Comment-Date: Wed, 04 Oct 2023 10:47:15 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly, laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. Patch Set 16: (3 comments) File src/host/layer23/src/mobile/vty_interface.c: https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/c54658cc_2b781905 PS16, Line 379: ASCI_STR You're missing `SHOW_STR` here, it should be: ``` show SHOW_STR asci "Display information about ASCI items\n" MS_NAME "Name of MS (see \"show ms\")\n" calls "Display ongoing ASCI calls\n" ``` https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/c9bec87d_9ebaf001 PS16, Line 700: These commands perform VGCS on given MS without entering the VGCS node So then is there really a need for having a dedicated VTY node for just one command, which is also available without entering the node? I don't see the benefits of having it. https://gerrit.osmocom.org/c/osmocom-bb/+/34495/comment/d6499e2e_3df7c12e PS16, Line 735: These commands perform VBS on VBS node Same here, do we really want a separate note? -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 16 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 03 Oct 2023 10:18:42 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly, laforge, pespin. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#16). The following approvals got outdated and were removed: Code-Review+1 by pespin, Code-Review+2 by laforge, Verified+1 by Jenkins Builder The change is no longer submittable: Code-Review and Verified are unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 249 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/16 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 16 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#15). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/15 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 15 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#14). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/14 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 14 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#12). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/12 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 12 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#11). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/11 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 11 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#10). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/10 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 10 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#9). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/9 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 9 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#8). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/8 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 8 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/7 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 7 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 6 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Comment-Date: Sun, 24 Sep 2023 17:45:53 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34495?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: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 Gerrit-Change-Number: 34495 Gerrit-PatchSet: 6 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Comment-Date: Thu, 21 Sep 2023 14:33:46 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[L] Change in osmocom-bb[master]: ASCI: Add VTY commands to control voice group/broadcast calls
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34495?usp=email ) Change subject: ASCI: Add VTY commands to control voice group/broadcast calls .. ASCI: Add VTY commands to control voice group/broadcast calls Related: OS#5364 Change-Id: Id32253b4e10b8df48e819d8a92bbcda332dd11e6 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 248 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/34495/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h index 4ac084e..511348b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/vty.h +++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h @@ -11,6 +11,8 @@ enum ms_vty_node { SUPPORT_NODE = _LAST_L23VTY_NODE + 1, AUDIO_NODE, + VGCS_NODE, + VBS_NODE, }; int ms_vty_init(void); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index feb5f84..2384e04 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,18 @@ 1 }; +struct cmd_node vgcs_node = { + VGCS_NODE, + "%s(group-call)# ", + 1 +}; + +struct cmd_node vbs_node = { + VBS_NODE, + "%s(broadcast-call)# ", + 1 +}; + int vty_check_number(struct vty *vty, const char *number) { int i; @@ -79,6 +92,32 @@ return 0; } +int vty_check_callref(struct vty *vty, const char *number) +{ + int i, ii = strlen(number); + + /* First check digits, so that a false command result the following error message. */ + for (i = 0; i < ii; i++) { + if (!(number[i] >= '0' && number[i] <= '9')) { + vty_out(vty, "Invalid digit '%c' in callref!%s", + number[i], VTY_NEWLINE); + return -EINVAL; + } + } + + if (ii < 1) { + vty_out(vty, "Given callref has no digits!%s", VTY_NEWLINE); + return -EINVAL; + } + + if (ii > 8) { + vty_out(vty, "Given callref is too long!%s", VTY_NEWLINE); + return -EINVAL; + } + + return 0; +} + static void vty_restart(struct vty *vty, struct osmocom_ms *ms) { if (l23_vty_reading) @@ -334,6 +373,21 @@ return CMD_SUCCESS; } +DEFUN(show_asci_calls, show_asci_calls_cmd, "show asci calls MS_NAME", + SHOW_STR "Display information about ASCI items\n" + "Display ongoing ASCI calls\nName of MS (see \"show ms\")") +{ + struct osmocom_ms *ms; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + + gsm44068_dump_calls(ms, l23_vty_printf, vty); + + return CMD_SUCCESS; +} + DEFUN(monitor_network, monitor_network_cmd, "monitor network MS_NAME", "Monitor...\nMonitor network information\nName of MS (see \"show ms\")") { @@ -583,6 +637,146 @@ return CMD_SUCCESS; } +#define VGCS_STR "Make a voice group call\nName of MS (see \"show ms\")\n" +#define VGCS_CMDS "(CALLREF|hangup|leave|talk|listen)" +#define VGCS_CMDS_TXT \ + "Voice group to call or join\nHangup voice group call\nLeave voice group call\nBecome talker\nBecome listener" + +/* This command enters VGCS call node with given MS. */ +DEFUN(vgcs_enter, vgcs_enter_cmd, "group-call MS_NAME", + VGCS_STR) +{ + struct osmocom_ms *ms; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + + vty->index = ms; + vty->node = VGCS_NODE; + + return CMD_SUCCESS; +} + +/* These commands perform VGCS on VGCS node. */ +DEFUN(vgcs, vgcs_cmd, VGCS_CMDS, + VGCS_CMDS_TXT) +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set; + const char *command; + + set = >settings; + + if (!set->vgcs) { + vty_out(vty, "VGCS not supported by this mobile, please enable VGCS support%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (set->ch_cap == GSM_CAP_SDCCH) { + vty_out(vty, "ASCI call is not supported for SDCCH only mobile%s", VTY_NEWLINE); + return CMD_WARNING; + } + + command = (char *)argv[0]; + if (!strcmp(command, "hangup")) + gcc_bcc_hangup(ms); + else if (!strcmp(command, "leave")) + gcc_leave(ms); + else if (!strcmp(command, "talk")) + gcc_talk(ms); + else if (!strcmp(command, "listen")) + gcc_listen(ms); + else { + if (vty_check_callref(vty, command)) + return CMD_WARNING; +