Am Wed, 7 Jul 2010 15:53:27 +0200
schrieb "Andreas.Eversberg" <[email protected]>:

> it seems that there is a change in the API. therefore i prepared a
> "snapshot" at www.linux-call-router.de to be downloaded. this version
> of openbsc and lcr is older, but works together. as soon as the
> current openbsc has been tested more (channel ressource handling has
> changed for example), i will make it work again. 
> 
> regards,
> 
> andreas
> 
> > #0  0x0805b009 in gsm0408_rcvmsg (msg=0x864ffb8, link_id=0 '\0') at
> openbsc/src/bsc_api.c:111
> > 111                             rc = api->compl_l3(lchan->conn, msg,
> 0);
> > 
> > The problem seems to be the variable api, which is NULL.
> > 
> > (gdb) print api
> > $1 = (struct bsc_api *) 0x0

Hi, List and Andreas!

Today I debugged your program and I found the problem.
OpenBSC, in his main(), initializes the struct bsc_api, but LCR does
NOT make it!

I wrote a patch. Here is it! Now it is possible to compile the last
version of OpenBSC and LCR (from git) and to get them together working.

Besides, the HowTo at http://openbsc.osmocom.org/trac/wiki/OpenBSC_LCR
is for a OLD version of Asterisk and LCR/OpenBSC.
1) It is not necessary to change Makefile.am and gsm_audio.c
2) The option for configure is no more --with-gsm but --with-gsm-bs
3) In extensions.conf the right syntax is:

[btsctrl]
exten => _X.,1,Set,CALLERID(num)=5552342
exten => _X.,n,Dial(LCR/GSM/${EXTEN},120)

I hope, this will help someone other trying to get OpenBSC and Asterisk
working together!

Regards
-- 
_______________________________________________________________________
Luca Bertoncello
Entwicklung                               Mail:  [email protected] 


NETZING Solutions AG                      Tel.:  0351/41381 - 0
Kesselsdorfer Str. 216, 01169 Dresden     Fax:   0351/41381 - 12
HRB 18926 / Ust.ID DE211326547            Mail:  [email protected]
_______________________________________________________________________
diff --git a/gsm_bs.cpp b/gsm_bs.cpp
index 10d1e8c..c74a22d 100644
--- a/gsm_bs.cpp
+++ b/gsm_bs.cpp
@@ -39,6 +39,9 @@ int bts_model_bs11_init(void);
 int bts_model_nanobts_init(void);
 static struct log_target *stderr_target;
 
+extern struct bsc_api *msc_bsc_api();
+extern int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
+
 /* timer to store statistics */
 #define DB_SYNC_INTERVAL	60, 0
 static struct timer_list db_sync_timer;
@@ -849,6 +852,8 @@ int gsm_bs_init(void)
 	}
 	gsm->network = bsc_gsmnet;
 
+bsc_api_init(bsc_gsmnet, msc_bsc_api());
+
 	return 0;
 }
 

Attachment: signature.asc
Description: PGP signature

Reply via email to