aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libmgcp/mgcp_vty.c14
-rw-r--r--openbsc/src/osmo-bsc_mgcp/mgcp_main.c2
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c1
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c3
4 files changed, 18 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index d5908f3c8..23207df47 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -604,6 +604,16 @@ DEFUN(cfg_mgcp_loop,
return CMD_SUCCESS;
}
+DEFUN(cfg_mgcp_force_realloc,
+ cfg_mgcp_force_realloc_cmd,
+ "force-realloc (0|1)",
+ "Force endpoint reallocation when the endpoint is still seized\n"
+ "Don't force reallocation\n" "force reallocation\n")
+{
+ g_cfg->trunk.force_realloc = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_mgcp_number_endp,
cfg_mgcp_number_endp_cmd,
"number endpoints <0-65534>",
@@ -816,9 +826,10 @@ static int config_write_trunk(struct vty *vty)
trunk->keepalive_interval, VTY_NEWLINE);
else
vty_out(vty, " no rtp keep-alive%s", VTY_NEWLINE);
-
vty_out(vty, " loop %d%s",
trunk->audio_loop, VTY_NEWLINE);
+ vty_out(vty, " force-realloc %d%s",
+ trunk->force_realloc, VTY_NEWLINE);
if (trunk->omit_rtcp)
vty_out(vty, " rtcp-omit%s", VTY_NEWLINE);
else
@@ -1448,6 +1459,7 @@ int mgcp_vty_init(void)
install_element(MGCP_NODE, &cfg_mgcp_sdp_payload_number_cmd_old);
install_element(MGCP_NODE, &cfg_mgcp_sdp_payload_name_cmd_old);
install_element(MGCP_NODE, &cfg_mgcp_loop_cmd);
+ install_element(MGCP_NODE, &cfg_mgcp_force_realloc_cmd);
install_element(MGCP_NODE, &cfg_mgcp_number_endp_cmd);
install_element(MGCP_NODE, &cfg_mgcp_omit_rtcp_cmd);
install_element(MGCP_NODE, &cfg_mgcp_no_omit_rtcp_cmd);
diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
index 4ea070079..6cf9ab786 100644
--- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
+++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
@@ -218,6 +218,8 @@ int main(int argc, char **argv)
cfg->get_net_downlink_format_cb = &mgcp_transcoding_net_downlink_format;
#endif
+ cfg->trunk.force_realloc = 1;
+
vty_info.copyright = openbsc_copyright;
vty_init(&vty_info);
logging_vty_add_cmds(NULL);
diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 8cf4e9427..986306c14 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -1111,7 +1111,6 @@ int bsc_mgcp_nat_init(struct bsc_nat *nat)
/* some more MGCP config handling */
cfg->data = nat;
cfg->policy_cb = bsc_mgcp_policy_cb;
- cfg->trunk.force_realloc = 1;
if (cfg->bts_ip)
talloc_free(cfg->bts_ip);
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 05597588f..45f53bcef 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1652,6 +1652,9 @@ int main(int argc, char **argv)
rate_ctr_init(tall_bsc_ctx);
osmo_stats_init(tall_bsc_ctx);
+ /* Ensure that forced enpoint allocation is turned on by default */
+ nat->mgcp_cfg->trunk.force_realloc = 1;
+
/* init vty and parse */
if (mgcp_parse_config(config_file, nat->mgcp_cfg, MGCP_BSC_NAT) < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);