From 651698abca3bb7ec6e405e60e308d8a73b63b4f3 Mon Sep 17 00:00:00 2001 From: "Andreas.Eversberg" Date: Tue, 12 Oct 2010 09:40:05 +0000 Subject: [layer23] Call control is disabled when mobile is set to SDCCH only On SDCCH only mobiles, incomming calls must be rejected by a minimal call control implementation, even if basic calls are not supported. --- src/host/layer23/src/mobile/app_mobile.c | 8 +++++++- src/host/layer23/src/mobile/vty_interface.c | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src/host') diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 924b6c09..8d3ea8a9 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -51,6 +51,7 @@ extern int vty_reading; int mobile_started = 0; int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg); +int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg); int mobile_work(struct osmocom_ms *ms) { @@ -179,7 +180,6 @@ int l23_app_init(struct osmocom_ms *ms) gsm48_rr_init(ms); gsm48_mm_init(ms); INIT_LLIST_HEAD(&ms->trans_list); - ms->cclayer.mncc_recv = mncc_recv_mobile; gsm322_init(ms); l23_app_work = mobile_work; @@ -202,6 +202,12 @@ int l23_app_init(struct osmocom_ms *ms) telnet_init(l23_ctx, NULL, vty_port); if (rc < 0) return rc; + + if (ms->settings.ch_cap == GSM_CAP_SDCCH) + ms->cclayer.mncc_recv = mncc_recv_dummy; + else + ms->cclayer.mncc_recv = mncc_recv_mobile; + printf("VTY available on port %u.\n", vty_port); gsm_random_imei(&ms->settings); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index e3d34fe0..affbe15c 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -629,11 +629,19 @@ DEFUN(call, call_cmd, "call MS_NAME (NUMBER|emergency|answer|hangup|hold)", "Hold current active call\n") { struct osmocom_ms *ms; + struct gsm_settings *set; int i; ms = get_ms(argv[0], vty); if (!ms) return CMD_WARNING; + set = &ms->settings; + + if (set->ch_cap == GSM_CAP_SDCCH) { + vty_out(vty, "Basic call is not supported for SDCCH only " + "mobile%s", VTY_NEWLINE); + return CMD_WARNING; + } if (!strcmp(argv[1], "emergency")) mncc_call(ms, (char *)argv[1]); @@ -1491,6 +1499,10 @@ DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, "channel-capability " return CMD_WARNING; } + if (ch_cap != set->ch_cap + && (ch_cap == GSM_CAP_SDCCH || set->ch_cap == GSM_CAP_SDCCH)) + vty_restart(vty); + set->ch_cap = ch_cap; return CMD_SUCCESS; -- cgit v1.2.3