aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-11-05 14:54:56 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-04-16 09:17:21 +0200
commitc327187259d74cf260c977f165963778de4bedb1 (patch)
tree1072aaa6f04f075261636f964e1ecb314a402fee /openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
parent77956aa034a7ac5ddfdf91c7341d3bf82cb07367 (diff)
nat: Make it possible to send MGCP messages through the IPA multiplex
Instead of handling MGCP through the UDP socket, read and write messages through the ipa connection to the MSC.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index 7bbc89059..32e5106ae 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -143,6 +143,8 @@ static int config_write_nat(struct vty *vty)
write_acc_lst(vty, lst);
llist_for_each_entry(pgroup, &_nat->paging_groups, entry)
write_pgroup_lst(vty, pgroup);
+ if (_nat->mgcp_ipa)
+ vty_out(vty, " mgcp-through-msc-ipa%s", VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -657,6 +659,20 @@ DEFUN(cfg_nat_ussd_local,
return CMD_SUCCESS;
}
+DEFUN(cfg_nat_mgcp_ipa,
+ cfg_nat_mgcp_ipa_cmd,
+ "mgcp-through-msc-ipa",
+ "This needs to be set at start. Handle MGCP messages through "
+ "the IPA protocol and not through the UDP socket.\n")
+{
+ if (_nat->mgcp_cfg->data)
+ vty_out(vty,
+ "%%the setting will not be applied right now.%s",
+ VTY_NEWLINE);
+ _nat->mgcp_ipa = 1;
+ return CMD_SUCCESS;
+}
+
/* per BSC configuration */
DEFUN(cfg_bsc, cfg_bsc_cmd, "bsc BSC_NR",
"BSC configuration\n" "Identifier of the BSC\n")
@@ -1086,6 +1102,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_element(NAT_NODE, &cfg_nat_ussd_query_cmd);
install_element(NAT_NODE, &cfg_nat_ussd_token_cmd);
install_element(NAT_NODE, &cfg_nat_ussd_local_cmd);
+ install_element(NAT_NODE, &cfg_nat_mgcp_ipa_cmd);
/* access-list */
install_element(NAT_NODE, &cfg_lst_imsi_allow_cmd);