From patchwork Wed Jun 29 20:42:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Lennart_M=C3=BCller?= X-Patchwork-Id: 1650689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20210112 header.b=Dk4uKQCQ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.osmocom.org (client-ip=2001:780:45:1d::46:82; helo=mail.osmocom.org; envelope-from=openbsc-bounces@lists.osmocom.org; receiver=) Received: from mail.osmocom.org (mail.osmocom.org [IPv6:2001:780:45:1d::46:82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LYZr33j2Jz9s07 for ; Thu, 30 Jun 2022 20:50:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by mail.osmocom.org (Postfix) with ESMTP id 2886828054; Thu, 30 Jun 2022 10:50:49 +0000 (UTC) Received: from mail.osmocom.org ([127.0.0.1]) by localhost (mail.osmocom.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7c37IyVDzGhV; Thu, 30 Jun 2022 10:50:48 +0000 (UTC) Received: from [127.0.1.1] (unknown [IPv6:2a01:4f8:120:8470::1:7]) by mail.osmocom.org (Postfix) with ESMTP id 341E027ED1; Thu, 30 Jun 2022 10:50:47 +0000 (UTC) Received: from mail.osmocom.org (mail.osmocom.org [IPv6:2001:780:45:1d::46:82]) by lists (Postfix) with ESMTPS id 209B63960FBE for ; Wed, 29 Jun 2022 20:42:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.osmocom.org (Postfix) with ESMTP id F135428048 for ; Wed, 29 Jun 2022 20:42:56 +0000 (UTC) Received: from mail.osmocom.org ([127.0.0.1]) by localhost (mail.osmocom.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J7TnhWz_OHs3 for ; Wed, 29 Jun 2022 20:42:56 +0000 (UTC) Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by mail.osmocom.org (Postfix) with ESMTPS id 3610927ED1 for ; Wed, 29 Jun 2022 20:42:55 +0000 (UTC) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-3177f4ce3e2so160177687b3.5 for ; Wed, 29 Jun 2022 13:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=hhILLEQChlifYqQW8F9+OuqmUS348fZ/liB9eiyuFGQ=; b=Dk4uKQCQ/We9Q30b6C0jfNIHy3NhlhM+wBp0EJuzRSwFoPn2MRTGPdaN8tCThdWOaf PoPLCnZnYNR6o85rwqDdu3fq8jHUo/NRt0W3WlM8uBzijh1Z5io5GoSLzIqoCGbsNJNJ Ntd9Us20Otus3G6NTSwqZ9LovxcyTv1cVKUMS5TrfLZtY+LaGlonyIAc8lAm8Z4tifYI bSy+e448jdSkeGdWpsSxbUEfRloXZXiVygyYuBrYdYwRNgS1LEwZ79ai0bAxpG3iTqrb WobzEBAeBFSi1Qp9eVBVTbj8WFomcSWsQMF4/2wB1DVC0ypxogdJCB+Av1sR2YBclWNv m9DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hhILLEQChlifYqQW8F9+OuqmUS348fZ/liB9eiyuFGQ=; b=ni428N/esDpeM1kW9CFOa+z0PKeAMzGLcgih5C0s3wgH+Udirxh9neTzSX6eXvs9fA 5BJm0wsC+2FmCxgwr9WCkftE0FUrxcJUNAk0aKEoN7pdfdgTMEn98nXhL4K3oM6g+QpX EMDffYO5CX/piihX/jUoclNvYkZc+AxfXumy0xWI+JxCfjsGhdnmUmOTePANE7d2/SPI ZcUGpC/ONZ7dgZ/tu8d1Ylp0K9YlXQjUDQcuAjkkaFBIGhOyatp9oZDkmgXR9OOvnwIy QGNUMQ4q7Ug7LrCVxjVXacBoUS2+WJKR2CtowVCbuzk7BPATJ6IrXVz2vHdU/yGaNSft ALeg== X-Gm-Message-State: AJIora+A0j629Gxz48k9WC4+A+bVTbFdczIuFwZKFhSVTBSp4BEkrJmk SI0y443cO+mHzam4N0QDStGBnCj5ZdP3zEdKoMWEqdlcL1E= X-Google-Smtp-Source: AGRyM1vn9JQxeogj5ndCubGGiE47Y1n7MvtgJ0yJn5WuAChwYdw9d6rTu/c1dgl/AfNiYXx/2qNkEVozGqcc2mLLYDQ= X-Received: by 2002:a81:1c06:0:b0:318:27ed:8d41 with SMTP id c6-20020a811c06000000b0031827ed8d41mr5963061ywc.221.1656535374229; Wed, 29 Jun 2022 13:42:54 -0700 (PDT) MIME-Version: 1.0 From: =?utf-8?q?Lennart_M=C3=BCller?= Date: Wed, 29 Jun 2022 22:42:43 +0200 Message-ID: Subject: libosmocore/BSC/MSC: MO voice calls rejected from Siemens S11E (patch included) To: openbsc X-MailFrom: mueller.lennart@googlemail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: LUXFTGZ3KXQ5VMEZR6R5M2MMX3TMKOLI X-Message-ID-Hash: LUXFTGZ3KXQ5VMEZR6R5M2MMX3TMKOLI X-Mailman-Approved-At: Thu, 30 Jun 2022 10:50:42 +0000 X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Development of OsmoBTS, OpenBSC, OsmoBSC, OsmoNITB, OsmoMSC, OsmoMGW, OsmoSIPconnector" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi, I had a problem placing MO GSM calls from a Siemens S11E: The calls were dropped immediately; Osmo-MSC reports "Cannot compose Channel Type from bearer capabilities" After investigating the SETUP request from the S11E, the phone does not use octet 3a (no extension bit set in IE 3). Wireshark decodes the radio channel requirement as "Full rate support only MS/fullrate speech version 1 supported", so I added a condition to the gsm48_ie.c function of libosmocore to include at least GSM FR in the list of available speech_ver in case octet 3 has no extension. Attached to this message are the Abis-IP PCAP traces of MO calls, and the patch for gsm48_ie.c. Regards, Lennart diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 6d40bec4..b3e56075 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -203,16 +203,25 @@ int gsm48_decode_bearer_cap(struct gsm_mncc_bearer_cap *bcap, case GSM_MNCC_BCAP_SPEECH: i = 1; s = 0; - while(!(lv[i] & 0x80)) { - i++; /* octet 3a etc */ - if (in_len < i) - return 0; - bcap->speech_ver[s++] = lv[i] & 0x0f; + if((lv[1] & 0x80) != 0) + { + bcap->speech_ver[s++] = GSM48_BCAP_SV_FR; /* GSM FR only */ bcap->speech_ver[s] = -1; /* end of list */ - if (i == 2) /* octet 3a */ - bcap->speech_ctm = (lv[i] & 0x20) >> 5; - if (s == 7) /* maximum speech versions + end of list */ - return 0; + return 0; + } + else + { + while(!(lv[i] & 0x80)) { + i++; /* octet 3a etc */ + if (in_len < i) + return 0; + bcap->speech_ver[s++] = lv[i] & 0x0f; + bcap->speech_ver[s] = -1; /* end of list */ + if (i == 2) /* octet 3a */ + bcap->speech_ctm = (lv[i] & 0x20) >> 5; + if (s == 7) /* maximum speech versions + end of list */ + return 0; + } } break; case GSM_MNCC_BCAP_UNR_DIG: