<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11918">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libmsc/VTY: introduce kill-switch for routing SMS over GSUP<br><br>As a rudiment of OsmoNiTB, OsmoMSC is still involved in SMS<br>processing, storage (in SQLite DB), and routing (via SMPP).<br>In real networks this is done by the external entity called<br>SMSC (SMS Centre), while the MSC is doing re-encapsulation<br>of GSM 04.11 SM-TL (Transport Layer) payload (i.e. TPDU)<br>between SM-RL (Relay Layer) and MAP.<br><br>Since OsmoMSC itself is not a 'Network in The Box' anymore, it<br>makes sense to replicate the 'traditional' behaviour of MSC.<br>The problem is that this behaviour cannot co-exist with the<br>current implementation, so the key idea is to rip out the<br>local SMS storage and routing from OsmoMSC, and (re)implement<br>it in a separate process (OsmoSMSC?).<br><br>As a temporary solution, this change introduces a 'kill-switch'<br>VTY option that enables routing of SMS messages over GSUP<br>towards ESME (through VLR and HLR), but breaks the local<br>storage and routing. This is why it's disabled by default.<br><br>As soon as we move the SMS processing and storage away from<br>OsmoMSC, this behaviour would be enabled by default, and<br>the VTY option would be hidden and deprecated. At the moment,<br>this option basically does nothing, and will take an effect<br>in the follow-up changes.<br><br>Change-Id: Ie57685ed2ce1e4c978e775b68fdffe58de44882b<br>Related: OS#3587<br>---<br>M include/osmocom/msc/gsm_data.h<br>M src/libmsc/msc_vty.c<br>2 files changed, 31 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/18/11918/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h</span><br><span>index 085248c..3c018b6 100644</span><br><span>--- a/include/osmocom/msc/gsm_data.h</span><br><span>+++ b/include/osmocom/msc/gsm_data.h</span><br><span>@@ -314,6 +314,14 @@</span><br><span> </span><br><span>     struct gsm_sms_queue *sms_queue;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+  /* The "SMS over GSUP" kill-switch that basically breaks internal</span><br><span style="color: hsl(120, 100%, 40%);">+    * SMS routing (i.e. SQLite DB and SMPP), and enables forwarding</span><br><span style="color: hsl(120, 100%, 40%);">+       * of short messages over GSUP towards ESME (through VLR and HLR).</span><br><span style="color: hsl(120, 100%, 40%);">+     * Please see OS#3587 for details. This is a temporary solution,</span><br><span style="color: hsl(120, 100%, 40%);">+       * so it should be removed as soon as we move the SMS processing</span><br><span style="color: hsl(120, 100%, 40%);">+       * logic to an external process (OsmoSMSC?). REMOVE ME! */</span><br><span style="color: hsl(120, 100%, 40%);">+    bool enable_sms_over_gsup;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         /* control interface */</span><br><span>      struct ctrl_handle *ctrl;</span><br><span> </span><br><span>diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c</span><br><span>index 4f3ac04..89dcd2e 100644</span><br><span>--- a/src/libmsc/msc_vty.c</span><br><span>+++ b/src/libmsc/msc_vty.c</span><br><span>@@ -431,6 +431,24 @@</span><br><span>    return CMD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* TODO: to be deprecated as soon as we rip SMS handling out (see OS#3587) */</span><br><span style="color: hsl(120, 100%, 40%);">+DEFUN(cfg_msc_sms_over_gsup, cfg_msc_sms_over_gsup_cmd,</span><br><span style="color: hsl(120, 100%, 40%);">+      "sms-over-gsup",</span><br><span style="color: hsl(120, 100%, 40%);">+      "Enable routing of SMS messages over GSUP\n")</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      gsmnet->enable_sms_over_gsup = true;</span><br><span style="color: hsl(120, 100%, 40%);">+       return CMD_SUCCESS;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* TODO: to be deprecated as soon as we rip SMS handling out (see OS#3587) */</span><br><span style="color: hsl(120, 100%, 40%);">+DEFUN(cfg_msc_no_sms_over_gsup, cfg_msc_no_sms_over_gsup_cmd,</span><br><span style="color: hsl(120, 100%, 40%);">+      "no sms-over-gsup",</span><br><span style="color: hsl(120, 100%, 40%);">+      NO_STR "Disable routing of SMS messages over GSUP\n")</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ gsmnet->enable_sms_over_gsup = false;</span><br><span style="color: hsl(120, 100%, 40%);">+      return CMD_SUCCESS;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static int config_write_msc(struct vty *vty)</span><br><span> {</span><br><span>        vty_out(vty, "msc%s", VTY_NEWLINE);</span><br><span>@@ -462,6 +480,9 @@</span><br><span>                  gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (gsmnet->enable_sms_over_gsup)</span><br><span style="color: hsl(120, 100%, 40%);">+          vty_out(vty, " sms-over-gsup%s", VTY_NEWLINE);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   mgcp_client_config_write(vty, " ");</span><br><span> #ifdef BUILD_IU</span><br><span>     ranap_iu_vty_config_write(vty, " ");</span><br><span>@@ -1451,6 +1472,8 @@</span><br><span>       install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd);</span><br><span>         install_element(MSC_NODE, &cfg_msc_paging_response_timer_cmd);</span><br><span>   install_element(MSC_NODE, &cfg_msc_emergency_msisdn_cmd);</span><br><span style="color: hsl(120, 100%, 40%);">+ install_element(MSC_NODE, &cfg_msc_sms_over_gsup_cmd);</span><br><span style="color: hsl(120, 100%, 40%);">+    install_element(MSC_NODE, &cfg_msc_no_sms_over_gsup_cmd);</span><br><span> </span><br><span>    mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf);</span><br><span> #ifdef BUILD_IU</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11918">change 11918</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11918"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ie57685ed2ce1e4c978e775b68fdffe58de44882b </div>
<div style="display:none"> Gerrit-Change-Number: 11918 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>