In case we have multiple BTS attached to the same E1 line, the
e1inp_driver::line_update() function will be called multiple times,
and we need to make sure this is handled gracefully.
---
src/input/dahdi.c | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index a4dbd03..66bf53f 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -393,6 +393,10 @@ static int dahdi_e1_setup(struct e1inp_line *line)
struct osmo_fd *bfd = &e1i_ts->driver.dahdi.fd;
int dev_nr;
+ /* unregister FD if it was already registered */
+ if (bfd->list.next && bfd->list.next != LLIST_POISON1)
+ osmo_fd_unregister(bfd);
+
/* DAHDI device names/numbers just keep incrementing
* even over multiple boards. So TS1 of the second
* board will be 32 */
@@ -405,10 +409,20 @@ static int dahdi_e1_setup(struct e1inp_line *line)
switch (e1i_ts->type) {
case E1INP_TS_TYPE_NONE:
+ /* close/release LAPD instance, if any */
+ if (e1i_ts->lapd) {
+ lapd_instance_free(e1i_ts->lapd);
+ e1i_ts->lapd = NULL;
+ }
+ if (bfd->fd) {
+ close(bfd->fd);
+ bfd->fd = 0;
+ }
continue;
break;
case E1INP_TS_TYPE_SIGN:
- bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
+ if (!bfd->fd)
+ bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
if (bfd->fd == -1) {
fprintf(stderr, "%s could not open %s %s\n",
__func__, openstr, strerror(errno));
@@ -416,10 +430,17 @@ static int dahdi_e1_setup(struct e1inp_line *line)
}
bfd->when = BSC_FD_READ | BSC_FD_EXCEPT;
dahdi_set_bufinfo(bfd->fd, 1);
- e1i_ts->lapd = lapd_instance_alloc(1, dahdi_write_msg, bfd);
+ if (!e1i_ts->lapd)
+ e1i_ts->lapd = lapd_instance_alloc(1, dahdi_write_msg, bfd);
break;
case E1INP_TS_TYPE_TRAU:
- bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
+ /* close/release LAPD instance, if any */
+ if (e1i_ts->lapd) {
+ lapd_instance_free(e1i_ts->lapd);
+ e1i_ts->lapd = NULL;
+ }
+ if (!bfd->fd)
+ bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
if (bfd->fd == -1) {
fprintf(stderr, "%s could not open %s %s\n",
__func__, openstr, strerror(errno));
--
1.7.5.4
--oJ71EGRlYNjSvfq7--
Hi
We are planing to combine OpenBSC with our wifi mesh implementation in a
static setup as a demo / testbed.
We would like to implement a roaming like behavior and have actually two
approaches
1. Configuring a call forward on the phone so that it the "real"
provider forwards the call to a number that we can route into the
openBSC based network if the phone is not connected to its network. This
would allow people to call "me" eager if i connected to the "real"
network or the OpenBSC network.
Disadvantage would be that if I call somebody from the OpenBSC network
the called party would not see the number from the "real" network.
2. Use a service like sipgate one. It would also allow a unified number
for both "real" and OpenBSC network but if you call from the "real"
network it has a different number.
Besides the unlikely way of real roaming with an carrier another option
would be to fake the outgoing number. Does anybody know a service that
could be used for that (i would need to fake a german GSM number).
Does anybody know how this is handled on oil rigs or ships? Do they
have a roaming agreement ?
thanks
mfg Peter
Hi all,
I would like to test sending MMS messages to mobile devices. Out of
the box I know OpenBSC supports SMS, which I have been able to use,
however, I feel that MMS will be more tricky. My initial thoughts are
to set up OpenBSC with GPRS using this: -
http://openbsc.osmocom.org/trac/wiki/OpenBSC_GPRS
And then try to bolt some kind of MMS support on top. Before I get
started though, I was wondering if anyone had done this before and/or
had any ideas as to how I might go about implementing this.
I really would appreciate any guidance anyone could offer me.
Thanks in advance,
Simon
guys is it possible to clone comp128v2,v3 sim?
also how can we read ki of compv2,v3 sim. and if i have ki from comp126v2,v3
sim then can i make comp128v1 sim??
--
Akib Sayyed
Matrix-Shell
akibsayyed(a)gmail.com
akibsayyed(a)matrixshell.com
Mob:- +91-966-514-2243
hello guys i was wondering if we can increase range of nanoBTS for GSM. as
it is having external antenna support using power amplifier.
is it possible??
--
Akib Sayyed
Matrix-Shell
akibsayyed(a)gmail.com
akibsayyed(a)matrixshell.com
Mob:- +91-966-514-2243
Hello,
We are trying to use OpenBSC to build a few prototype services for a GSM
network.
As such, I need to know where in the code I can intercept the voice data
that is received from an MS in the BTS.
Ideally, I would like to have intercept points in the outgoing (to MS) and
incoming (from MS) at the BTS in software.
Note: I have just started to read the source code of OpenBSC, and as it is
quite extensive, a few pointers will be useful.
Feel free to correct me if I'm way off base here.
-Earlence
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
Hi Harald,
These are a couple of fixes that we have applied to openBSC
in the CCC camp. Daniel's fixes a crash, mine fixes one
malformed TCH frame issue which was the cause of quite often
unexpected closures of MNCC <-> LCR connections.
You can find them in the fixes branch.
Please, merge them.
Daniel Willmann (1):
libbsc: Don't free secondary lchan if it is NULL.
Pablo Neira Ayuso (1):
trau: fix wrong message size for GSM_TCHF_FRAME passed to MNCC
openbsc/src/libbsc/bsc_api.c | 6 +++++-
openbsc/src/libtrau/trau_mux.c | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
--
1.7.2.5