<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13892">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: make retrieve-imeisv-early configurable<br><br>Prepare for Rhizomatica's subscriber on demand use case, in which the<br>network access is disabled by default for new subscribers, but the IMEI<br>is required in the HLR to find out which user has which IMSI. Due to the<br>network access being disabled, the location update fails and the MS gets<br>rejected, so we need to get the IMEI early.<br><br>The OsmoHLR documentation referenced in the code will be added in<br>osmo-hlr.git's Change-Id I2dd4a56f7b8be8b5d0e6fc32e04459e5e278d0a9.<br><br>Related: OS#2542<br>Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f<br>---<br>M src/libmsc/msc_vty.c<br>M tests/test_nodes.vty<br>2 files changed, 19 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/92/13892/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c</span><br><span>index 9bc8f3a..cce8aac 100644</span><br><span>--- a/src/libmsc/msc_vty.c</span><br><span>+++ b/src/libmsc/msc_vty.c</span><br><span>@@ -460,6 +460,19 @@</span><br><span>         return CMD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+DEFUN(cfg_msc_retrieve_imeisv_early, cfg_msc_retrieve_imeisv_early_cmd,</span><br><span style="color: hsl(120, 100%, 40%);">+      "retrieve-imeisv-early (0|1)",</span><br><span style="color: hsl(120, 100%, 40%);">+      "Retrieve the IMEISV from the MS before doing the location update. In combination with other MSC and HLR"</span><br><span style="color: hsl(120, 100%, 40%);">+      " configuration, this allows sending the IMEI to the HLR, even if the MS would get rejected in the location"</span><br><span style="color: hsl(120, 100%, 40%);">+      " update. To set this up with OsmoHLR, see the \"Configuring the Subscribers Create on Demand Feature\" section"</span><br><span style="color: hsl(120, 100%, 40%);">+      " of the OsmoHLR user manual.\n"</span><br><span style="color: hsl(120, 100%, 40%);">+      "Retrieve IMEISV before location update\n"</span><br><span style="color: hsl(120, 100%, 40%);">+      "Do not retrieve IMEISV before location update\n")</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       gsmnet->vlr->cfg.retrieve_imeisv_early = atoi(argv[0]) ? true : 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> DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd,</span><br><span>       "paging response-timer (default|<1-65535>)",</span><br><span>       "Configure Paging\n"</span><br><span>@@ -535,6 +548,10 @@</span><br><span>             vty_out(vty, " check-imei-rqd 1 %s",</span><br><span>                       VTY_NEWLINE);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     if (gsmnet->vlr->cfg.retrieve_imeisv_early)</span><br><span style="color: hsl(120, 100%, 40%);">+             vty_out(vty, " retrieve-imeisv-early 1 %s",</span><br><span style="color: hsl(120, 100%, 40%);">+                 VTY_NEWLINE);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT)</span><br><span>           vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE);</span><br><span> </span><br><span>@@ -1686,6 +1703,7 @@</span><br><span>    install_element(MSC_NODE, &cfg_msc_auth_tuple_max_reuse_count_cmd);</span><br><span>      install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd);</span><br><span>       install_element(MSC_NODE, &cfg_msc_check_imei_rqd_cmd);</span><br><span style="color: hsl(120, 100%, 40%);">+   install_element(MSC_NODE, &cfg_msc_retrieve_imeisv_early_cmd);</span><br><span>   install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd);</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>diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty</span><br><span>index 8aceb86..7996ace 100644</span><br><span>--- a/tests/test_nodes.vty</span><br><span>+++ b/tests/test_nodes.vty</span><br><span>@@ -39,6 +39,7 @@</span><br><span>   auth-tuple-max-reuse-count <-1-2147483647></span><br><span>   auth-tuple-reuse-on-error (0|1)</span><br><span>   check-imei-rqd (0|1)</span><br><span style="color: hsl(120, 100%, 40%);">+  retrieve-imeisv-early (0|1)</span><br><span>   cs7-instance-a <0-15></span><br><span>   cs7-instance-iu <0-15></span><br><span>   paging response-timer (default|<1-65535>)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13892">change 13892</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/13892"/><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: I256224194c3b8caf2b58a88d11dccd32c569201f </div>
<div style="display:none"> Gerrit-Change-Number: 13892 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>