nt2mku has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/36784?usp=email )


Change subject: Omit octet 3a in mobile-terminating setup requests if speech 
version is GSM-FR only
......................................................................

Omit octet 3a in mobile-terminating setup requests if speech version is GSM-FR 
only

Some early GSM phones (like the Siemens P1 Porty) do not accept a 
mobile-terminating call setup if octet 3a is present. If speech version is 
GSM-FR (v1, 0x00) only, omit octet 3a.

Change-Id: Ia09abb32a8458384151a6ae28744835ea440fc5b
---
M src/gsm/gsm48_ie.c
1 file changed, 19 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/36784/1

diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index b95609f..0d938d4 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -327,11 +327,14 @@

        switch (bcap->transfer) {
        case GSM_MNCC_BCAP_SPEECH:
-               for (s = 0; bcap->speech_ver[s] >= 0; s++) {
-                       i++; /* octet 3a etc */
-                       lv[i] = bcap->speech_ver[s];
-                       if (i == 2) /* octet 3a */
-                               lv[i] |= bcap->speech_ctm << 5;
+               /* if we have only one speech version, which is FR, skip octet 
3a */
+               if(bcap->speech_ver[1] >= 0 || (bcap->speech_ver[0] & 0x0f) != 
0x00) {
+                       for (s = 0; bcap->speech_ver[s] >= 0; s++) {
+                               i++; /* octet 3a etc */
+                               lv[i] = bcap->speech_ver[s];
+                               if (i == 2) /* octet 3a */
+                                       lv[i] |= bcap->speech_ctm << 5;
+                       }
                }
                lv[i] |= 0x80; /* last IE of octet 3 etc */
                break;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36784?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia09abb32a8458384151a6ae28744835ea440fc5b
Gerrit-Change-Number: 36784
Gerrit-PatchSet: 1
Gerrit-Owner: nt2mku <[email protected]>
Gerrit-MessageType: newchange

Reply via email to