Hello,
since some days I'm using an old version of OpenBSC and LCR (as suggested by University of Freiburg) to interconnect our GSM and PSTN. We are using Debian squeeze and a nanoBTS. However, I would like to upgrade to a newer version of OpenBSC. Unfortunately, no current LCR version compiles without errors such as missing declarations etc., for example:
g++ -DHAVE_CONFIG_H -I. -DWITH_GSM_BS -I./openbsc/include -I./libosmocore/include -I./openbsc -Wall -DCONFIG_DATA=""/usr/local/lcr"" -DSHARE_DATA=""/usr/local/lcr"" -DLOG_DIR=""/usr/local/lcr"" -DEXTENSION_DATA=""/usr/local/lcr/extensions"" -g -O2 -MT gsm.o -MD -MP -MF .deps/gsm.Tpo -c -o gsm.o gsm.cpp In file included from ./openbsc/include/openbsc/rest_octets.h:4, from ./openbsc/include/openbsc/gsm_data.h:9, from gsm_bs.h:2, from main.h:157, from gsm.cpp:12: ./openbsc/include/openbsc/gsm_04_08.h:33: error: use of enum ‘gsm_chan_t’ without previous declaration ./openbsc/include/openbsc/gsm_04_08.h:33: error: invalid type in declaration before ‘;’ token ./openbsc/include/openbsc/gsm_04_08.h:34: error: use of enum ‘gsm_chreq_reason_t’ without previous declaration ./openbsc/include/openbsc/gsm_04_08.h:34: error: invalid type in declaration before ‘;’ token In file included from ./openbsc/include/openbsc/gsm_data_shared.h:11, from ./openbsc/include/openbsc/gsm_data.h:154, from gsm_bs.h:2, from main.h:157, from gsm.cpp:12: ./libosmocore/include/osmocom/gsm/gsm_utils.h:62: error: expected identifier before ‘)’ token ./libosmocore/include/osmocom/gsm/gsm_utils.h:62: error: two or more data types in declaration of ‘parameter’ gsm.cpp: In function ‘gsm_mncc* create_mncc(int, unsigned int)’: gsm.cpp:195: error: invalid application of ‘sizeof’ to incomplete type ‘gsm_mncc’
etc. etc.
If I manually include some header files from libosmocore and OpenBSC to LCR and declare missing ENUMs (dirty hacks), LCR starts without a problem. Starting osmo-nitb with -P and -m parameters, LCR can connect to MNCC socket. But any try to start voice traffic either from or to a mobile station results into these continuous messages:
<0006> gsm_04_08.c:2954 receive message GSM_TCH_FRAME <0006> gsm_04_08.c:2986 TCH frame to lchan without RTP connection <0006> gsm_04_08.c:2954 receive message GSM_TCH_FRAME <0006> gsm_04_08.c:2986 TCH frame to lchan without RTP connection <0006> gsm_04_08.c:2954 receive message GSM_TCH_FRAME <0006> gsm_04_08.c:2986 TCH frame to lchan without RTP connection .....
Furthermore, either OpenBSC ignores LCR messages or LCR does not send messages to OpenBSC, because calls from mobile stations are signalled through LCR to asterisk; calls from asterisk to a mobile station are indicated by LCR but not by OpenBSC.
All configuration files of the running setup (openbsc.cfg, LCR files) are used. Commits... - LCR: 39a36cb99a6dba1441a7a4b51914e0dadf3a7ae8 - libosmocore: 95f7eb288c4b8b69d61fa8d68957fb21f09e11e5 - OpenBSC: fe2d9b2fab2ae36a12411435f910efc9697d7b18 (debian branch, but same problem with master)
Is there really no possibility at the moment to run LCR with a current OpenBSC?
Many thanks in advance, Lennart
Hi Lennart,
On Sat, Jul 23, 2011 at 02:19:52AM +0200, Lennart Müller wrote:
since some days I'm using an old version of OpenBSC and LCR (as suggested by University of Freiburg) to interconnect our GSM and PSTN. We are using Debian squeeze and a nanoBTS. However, I would like to upgrade to a newer version of OpenBSC.
Unfortunately, no current LCR version compiles without errors such as missing declarations etc., for example:
I've committed some changes a couple of minutes ago (to libosmocore + openbsc) that make lcr compile again.
The only missing part is one minor change to lcr:
diff --git a/gsm_bs.h b/gsm_bs.h index 8a55213..45bf083 100644 --- a/gsm_bs.h +++ b/gsm_bs.h @@ -1,5 +1,6 @@ extern "C" { #include <openbsc/gsm_data.h> +#include <openbsc/mncc.h> }
/* GSM port class */
Starting osmo-nitb with -P and -m parameters, LCR can connect to MNCC socket. But any try to start voice traffic either from or to a mobile station results into these continuous messages:
I will try to look into it, but I'm not sure when I find time to do so, there are lots of other issues on my todo list pending at the moment.
Hi Harald,
2011/7/23 Harald Welte laforge@gnumonks.org
I've committed some changes a couple of minutes ago (to libosmocore + openbsc) that make lcr compile again.
The only missing part is one minor change to lcr:
diff --git a/gsm_bs.h b/gsm_bs.h index 8a55213..45bf083 100644 --- a/gsm_bs.h +++ b/gsm_bs.h @@ -1,5 +1,6 @@ extern "C" { #include <openbsc/gsm_data.h> +#include <openbsc/mncc.h> }
/* GSM port class */
Compiles now, thanks!
Starting osmo-nitb with -P and -m parameters, LCR can connect to MNCC socket. But any try to start voice traffic either from or to a mobile station results into these continuous messages:
I will try to look into it, but I'm not sure when I find time to do so, there are lots of other issues on my todo list pending at the moment.
Okay, I see.
It works now, I traced down the problem to LCR. The file gsm.cpp contains following function at line 200:
int send_and_free_mncc(void *instance, unsigned int msg_type, void *data)
There is an if-Query: if (instance) { #ifdef WITH_GSM_BS ret = mncc_send((struct gsm_network *)instance, msg_type, data); #endif #ifdef WITH_GSM_MS ret = mncc_send((struct osmocom_ms *)instance, msg_type, data); #endif }
The problem is: The query is always false, so no messages are sent to OpenBSC. If I comment out the if-query, everything works as expected: Calls can be made mobile originated and mobile terminated. However, I don't think the if-query is there without a reason.
Within gsm_bs.cpp, send_and_free_mncc is called with parameter p_m_g_instance, which is written at Line 64:
p_m_g_instance = gsm->network;
-- Lennart