Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 1 | /* Osmo BSC VTY Configuration */ |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 2 | /* (C) 2009-2011 by Holger Hans Peter Freyther |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 3 | * (C) 2009-2011 by On-Waves |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 4 | * All Rights Reserved |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
Harald Welte | 9af6ddf | 2011-01-01 15:25:50 +0100 | [diff] [blame] | 7 | * it under the terms of the GNU Affero General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Harald Welte | 9af6ddf | 2011-01-01 15:25:50 +0100 | [diff] [blame] | 14 | * GNU Affero General Public License for more details. |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 15 | * |
Harald Welte | 9af6ddf | 2011-01-01 15:25:50 +0100 | [diff] [blame] | 16 | * You should have received a copy of the GNU Affero General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 18 | * |
| 19 | */ |
| 20 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 21 | #include <openbsc/gsm_data.h> |
| 22 | #include <openbsc/osmo_msc_data.h> |
| 23 | #include <openbsc/vty.h> |
| 24 | |
Pablo Neira Ayuso | 136f453 | 2011-03-22 16:47:59 +0100 | [diff] [blame] | 25 | #include <osmocom/core/talloc.h> |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 26 | |
Daniel Willmann | 7d10983 | 2012-05-14 18:43:23 +0200 | [diff] [blame] | 27 | #include <time.h> |
| 28 | |
Holger Hans Peter Freyther | fe16622 | 2010-11-03 13:32:48 +0100 | [diff] [blame] | 29 | |
| 30 | #define IPA_STR "IP.ACCESS specific\n" |
| 31 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 32 | extern struct gsm_network *bsc_gsmnet; |
| 33 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 34 | static struct osmo_bsc_data *osmo_bsc_data(struct vty *vty) |
| 35 | { |
| 36 | return bsc_gsmnet->bsc_data; |
| 37 | } |
| 38 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 39 | static struct osmo_msc_data *osmo_msc_data(struct vty *vty) |
| 40 | { |
Holger Hans Peter Freyther | 20fea24 | 2011-06-04 19:58:26 +0200 | [diff] [blame] | 41 | return osmo_msc_data_find(bsc_gsmnet, (int) vty->index); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 42 | } |
| 43 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 44 | static struct cmd_node bsc_node = { |
| 45 | BSC_NODE, |
Jacob Erlbeck | 0b4f1b9 | 2013-08-30 18:33:58 +0200 | [diff] [blame] | 46 | "%s(config-bsc)# ", |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 47 | 1, |
| 48 | }; |
| 49 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 50 | static struct cmd_node msc_node = { |
| 51 | MSC_NODE, |
Harald Welte | 570ce24 | 2012-08-17 13:16:10 +0200 | [diff] [blame] | 52 | "%s(config-msc)# ", |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 53 | 1, |
| 54 | }; |
| 55 | |
| 56 | DEFUN(cfg_net_msc, cfg_net_msc_cmd, |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 57 | "msc [<0-1000>]", "Configure MSC details\n" "MSC connection to configure\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 58 | { |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 59 | int index = argc == 1 ? atoi(argv[0]) : 0; |
Holger Hans Peter Freyther | 20fea24 | 2011-06-04 19:58:26 +0200 | [diff] [blame] | 60 | struct osmo_msc_data *msc; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 61 | |
Holger Hans Peter Freyther | 20fea24 | 2011-06-04 19:58:26 +0200 | [diff] [blame] | 62 | msc = osmo_msc_data_alloc(bsc_gsmnet, index); |
| 63 | if (!msc) { |
| 64 | vty_out(vty, "%%Failed to allocate MSC data.%s", VTY_NEWLINE); |
| 65 | return CMD_WARNING; |
| 66 | } |
| 67 | |
| 68 | vty->index = (void *) index; |
| 69 | vty->node = MSC_NODE; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 70 | return CMD_SUCCESS; |
| 71 | } |
| 72 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 73 | DEFUN(cfg_net_bsc, cfg_net_bsc_cmd, |
| 74 | "bsc", "Configure BSC\n") |
| 75 | { |
| 76 | vty->node = BSC_NODE; |
| 77 | return CMD_SUCCESS; |
| 78 | } |
| 79 | |
Holger Hans Peter Freyther | 7507795 | 2011-08-06 08:31:51 +0200 | [diff] [blame] | 80 | static void write_msc_amr_options(struct vty *vty, struct osmo_msc_data *msc) |
| 81 | { |
| 82 | #define WRITE_AMR(vty, msc, name, var) \ |
| 83 | vty_out(vty, " amr-config %s %s%s", \ |
| 84 | name, msc->amr_conf.var ? "allowed" : "forbidden", \ |
| 85 | VTY_NEWLINE); |
| 86 | |
| 87 | WRITE_AMR(vty, msc, "12_2k", m12_2); |
| 88 | WRITE_AMR(vty, msc, "10_2k", m10_2); |
| 89 | WRITE_AMR(vty, msc, "7_95k", m7_95); |
| 90 | WRITE_AMR(vty, msc, "7_40k", m7_40); |
| 91 | WRITE_AMR(vty, msc, "6_70k", m6_70); |
| 92 | WRITE_AMR(vty, msc, "5_90k", m5_90); |
| 93 | WRITE_AMR(vty, msc, "5_15k", m5_15); |
| 94 | WRITE_AMR(vty, msc, "4_75k", m4_75); |
| 95 | #undef WRITE_AMR |
| 96 | } |
| 97 | |
Holger Hans Peter Freyther | 20fea24 | 2011-06-04 19:58:26 +0200 | [diff] [blame] | 98 | static void write_msc(struct vty *vty, struct osmo_msc_data *msc) |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 99 | { |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 100 | struct bsc_msc_dest *dest; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 101 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 102 | vty_out(vty, "msc %d%s", msc->nr, VTY_NEWLINE); |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 103 | if (msc->bsc_token) |
| 104 | vty_out(vty, " token %s%s", msc->bsc_token, VTY_NEWLINE); |
| 105 | if (msc->core_ncc != -1) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 106 | vty_out(vty, " core-mobile-network-code %d%s", |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 107 | msc->core_ncc, VTY_NEWLINE); |
| 108 | if (msc->core_mcc != -1) |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 109 | vty_out(vty, " core-mobile-country-code %d%s", |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 110 | msc->core_mcc, VTY_NEWLINE); |
| 111 | vty_out(vty, " ip.access rtp-base %d%s", msc->rtp_base, VTY_NEWLINE); |
| 112 | vty_out(vty, " timeout-ping %d%s", msc->ping_timeout, VTY_NEWLINE); |
| 113 | vty_out(vty, " timeout-pong %d%s", msc->pong_timeout, VTY_NEWLINE); |
Jacob Erlbeck | 97e139f | 2013-08-28 10:16:55 +0200 | [diff] [blame] | 114 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 115 | if (msc->ussd_welcome_txt) |
| 116 | vty_out(vty, " bsc-welcome-text %s%s", msc->ussd_welcome_txt, VTY_NEWLINE); |
Jacob Erlbeck | 97e139f | 2013-08-28 10:16:55 +0200 | [diff] [blame] | 117 | else |
| 118 | vty_out(vty, " no bsc-welcome-text%s", VTY_NEWLINE); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 119 | |
Jacob Erlbeck | 1b89402 | 2013-08-28 10:16:54 +0200 | [diff] [blame] | 120 | if (msc->ussd_msc_lost_txt && msc->ussd_msc_lost_txt[0]) |
| 121 | vty_out(vty, " bsc-msc-lost-text %s%s", msc->ussd_msc_lost_txt, VTY_NEWLINE); |
| 122 | else |
| 123 | vty_out(vty, " no bsc-msc-lost-text%s", VTY_NEWLINE); |
| 124 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 125 | if (msc->audio_length != 0) { |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 126 | int i; |
| 127 | |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 128 | vty_out(vty, " codec-list "); |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 129 | for (i = 0; i < msc->audio_length; ++i) { |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 130 | if (i != 0) |
Harald Welte | 22ce598 | 2013-06-19 15:32:27 +0200 | [diff] [blame] | 131 | vty_out(vty, " "); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 132 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 133 | if (msc->audio_support[i]->hr) |
| 134 | vty_out(vty, "hr%.1u", msc->audio_support[i]->ver); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 135 | else |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 136 | vty_out(vty, "fr%.1u", msc->audio_support[i]->ver); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 137 | } |
| 138 | vty_out(vty, "%s", VTY_NEWLINE); |
| 139 | |
| 140 | } |
| 141 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 142 | llist_for_each_entry(dest, &msc->dests, list) |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 143 | vty_out(vty, " dest %s %d %d%s", dest->ip, dest->port, |
| 144 | dest->dscp, VTY_NEWLINE); |
Holger Hans Peter Freyther | cbaa880 | 2011-06-08 16:28:04 +0200 | [diff] [blame] | 145 | |
| 146 | vty_out(vty, " type %s%s", msc->type == MSC_CON_TYPE_NORMAL ? |
| 147 | "normal" : "local", VTY_NEWLINE); |
Holger Hans Peter Freyther | 31b245b | 2011-06-08 19:27:15 +0200 | [diff] [blame] | 148 | vty_out(vty, " allow-emergency %s%s", msc->allow_emerg ? |
| 149 | "allow" : "deny", VTY_NEWLINE); |
Holger Hans Peter Freyther | d5edc4f | 2011-06-09 21:54:08 +0200 | [diff] [blame] | 150 | |
| 151 | if (msc->local_pref) |
| 152 | vty_out(vty, " local-prefix %s%s", msc->local_pref, VTY_NEWLINE); |
Holger Hans Peter Freyther | 7507795 | 2011-08-06 08:31:51 +0200 | [diff] [blame] | 153 | |
| 154 | /* write amr options */ |
| 155 | write_msc_amr_options(vty, msc); |
Holger Hans Peter Freyther | 20fea24 | 2011-06-04 19:58:26 +0200 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | static int config_write_msc(struct vty *vty) |
| 159 | { |
| 160 | struct osmo_msc_data *msc; |
| 161 | struct osmo_bsc_data *bsc = osmo_bsc_data(vty); |
| 162 | |
| 163 | llist_for_each_entry(msc, &bsc->mscs, entry) |
| 164 | write_msc(vty, msc); |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 165 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 166 | return CMD_SUCCESS; |
| 167 | } |
| 168 | |
| 169 | static int config_write_bsc(struct vty *vty) |
| 170 | { |
| 171 | struct osmo_bsc_data *bsc = osmo_bsc_data(vty); |
| 172 | |
| 173 | vty_out(vty, "bsc%s", VTY_NEWLINE); |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 174 | if (bsc->mid_call_txt) |
| 175 | vty_out(vty, " mid-call-text %s%s", bsc->mid_call_txt, VTY_NEWLINE); |
| 176 | vty_out(vty, " mid-call-timeout %d%s", bsc->mid_call_timeout, VTY_NEWLINE); |
| 177 | if (bsc->rf_ctrl_name) |
| 178 | vty_out(vty, " bsc-rf-socket %s%s", |
| 179 | bsc->rf_ctrl_name, VTY_NEWLINE); |
| 180 | |
Holger Hans Peter Freyther | 2a89607 | 2011-08-16 19:47:39 +0200 | [diff] [blame] | 181 | if (bsc->auto_off_timeout != -1) |
| 182 | vty_out(vty, " bsc-auto-rf-off %d%s", |
| 183 | bsc->auto_off_timeout, VTY_NEWLINE); |
| 184 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 185 | return CMD_SUCCESS; |
| 186 | } |
| 187 | |
Holger Hans Peter Freyther | 5b848f3 | 2010-11-03 13:11:14 +0100 | [diff] [blame] | 188 | DEFUN(cfg_net_bsc_token, |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 189 | cfg_net_bsc_token_cmd, |
| 190 | "token TOKEN", |
Holger Hans Peter Freyther | 63b0e44 | 2013-03-03 09:32:08 +0100 | [diff] [blame] | 191 | "A token for the BSC to be sent to the MSC\n" "A token\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 192 | { |
| 193 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 194 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 195 | bsc_replace_string(osmo_bsc_data(vty), &data->bsc_token, argv[0]); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 196 | return CMD_SUCCESS; |
| 197 | } |
| 198 | |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 199 | DEFUN(cfg_net_bsc_ncc, |
| 200 | cfg_net_bsc_ncc_cmd, |
Holger Hans Peter Freyther | 6e1a676 | 2011-02-10 11:37:13 +0100 | [diff] [blame] | 201 | "core-mobile-network-code <1-999>", |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 202 | "Use this network code for the backbone\n" "NCC value\n") |
| 203 | { |
| 204 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 205 | data->core_ncc = atoi(argv[0]); |
| 206 | return CMD_SUCCESS; |
| 207 | } |
| 208 | |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 209 | DEFUN(cfg_net_bsc_mcc, |
| 210 | cfg_net_bsc_mcc_cmd, |
Holger Hans Peter Freyther | 6e1a676 | 2011-02-10 11:37:13 +0100 | [diff] [blame] | 211 | "core-mobile-country-code <1-999>", |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 212 | "Use this country code for the backbone\n" "MCC value\n") |
| 213 | { |
| 214 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 215 | data->core_mcc = atoi(argv[0]); |
| 216 | return CMD_SUCCESS; |
| 217 | } |
| 218 | |
Holger Hans Peter Freyther | fe16622 | 2010-11-03 13:32:48 +0100 | [diff] [blame] | 219 | DEFUN(cfg_net_bsc_rtp_base, |
| 220 | cfg_net_bsc_rtp_base_cmd, |
| 221 | "ip.access rtp-base <1-65000>", |
| 222 | IPA_STR |
| 223 | "Set the rtp-base port for the RTP stream\n" |
| 224 | "Port number\n") |
| 225 | { |
| 226 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 227 | data->rtp_base = atoi(argv[0]); |
| 228 | return CMD_SUCCESS; |
| 229 | } |
| 230 | |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 231 | DEFUN(cfg_net_bsc_codec_list, |
| 232 | cfg_net_bsc_codec_list_cmd, |
| 233 | "codec-list .LIST", |
| 234 | "Set the allowed audio codecs\n" |
| 235 | "List of audio codecs\n") |
| 236 | { |
| 237 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 238 | int saw_fr, saw_hr; |
| 239 | int i; |
| 240 | |
| 241 | saw_fr = saw_hr = 0; |
| 242 | |
| 243 | /* free the old list... if it exists */ |
| 244 | if (data->audio_support) { |
| 245 | talloc_free(data->audio_support); |
| 246 | data->audio_support = NULL; |
| 247 | data->audio_length = 0; |
| 248 | } |
| 249 | |
| 250 | /* create a new array */ |
| 251 | data->audio_support = |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 252 | talloc_zero_array(osmo_bsc_data(vty), struct gsm_audio_support *, argc); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 253 | data->audio_length = argc; |
| 254 | |
| 255 | for (i = 0; i < argc; ++i) { |
| 256 | /* check for hrX or frX */ |
| 257 | if (strlen(argv[i]) != 3 |
| 258 | || argv[i][1] != 'r' |
| 259 | || (argv[i][0] != 'h' && argv[i][0] != 'f') |
| 260 | || argv[i][2] < 0x30 |
| 261 | || argv[i][2] > 0x39) |
| 262 | goto error; |
| 263 | |
| 264 | data->audio_support[i] = talloc_zero(data->audio_support, |
| 265 | struct gsm_audio_support); |
| 266 | data->audio_support[i]->ver = atoi(argv[i] + 2); |
| 267 | |
| 268 | if (strncmp("hr", argv[i], 2) == 0) { |
| 269 | data->audio_support[i]->hr = 1; |
| 270 | saw_hr = 1; |
| 271 | } else if (strncmp("fr", argv[i], 2) == 0) { |
| 272 | data->audio_support[i]->hr = 0; |
| 273 | saw_fr = 1; |
| 274 | } |
| 275 | |
| 276 | if (saw_hr && saw_fr) { |
| 277 | vty_out(vty, "Can not have full-rate and half-rate codec.%s", |
| 278 | VTY_NEWLINE); |
| 279 | return CMD_ERR_INCOMPLETE; |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | return CMD_SUCCESS; |
| 284 | |
| 285 | error: |
| 286 | vty_out(vty, "Codec name must be hrX or frX. Was '%s'%s", |
| 287 | argv[i], VTY_NEWLINE); |
| 288 | return CMD_ERR_INCOMPLETE; |
| 289 | } |
| 290 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 291 | DEFUN(cfg_net_msc_dest, |
| 292 | cfg_net_msc_dest_cmd, |
| 293 | "dest A.B.C.D <1-65000> <0-255>", |
| 294 | "Add a destination to a MUX/MSC\n" |
| 295 | "IP Address\n" "Port\n" "DSCP\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 296 | { |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 297 | struct bsc_msc_dest *dest; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 298 | struct osmo_msc_data *data = osmo_msc_data(vty); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 299 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 300 | dest = talloc_zero(osmo_bsc_data(vty), struct bsc_msc_dest); |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 301 | if (!dest) { |
| 302 | vty_out(vty, "%%Failed to create structure.%s", VTY_NEWLINE); |
| 303 | return CMD_WARNING; |
| 304 | } |
| 305 | |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 306 | dest->ip = talloc_strdup(dest, argv[0]); |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 307 | if (!dest->ip) { |
| 308 | vty_out(vty, "%%Failed to copy dest ip.%s", VTY_NEWLINE); |
| 309 | talloc_free(dest); |
| 310 | return CMD_WARNING; |
| 311 | } |
| 312 | |
| 313 | dest->port = atoi(argv[1]); |
| 314 | dest->dscp = atoi(argv[2]); |
| 315 | llist_add_tail(&dest->list, &data->dests); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 316 | return CMD_SUCCESS; |
| 317 | } |
| 318 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 319 | DEFUN(cfg_net_msc_no_dest, |
| 320 | cfg_net_msc_no_dest_cmd, |
| 321 | "no dest A.B.C.D <1-65000> <0-255>", |
| 322 | NO_STR "Remove a destination to a MUX/MSC\n" |
| 323 | "IP Address\n" "Port\n" "DSCP\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 324 | { |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 325 | struct bsc_msc_dest *dest, *tmp; |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 326 | struct osmo_msc_data *data = osmo_msc_data(vty); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 327 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 328 | int port = atoi(argv[1]); |
| 329 | int dscp = atoi(argv[2]); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 330 | |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 331 | llist_for_each_entry_safe(dest, tmp, &data->dests, list) { |
| 332 | if (port != dest->port || dscp != dest->dscp |
| 333 | || strcmp(dest->ip, argv[0]) != 0) |
| 334 | continue; |
| 335 | |
| 336 | llist_del(&dest->list); |
| 337 | talloc_free(dest); |
| 338 | } |
| 339 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 340 | return CMD_SUCCESS; |
| 341 | } |
| 342 | |
| 343 | DEFUN(cfg_net_msc_ping_time, |
| 344 | cfg_net_msc_ping_time_cmd, |
| 345 | "timeout-ping NR", |
Holger Hans Peter Freyther | 63b0e44 | 2013-03-03 09:32:08 +0100 | [diff] [blame] | 346 | "Set the PING interval, negative for not sending PING\n" |
| 347 | "Timeout in seconds\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 348 | { |
| 349 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 350 | data->ping_timeout = atoi(argv[0]); |
| 351 | return CMD_SUCCESS; |
| 352 | } |
| 353 | |
| 354 | DEFUN(cfg_net_msc_pong_time, |
| 355 | cfg_net_msc_pong_time_cmd, |
| 356 | "timeout-pong NR", |
Holger Hans Peter Freyther | 63b0e44 | 2013-03-03 09:32:08 +0100 | [diff] [blame] | 357 | "Set the time to wait for a PONG\n" "Timeout in seconds\n") |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 358 | { |
| 359 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 360 | data->pong_timeout = atoi(argv[0]); |
| 361 | return CMD_SUCCESS; |
| 362 | } |
| 363 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 364 | DEFUN(cfg_net_msc_welcome_ussd, |
| 365 | cfg_net_msc_welcome_ussd_cmd, |
| 366 | "bsc-welcome-text .TEXT", |
Jacob Erlbeck | 97e139f | 2013-08-28 10:16:55 +0200 | [diff] [blame] | 367 | "Set the USSD notification to be sent\n" "Text to be sent\n") |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 368 | { |
| 369 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 370 | char *str = argv_concat(argv, argc, 0); |
| 371 | if (!str) |
| 372 | return CMD_WARNING; |
| 373 | |
| 374 | bsc_replace_string(osmo_bsc_data(vty), &data->ussd_welcome_txt, str); |
| 375 | talloc_free(str); |
| 376 | return CMD_SUCCESS; |
| 377 | } |
| 378 | |
Jacob Erlbeck | 97e139f | 2013-08-28 10:16:55 +0200 | [diff] [blame] | 379 | DEFUN(cfg_net_msc_no_welcome_ussd, |
| 380 | cfg_net_msc_no_welcome_ussd_cmd, |
| 381 | "no bsc-welcome-text", |
| 382 | NO_STR "Clear the USSD notification to be sent\n") |
| 383 | { |
| 384 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 385 | |
| 386 | talloc_free(data->ussd_welcome_txt); |
| 387 | data->ussd_welcome_txt = 0; |
| 388 | |
| 389 | return CMD_SUCCESS; |
| 390 | } |
| 391 | |
Jacob Erlbeck | 1b89402 | 2013-08-28 10:16:54 +0200 | [diff] [blame] | 392 | DEFUN(cfg_net_msc_lost_ussd, |
| 393 | cfg_net_msc_lost_ussd_cmd, |
| 394 | "bsc-msc-lost-text .TEXT", |
| 395 | "Set the USSD notification to be sent on MSC connection loss\n" "Text to be sent\n") |
| 396 | { |
| 397 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 398 | char *str = argv_concat(argv, argc, 0); |
| 399 | if (!str) |
| 400 | return CMD_WARNING; |
| 401 | |
| 402 | bsc_replace_string(osmo_bsc_data(vty), &data->ussd_msc_lost_txt, str); |
| 403 | talloc_free(str); |
| 404 | return CMD_SUCCESS; |
| 405 | } |
| 406 | |
| 407 | DEFUN(cfg_net_msc_no_lost_ussd, |
| 408 | cfg_net_msc_no_lost_ussd_cmd, |
| 409 | "no bsc-msc-lost-text", |
| 410 | NO_STR "Clear the USSD notification to be sent on MSC connection loss\n") |
| 411 | { |
| 412 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 413 | |
| 414 | talloc_free(data->ussd_msc_lost_txt); |
| 415 | data->ussd_msc_lost_txt = 0; |
| 416 | |
| 417 | return CMD_SUCCESS; |
| 418 | } |
| 419 | |
Holger Hans Peter Freyther | cbaa880 | 2011-06-08 16:28:04 +0200 | [diff] [blame] | 420 | DEFUN(cfg_net_msc_type, |
| 421 | cfg_net_msc_type_cmd, |
| 422 | "type (normal|local)", |
| 423 | "Select the MSC type\n" |
| 424 | "Plain GSM MSC\n" "Special MSC for local call routing\n") |
| 425 | { |
| 426 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 427 | |
| 428 | if (strcmp(argv[0], "normal") == 0) |
| 429 | data->type = MSC_CON_TYPE_NORMAL; |
| 430 | else if (strcmp(argv[0], "local") == 0) |
| 431 | data->type = MSC_CON_TYPE_LOCAL; |
| 432 | |
| 433 | return CMD_SUCCESS; |
| 434 | } |
| 435 | |
Holger Hans Peter Freyther | 31b245b | 2011-06-08 19:27:15 +0200 | [diff] [blame] | 436 | DEFUN(cfg_net_msc_emerg, |
| 437 | cfg_net_msc_emerg_cmd, |
| 438 | "allow-emergency (allow|deny)", |
| 439 | "Allow CM ServiceRequests with type emergency\n" |
| 440 | "Allow\n" "Deny\n") |
| 441 | { |
| 442 | struct osmo_msc_data *data = osmo_msc_data(vty); |
| 443 | data->allow_emerg = strcmp("allow", argv[0]) == 0; |
| 444 | return CMD_SUCCESS; |
| 445 | } |
| 446 | |
Holger Hans Peter Freyther | d5edc4f | 2011-06-09 21:54:08 +0200 | [diff] [blame] | 447 | DEFUN(cfg_net_msc_local_prefix, |
| 448 | cfg_net_msc_local_prefix_cmd, |
| 449 | "local-prefix REGEXP", |
| 450 | "Prefix for local numbers\n" "REGEXP used\n") |
| 451 | { |
| 452 | struct osmo_msc_data *msc = osmo_msc_data(vty); |
| 453 | |
| 454 | if (gsm_parse_reg(msc, &msc->local_pref_reg, &msc->local_pref, argc, argv) != 0) { |
| 455 | vty_out(vty, "%%Failed to parse the regexp: '%s'%s", |
| 456 | argv[0], VTY_NEWLINE); |
| 457 | return CMD_WARNING; |
| 458 | } |
| 459 | |
| 460 | return CMD_SUCCESS; |
| 461 | } |
| 462 | |
Holger Hans Peter Freyther | 7507795 | 2011-08-06 08:31:51 +0200 | [diff] [blame] | 463 | #define AMR_CONF_STR "AMR Multirate Configuration\n" |
| 464 | #define AMR_COMMAND(name) \ |
| 465 | DEFUN(cfg_net_msc_amr_##name, \ |
| 466 | cfg_net_msc_amr_##name##_cmd, \ |
| 467 | "amr-config " #name "k (allowed|forbidden)", \ |
| 468 | AMR_CONF_STR "Bitrate\n" "Allowed\n" "Forbidden\n") \ |
| 469 | { \ |
| 470 | struct osmo_msc_data *msc = osmo_msc_data(vty); \ |
| 471 | \ |
| 472 | msc->amr_conf.m##name = strcmp(argv[0], "allowed") == 0; \ |
| 473 | return CMD_SUCCESS; \ |
| 474 | } |
| 475 | |
| 476 | AMR_COMMAND(12_2) |
| 477 | AMR_COMMAND(10_2) |
| 478 | AMR_COMMAND(7_95) |
| 479 | AMR_COMMAND(7_40) |
| 480 | AMR_COMMAND(6_70) |
| 481 | AMR_COMMAND(5_90) |
| 482 | AMR_COMMAND(5_15) |
| 483 | AMR_COMMAND(4_75) |
| 484 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 485 | DEFUN(cfg_net_bsc_mid_call_text, |
| 486 | cfg_net_bsc_mid_call_text_cmd, |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 487 | "mid-call-text .TEXT", |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 488 | "Set the USSD notifcation to be send.\n" "Text to be sent\n") |
| 489 | { |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 490 | struct osmo_bsc_data *data = osmo_bsc_data(vty); |
Holger Hans Peter Freyther | 414bc4a | 2010-11-22 22:27:39 +0100 | [diff] [blame] | 491 | char *txt = argv_concat(argv, argc, 0); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 492 | if (!txt) |
| 493 | return CMD_WARNING; |
| 494 | |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 495 | bsc_replace_string(data, &data->mid_call_txt, txt); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 496 | talloc_free(txt); |
| 497 | return CMD_SUCCESS; |
| 498 | } |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 499 | |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 500 | DEFUN(cfg_net_bsc_mid_call_timeout, |
| 501 | cfg_net_bsc_mid_call_timeout_cmd, |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 502 | "mid-call-timeout NR", |
Holger Hans Peter Freyther | 625b6e4 | 2010-11-22 18:25:02 +0100 | [diff] [blame] | 503 | "Switch from Grace to Off in NR seconds.\n" "Timeout in seconds\n") |
| 504 | { |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 505 | struct osmo_bsc_data *data = osmo_bsc_data(vty); |
Holger Hans Peter Freyther | bb62b3f | 2010-11-22 18:30:21 +0100 | [diff] [blame] | 506 | data->mid_call_timeout = atoi(argv[0]); |
Holger Hans Peter Freyther | 625b6e4 | 2010-11-22 18:25:02 +0100 | [diff] [blame] | 507 | return CMD_SUCCESS; |
| 508 | } |
| 509 | |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 510 | DEFUN(cfg_net_rf_socket, |
| 511 | cfg_net_rf_socket_cmd, |
| 512 | "bsc-rf-socket PATH", |
| 513 | "Set the filename for the RF control interface.\n" "RF Control path\n") |
| 514 | { |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 515 | struct osmo_bsc_data *data = osmo_bsc_data(vty); |
Holger Hans Peter Freyther | 55ef5fb | 2011-04-07 23:23:27 +0200 | [diff] [blame] | 516 | |
| 517 | bsc_replace_string(data, &data->rf_ctrl_name, argv[0]); |
| 518 | return CMD_SUCCESS; |
| 519 | } |
| 520 | |
Holger Hans Peter Freyther | 2a89607 | 2011-08-16 19:47:39 +0200 | [diff] [blame] | 521 | DEFUN(cfg_net_rf_off_time, |
| 522 | cfg_net_rf_off_time_cmd, |
| 523 | "bsc-auto-rf-off <1-65000>", |
| 524 | "Disable RF on MSC Connection\n" "Timeout\n") |
| 525 | { |
| 526 | struct osmo_bsc_data *data = osmo_bsc_data(vty); |
| 527 | data->auto_off_timeout = atoi(argv[0]); |
| 528 | return CMD_SUCCESS; |
| 529 | } |
| 530 | |
| 531 | DEFUN(cfg_net_no_rf_off_time, |
| 532 | cfg_net_no_rf_off_time_cmd, |
| 533 | "no bsc-auto-rf-off", |
| 534 | NO_STR "Disable RF on MSC Connection\n") |
| 535 | { |
| 536 | struct osmo_bsc_data *data = osmo_bsc_data(vty); |
| 537 | data->auto_off_timeout = -1; |
| 538 | return CMD_SUCCESS; |
| 539 | } |
| 540 | |
Holger Hans Peter Freyther | 286ba0e | 2011-05-03 18:12:39 +0200 | [diff] [blame] | 541 | DEFUN(show_statistics, |
| 542 | show_statistics_cmd, |
| 543 | "show statistics", |
| 544 | SHOW_STR "Statistics about the BSC\n") |
| 545 | { |
| 546 | openbsc_vty_print_statistics(vty, bsc_gsmnet); |
| 547 | return CMD_SUCCESS; |
| 548 | } |
| 549 | |
Holger Hans Peter Freyther | c50e04a | 2011-10-20 11:06:31 +0200 | [diff] [blame] | 550 | DEFUN(show_mscs, |
| 551 | show_mscs_cmd, |
| 552 | "show mscs", |
| 553 | SHOW_STR "MSC Connections and State\n") |
| 554 | { |
| 555 | struct osmo_msc_data *msc; |
| 556 | llist_for_each_entry(msc, &bsc_gsmnet->bsc_data->mscs, entry) { |
| 557 | vty_out(vty, "MSC Nr: %d is connected: %d auth: %d.%s", |
| 558 | msc->nr, |
| 559 | msc->msc_con ? msc->msc_con->is_connected : -1, |
| 560 | msc->msc_con ? msc->msc_con->is_authenticated : -1, |
| 561 | VTY_NEWLINE); |
| 562 | } |
| 563 | |
| 564 | return CMD_SUCCESS; |
| 565 | } |
| 566 | |
Daniel Willmann | 7d10983 | 2012-05-14 18:43:23 +0200 | [diff] [blame] | 567 | DEFUN(show_pos, |
| 568 | show_pos_cmd, |
| 569 | "show position", |
| 570 | SHOW_STR "Position information of the BTS\n") |
| 571 | { |
| 572 | struct gsm_bts *bts; |
| 573 | struct bts_location *curloc; |
| 574 | struct tm time; |
| 575 | char timestr[50]; |
| 576 | |
| 577 | llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) { |
| 578 | if (llist_empty(&bts->loc_list)) { |
| 579 | vty_out(vty, "BTS Nr: %d position invalid%s", bts->nr, |
| 580 | VTY_NEWLINE); |
| 581 | continue; |
| 582 | } |
| 583 | curloc = llist_entry(bts->loc_list.next, struct bts_location, list); |
| 584 | if (gmtime_r(&curloc->tstamp, &time) == NULL) { |
| 585 | vty_out(vty, "Time conversion failed for BTS %d%s", bts->nr, |
| 586 | VTY_NEWLINE); |
| 587 | continue; |
| 588 | } |
| 589 | if (asctime_r(&time, timestr) == NULL) { |
| 590 | vty_out(vty, "Time conversion failed for BTS %d%s", bts->nr, |
| 591 | VTY_NEWLINE); |
| 592 | continue; |
| 593 | } |
| 594 | /* Last character in asctime is \n */ |
| 595 | timestr[strlen(timestr)-1] = 0; |
| 596 | |
| 597 | vty_out(vty, "BTS Nr: %d position: %s time: %s%s", bts->nr, |
| 598 | get_value_string(bts_loc_fix_names, curloc->valid), timestr, |
| 599 | VTY_NEWLINE); |
| 600 | vty_out(vty, " lat: %f lon: %f height: %f%s", curloc->lat, curloc->lon, |
| 601 | curloc->height, VTY_NEWLINE); |
| 602 | } |
| 603 | return CMD_SUCCESS; |
| 604 | } |
| 605 | |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 606 | int bsc_vty_init_extra(void) |
| 607 | { |
Holger Hans Peter Freyther | 06f4fc7 | 2011-03-29 17:46:14 +0200 | [diff] [blame] | 608 | install_element(CONFIG_NODE, &cfg_net_msc_cmd); |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 609 | install_element(CONFIG_NODE, &cfg_net_bsc_cmd); |
| 610 | |
| 611 | install_node(&bsc_node, config_write_bsc); |
| 612 | install_default(BSC_NODE); |
| 613 | install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd); |
| 614 | install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd); |
| 615 | install_element(BSC_NODE, &cfg_net_rf_socket_cmd); |
Holger Hans Peter Freyther | 2a89607 | 2011-08-16 19:47:39 +0200 | [diff] [blame] | 616 | install_element(BSC_NODE, &cfg_net_rf_off_time_cmd); |
| 617 | install_element(BSC_NODE, &cfg_net_no_rf_off_time_cmd); |
Holger Hans Peter Freyther | 8b902d7 | 2011-06-04 20:22:49 +0200 | [diff] [blame] | 618 | |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 619 | install_node(&msc_node, config_write_msc); |
| 620 | install_default(MSC_NODE); |
| 621 | install_element(MSC_NODE, &cfg_net_bsc_token_cmd); |
Holger Hans Peter Freyther | 4de1116 | 2010-11-03 13:12:18 +0100 | [diff] [blame] | 622 | install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd); |
Holger Hans Peter Freyther | 2a8675e | 2010-11-05 19:43:07 +0100 | [diff] [blame] | 623 | install_element(MSC_NODE, &cfg_net_bsc_mcc_cmd); |
Holger Hans Peter Freyther | fe16622 | 2010-11-03 13:32:48 +0100 | [diff] [blame] | 624 | install_element(MSC_NODE, &cfg_net_bsc_rtp_base_cmd); |
Holger Hans Peter Freyther | 7bf66c5 | 2010-11-03 13:55:49 +0100 | [diff] [blame] | 625 | install_element(MSC_NODE, &cfg_net_bsc_codec_list_cmd); |
Holger Hans Peter Freyther | e188010 | 2011-04-23 23:31:31 +0200 | [diff] [blame] | 626 | install_element(MSC_NODE, &cfg_net_msc_dest_cmd); |
| 627 | install_element(MSC_NODE, &cfg_net_msc_no_dest_cmd); |
Holger Hans Peter Freyther | 47b2601 | 2010-09-15 23:28:49 +0800 | [diff] [blame] | 628 | install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd); |
| 629 | install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd); |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 630 | install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd); |
Jacob Erlbeck | 97e139f | 2013-08-28 10:16:55 +0200 | [diff] [blame] | 631 | install_element(MSC_NODE, &cfg_net_msc_no_welcome_ussd_cmd); |
Jacob Erlbeck | 1b89402 | 2013-08-28 10:16:54 +0200 | [diff] [blame] | 632 | install_element(MSC_NODE, &cfg_net_msc_lost_ussd_cmd); |
| 633 | install_element(MSC_NODE, &cfg_net_msc_no_lost_ussd_cmd); |
Holger Hans Peter Freyther | cbaa880 | 2011-06-08 16:28:04 +0200 | [diff] [blame] | 634 | install_element(MSC_NODE, &cfg_net_msc_type_cmd); |
Holger Hans Peter Freyther | 31b245b | 2011-06-08 19:27:15 +0200 | [diff] [blame] | 635 | install_element(MSC_NODE, &cfg_net_msc_emerg_cmd); |
Holger Hans Peter Freyther | d5edc4f | 2011-06-09 21:54:08 +0200 | [diff] [blame] | 636 | install_element(MSC_NODE, &cfg_net_msc_local_prefix_cmd); |
Holger Hans Peter Freyther | 7507795 | 2011-08-06 08:31:51 +0200 | [diff] [blame] | 637 | install_element(MSC_NODE, &cfg_net_msc_amr_12_2_cmd); |
| 638 | install_element(MSC_NODE, &cfg_net_msc_amr_10_2_cmd); |
| 639 | install_element(MSC_NODE, &cfg_net_msc_amr_7_95_cmd); |
| 640 | install_element(MSC_NODE, &cfg_net_msc_amr_7_40_cmd); |
| 641 | install_element(MSC_NODE, &cfg_net_msc_amr_6_70_cmd); |
| 642 | install_element(MSC_NODE, &cfg_net_msc_amr_5_90_cmd); |
| 643 | install_element(MSC_NODE, &cfg_net_msc_amr_5_15_cmd); |
| 644 | install_element(MSC_NODE, &cfg_net_msc_amr_4_75_cmd); |
Holger Hans Peter Freyther | 8ec4952 | 2011-08-15 15:53:00 +0200 | [diff] [blame] | 645 | |
Holger Hans Peter Freyther | 286ba0e | 2011-05-03 18:12:39 +0200 | [diff] [blame] | 646 | install_element_ve(&show_statistics_cmd); |
Holger Hans Peter Freyther | c50e04a | 2011-10-20 11:06:31 +0200 | [diff] [blame] | 647 | install_element_ve(&show_mscs_cmd); |
Daniel Willmann | 7d10983 | 2012-05-14 18:43:23 +0200 | [diff] [blame] | 648 | install_element_ve(&show_pos_cmd); |
Holger Hans Peter Freyther | 286ba0e | 2011-05-03 18:12:39 +0200 | [diff] [blame] | 649 | |
Holger Hans Peter Freyther | cacbc73 | 2010-06-30 14:59:23 +0800 | [diff] [blame] | 650 | return 0; |
| 651 | } |