https://osmocom.org/https://osmocom.org/favicon.ico?16647414092018-11-30T07:30:14ZOpen Source Mobile CommunicationsOsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=127992018-11-30T07:30:14Zlaforge
<ul></ul><p>On Thu, Nov 29, 2018 at 11:47:38PM +0000, fixeria [REDMINE] wrote:</p>
<blockquote>
<p>It seems to be normal to use SACCH instead of FACCH for SMS during a voice call.</p>
</blockquote>
<p>I think it's even a clear requirement in the spec to do so.</p>
<blockquote>
<p>It is supported in OpenBSC, because the information about RAN connection is easily<br />available there, but OsmoMSC has no access to this information (yet?), so FACCH is used.</p>
<p>See paging_cb_mmsms_est_req() in 'src/libmsc/gsm_04_11.c':</p>
<pre>
> /* FIXME: specify SACCH in case we already have active TCH */
> trans->dlci = 0x03;
> </pre>
<p>We should detect somehow if a subscriber has an active TCH connection, and use SACCH.</p>
</blockquote>
<p>Actually, I think it would be rather odd if we even went through the paging code if we know<br />there's already a connection.</p>
<p>In fact, shouldn't gsm411_mmsms_est_req() detect that there's already asubscr_conn, and only ever<br />call subscr_request_conn() and hence trigger a paging request if there is no pre-existing<br />connection?</p>
<p>We currently check for "if (trans->conn != NULL)", which is true if gsm411_alloc_mt_trans()<br />detects the subscriber already has an active connection. When gsm411_mmsms_est_req() is<br />then executed, we should go into the "if (trans->conn != NULL)" clause and never end up<br />hitting the code path you describe?</p>
<blockquote>
<p>We can also make this feature configurable from the VTY.</p>
</blockquote>
<p>no. We should always send any SMS over SAPI3 on the SACCH if a TCH is active. Please<br />note that prioritization of SAPI 0 (signalling) over SAPI 3 (SMS) is also important<br />to handle correctly here. Not sure if we do that properly.</p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=128002018-11-30T10:59:02Zfixeria
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>fixeria</i></li></ul><blockquote>
<p>I think it's even a clear requirement in the spec to do so.<br />We should always send any SMS over SAPI3 on the SACCH if a TCH is active.</p>
</blockquote>
<p>Ok, I found it: GSM TS 04.11, sections 2.2-2.3.</p>
<blockquote>
<p>Actually, I think it would be rather odd if we even went through<br />the paging code if we know there's already a connection.</p>
</blockquote>
<p>But what if BSC would allocate a TCH channel (e.g. due to SDCCH congestion)?<br />Should we consider this case?</p>
<blockquote>
<p>Please note that prioritization of SAPI 0 (signalling) over SAPI 3 (SMS)<br />is also important to handle correctly here. Not sure if we do that properly.</p>
</blockquote>
<p>Where should I look to verify this?</p>
<p>Thanks for your notes!</p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=128012018-11-30T12:55:51Zfixeria
<ul></ul><p>The situation is even more complicated than I initially thought.</p>
<p>First of all, I've introduced a regression during the recent refactoring.<br />Here is a fix: <a class="external" href="https://gerrit.osmocom.org/#/c/osmo-msc/+/12043/">https://gerrit.osmocom.org/#/c/osmo-msc/+/12043/</a></p>
<p>Also, I think this is a task of the BSC/BTS to decide, which lchan to use,<br />i.e. SDCCH or SACCH. Why should the MSC care about that?</p>
<p>Finally, I just tested a MT SMS transfer (initiated from the VTY) during<br />a voice call between two (not virtual, physical) phones with the fix applied.</p>
<p>Please check out the BSSAP/RSL/LAPDm capture attached:</p>
<p>Frame #76: (BSSAP, <strong>SAPI=0x03</strong>) MSC initiates MT SMS transfer (CP-/RP-DATA)<br />Frame #78: (RSL, <strong>SAPI=0x00</strong>, C-bits: Bm + ACCH) BSC forwards CP-/RP-DATA to the BTS<br />Frame #83: (LAPDm, <strong>SAPI=0x00</strong>, FACCH/F) BTS transmits 2nd (final) fragment of CP-/RP-DATA to the MS</p>
<p>Frame #96: (LAPDm, SAPI=0x03, SACCH/F) MS responds with CP-ACK to the BTS<br />Frame #97: (RSL, SAPI=0x03, C-bits: Bm + ACCH) BTS forwards CP-ACK to the BSC<br />Frame #98: (BSSAP, SAPI=0x03) BSC forwards CP-ACK to the MSC</p>
<p>Frame #123: (LAPDm, SAPI=0x03, SACCH/F) MS responds with CP-DATA/RP-ACK to the BTS<br />Frame #124: (RSL, SAPI=0x03, C-bits: Bm + ACCH) BTS forwards CP-DATA/RP-ACK to the BSC<br />Frame #125: (BSSAP, SAPI=0x03) BSC forwards CP-DATA/RP-ACK to the MSC</p>
<p>Frame #127: (BSSAP, <strong>SAPI=0x03</strong>) MSC responds with CP-ACK<br />Frame #129: (RSL, <strong>SAPI=0x00</strong>, C-bits: Bm + ACCH) BSC forwards CP-ACK to the BTS<br />Frame #130: (LAPDm, <strong>SAPI=0x00</strong>, FACCH/F) BTS transmits CP-ACK to the MS</p>
<p>As you can see, during MT message transfer (MSC -> BSC -> BTS -> MS),<br /><strong>OsmoBSC does mangle SAPI value</strong>. As a result, the MT transfer happens<br />on FACCH/F, while the MO transfer happens on SACCH/F. Such a mix!</p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=128022018-11-30T12:56:34Zfixeria
<ul><li><strong>File</strong> <a href="/attachments/3467">mt_sms_bssap_rsl_lapdm.pcapng.gz</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3467/mt_sms_bssap_rsl_lapdm.pcapng.gz">mt_sms_bssap_rsl_lapdm.pcapng.gz</a> added</li></ul> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=128042018-12-01T15:26:45Zfixeria
<ul><li><strong>Project</strong> changed from <i>OsmoMSC</i> to <i>OsmoBSC</i></li><li><strong>Subject</strong> changed from <i>Use SACCH for MO/MT SMS during a voice call</i> to <i>Use SACCH for MO/MT SMS signalling during a voice call</i></li><li><strong>Category</strong> changed from <i>SMS</i> to <i>A interface</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>High</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul><p>It turns out the problem was in OsmoBSC, not in OsmoMSC. Please see:</p>
<p><a class="external" href="https://gerrit.osmocom.org/#/c/osmo-bsc/+/12053">https://gerrit.osmocom.org/#/c/osmo-bsc/+/12053</a></p>
<p>With this change applied, the whole signalling goes through SACCH, as expected.<br />Manually tested with two (physical, not virtual) phones and osmo-bts-trx.</p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=128052018-12-01T20:31:33Zfixeria
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>Both patches have been merged, SMS goes over SACCH now.</p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=128062018-12-02T09:54:50Zfixeria
<ul><li><strong>Tracker</strong> changed from <i>Feature</i> to <i>Bug</i></li><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Stalled</i></li><li><strong>Assignee</strong> deleted (<del><i>fixeria</i></del>)</li><li><strong>Priority</strong> changed from <i>High</i> to <i>Low</i></li><li><strong>% Done</strong> changed from <i>100</i> to <i>80</i></li></ul><p>We still need a test case that should basically:</p>
<p>1) establish a dedicated TCH channel,<br />2) send a few messages on SAPI0 and make sure they appear on FACCH,<br />3) send a few messages on SAPI3 and make sure they appear on SACCH.</p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=143052019-05-08T15:35:24Zlaforge
<ul><li><strong>Assignee</strong> set to <i>fixeria</i></li></ul> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=197612020-09-30T20:07:44Zfixeria
<ul><li><strong>Status</strong> changed from <i>Stalled</i> to <i>In Progress</i></li></ul> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=197942020-10-01T16:49:22Zfixeria
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>80</i> to <i>100</i></li></ul><p>I finally came up with a test case:</p>
<p><a class="external" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20385">https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20385</a> BSC_Tests: introduce TC_tch_dlci_link_id_sapi for OS#3716</p>
<p>this test case depends on the following misc/cosmetic changes:</p>
<p><a class="external" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20382">https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20382</a> BSC_Tests: s/f_verify_active_layer3/f_mo_l3_transceive/g<br /><a class="external" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20383">https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20383</a> BSC_Tests: parametrize f_mo_l3_transceive()<br /><a class="external" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20384">https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20384</a> BSC_Tests: introduce f_mt_l3_transceive() sending BSSAP -> RSL</p>
<p>Of course, it reveals some problems in osmo-bsc: we cannot assign RSL Link ID to DLCI and vice versa, we need to convert:</p>
<p><a class="external" href="https://gerrit.osmocom.org/c/osmo-bsc/+/20386">https://gerrit.osmocom.org/c/osmo-bsc/+/20386</a> RSL/BSSAP: fix: properly convert between RSL Link ID and DLCI</p>
<p>and dissection problems in Wireshark:</p>
<p><a class="external" href="https://gitlab.com/wireshark/wireshark/-/merge_requests/458/diffs?commit_id=9cef4e36294b3003c37b5369785e0105538573df">https://gitlab.com/wireshark/wireshark/-/merge_requests/458/diffs?commit_id=9cef4e36294b3003c37b5369785e0105538573df</a></p> OsmoBSC - Bug #3716: Use SACCH for MO/MT SMS signalling during a voice callhttps://osmocom.org/issues/3716?journal_id=198002020-10-03T07:22:50Zfixeria
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul>