Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9317 )

Change subject: vty: Permit selection of other ASP protocol than M3UA
......................................................................

vty: Permit selection of other ASP protocol than M3UA

We used to have hard-coded M3UA.  Let's allow the user to configure
this per MSC using a new "asp-protocol (m3ua|sua|ipa)" VTY command.

For SUA this should just work 1:1 without any trouble.  For IPA,
this of course only changes the underlying transport without reflecting
the various differences in terms of BSSMAP ASSIGNMENT, MGCP handling,
etc.

Change-Id: I0800c709e574cedd7f5dd98be81c78782245cd13
Related: OS#2544
---
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
4 files changed, 21 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index 345724d..c69a9ca 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -110,6 +110,9 @@
                struct osmo_sccp_instance *sccp;
                struct osmo_sccp_user *sccp_user;

+               /* IPA or M3UA or SUA? */
+               enum osmo_ss7_asp_protocol asp_proto;
+
                /* Holds a copy of the our local MSC address,
                 * this will be the sccp-address that is associated
                 * with the A interface of this particular BSC,
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index e9309ea..612a00b 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -98,6 +98,7 @@

        msc_data->nr = nr;
        msc_data->allow_emerg = 1;
+       msc_data->a.asp_proto = OSMO_SS7_ASP_PROT_M3UA;

        /* Defaults for the audio setup */
        msc_data->amr_conf.m5_90 = 1;
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index e3d4829..2c3507d 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -447,7 +447,7 @@
                default_pc = osmo_ss7_pointcode_parse(NULL, BSC_DEFAULT_PC);
                msc->a.sccp =
                    osmo_sccp_simple_client_on_ss7_id(msc, msc->a.cs7_instance, 
msc_name, default_pc,
-                                                     OSMO_SS7_ASP_PROT_M3UA, 
0, NULL, 0, NULL);
+                                                     msc->a.asp_proto, 0, 
NULL, 0, NULL);
                if (!msc->a.sccp)
                        return -EINVAL;

diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 36c3223..bda89c1 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -181,6 +181,7 @@
                vty_out(vty, " msc-addr %s%s",
                        msc->a.msc_addr_name, VTY_NEWLINE);
        }
+       vty_out(vty, " asp-protocol %s%s", 
osmo_ss7_asp_protocol_name(msc->a.asp_proto), VTY_NEWLINE);

        /* write MGW configuration */
        mgcp_client_config_write(vty, " ");
@@ -672,6 +673,20 @@
        return CMD_SUCCESS;
 }

+DEFUN(cfg_msc_cs7_asp_proto,
+      cfg_msc_cs7_asp_proto_cmd,
+      "asp-protocol (m3ua|sua|ipa)",
+      "A interface protocol to use for this MSC)\n"
+      "MTP3 User Adaptation\n"
+      "SCCP User Adaptation\n"
+      "IPA Multiplex (SCCP Lite)\n")
+{
+       struct bsc_msc_data *msc = bsc_msc_data(vty);
+
+       msc->a.asp_proto = get_string_value(osmo_ss7_asp_protocol_vals, 
argv[0]);
+       return CMD_SUCCESS;
+}
+
 DEFUN(cfg_net_bsc_mid_call_text,
       cfg_net_bsc_mid_call_text_cmd,
       "mid-call-text .TEXT",
@@ -951,6 +966,7 @@
        install_element(MSC_NODE, &cfg_msc_no_acc_lst_name_cmd);
        install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd);
        install_element(MSC_NODE, &cfg_msc_cs7_msc_addr_cmd);
+       install_element(MSC_NODE, &cfg_msc_cs7_asp_proto_cmd);

        /* Deprecated: ping time config, kept to support legacy config files. */
        install_element(MSC_NODE, &cfg_net_msc_no_ping_time_cmd);

--
To view, visit https://gerrit.osmocom.org/9317
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0800c709e574cedd7f5dd98be81c78782245cd13
Gerrit-Change-Number: 9317
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to