Currently the field nsvci_is_valid is set to 0 in the NSVC object
returned by gprs_nsvc_create(). This was a semantic change probably
introduced by commit 5e6d679d. As a result, NSVC created via the VTY
have this flag set to 0 causing RESET_ACK messages to be rejected.
This patch changes the default behaviour of gprs_nsvc_create() to
always set this flag. So it must be set to 0 explicitely if needed
which is more intuitive and thus less error prone.
It fixes breaking connections from the Gbproxy to the SGSN.
Ticket: OW#874
Sponsored-by: On-Waves ehf
---
src/gb/gprs_ns.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 55535ad..b500d9a 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -200,6 +200,7 @@ struct gprs_nsvc *gprs_nsvc_create(struct gprs_ns_inst *nsi, uint16_t nsvci)
nsvc = talloc_zero(nsi, struct gprs_nsvc);
nsvc->nsvci = nsvci;
+ nsvc->nsvci_is_valid = 1;
/* before RESET procedure: BLOCKED and DEAD */
nsvc->state = NSE_S_BLOCKED;
nsvc->nsi = nsi;
@@ -794,7 +795,6 @@ static int gprs_ns_rx_reset(struct gprs_nsvc **nsvc, struct msgb *msg)
gprs_ns_ll_str(*nsvc));
orig_nsvc = *nsvc;
*nsvc = gprs_nsvc_create((*nsvc)->nsi, nsvci);
- (*nsvc)->nsvci_is_valid = 1;
(*nsvc)->nsei = nsei;
}
}
@@ -1193,6 +1193,7 @@ int gprs_ns_vc_create(struct gprs_ns_inst *nsi, struct msgb *msg,
existing_nsvc = gprs_nsvc_by_nsvci(nsi, nsvci);
if (!existing_nsvc) {
*new_nsvc = gprs_nsvc_create(nsi, 0xffff);
+ (*new_nsvc)->nsvci_is_valid = 0;
log_set_context(GPRS_CTX_NSVC, *new_nsvc);
gprs_ns_ll_copy(*new_nsvc, fallback_nsvc);
LOGP(DNS, LOGL_INFO, "Creating NS-VC for BSS at %s\n",
@@ -1327,6 +1328,7 @@ struct gprs_ns_inst *gprs_ns_instantiate(gprs_ns_cb_t *cb, void *ctx)
/* Create the dummy NSVC that we use for sending
* messages to non-existant/unknown NS-VC's */
nsi->unknown_nsvc = gprs_nsvc_create(nsi, 0xfffe);
+ nsi->unknown_nsvc->nsvci_is_valid = 0;
llist_del(&nsi->unknown_nsvc->list);
return nsi;
@@ -1527,8 +1529,6 @@ struct gprs_nsvc *gprs_ns_nsip_connect(struct gprs_ns_inst *nsi,
nsvc = gprs_nsvc_create(nsi, nsvci);
nsvc->ip.bts_addr = *dest;
nsvc->nsei = nsei;
- nsvc->nsvci = nsvci;
- nsvc->nsvci_is_valid = 1;
nsvc->remote_end_is_sgsn = 1;
gprs_nsvc_reset(nsvc, NS_CAUSE_OM_INTERVENTION);
--
1.7.9.5
Hi,
I have installed an infrastructure IPACCESS - OpenBSC - LCR (without misdn) - Asterisk
LCR si connected via SIP to Asterisk.
The problem is that i can call MT <-> softphone, soft and MT <-> MT BUT i don't hear anything in any side ( softphone <-> softphone works well). I think is a codec problem:
Configured TCH/F FR for MT and we tried different codecs (alaw,gsm,ulaw, etc etc).
Also I tried bridging GSM and SIP interfaces on LCR config and putting rtp-bridge.
On LCR debug I see this error:
000000 DEBUG (in port.cpp/new_state() line 267): PORT(SIP-0-out) new state PORT_STATE_OUT_ALERTING --> PORT_STATE_CONNECT
nua: nua_application_event: entering
000000 DEBUG (in sip.cpp/sip_callback() line 1775): Event 7 from stack received (handle=0x94906d8)
000000 DEBUG (in sip.cpp/sip_callback() line 1825): state change received
nua: nua_application_event: entering
000000 DEBUG (in sip.cpp/sip_callback() line 1775): Event 7 from stack received (handle=0x94906d8)
000000 DEBUG (in sip.cpp/sip_callback() line 1825): state change received
nua: nua_application_event: entering
000000 DEBUG (in sip.cpp/sip_callback() line 1775): Event 5 from stack received (handle=0x94906d8)
000000 DEBUG (in sip.cpp/sip_callback() line 1837): active received
000000 TRACE 06.11.13 20:10:06.434 EP(2): CONNECT from CH(2) connect id number= present='not available'
000000 TRACE 06.11.13 20:10:06.435 EP(1): CONNECT to CH(1) connect id number= present='not available'
000000 TRACE 06.11.13 20:10:06.435 EP(1): TONE to CH(1) off
000000 TRACE 06.11.13 20:10:06.436 CH(1): MNCC_SETUP_RSP LCR<->BSC connected type=0 plan=1 present=0 screen=3 number=
000000 DEBUG (in port.cpp/new_state() line 267): PORT(GSM-0-in) new state PORT_STATE_IN_ALERTING --> PORT_STATE_CONNECT_WAITING
000000 DEBUG (in port.cpp/message_epoint() line 617): PORT(GSM-0-in) setting tone '' dir ''
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 TRACE 06.11.13 20:10:06.563 CH(1): MNCC_SETUP_COMPL_IND LCR<->BSC
000000 DEBUG (in port.cpp/new_state() line 267): PORT(GSM-0-in) new state PORT_STATE_CONNECT_WAITING --> PORT_STATE_CONNECT
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
000000 DEBUG (in gsm.cpp/audio_send() line 487): no valid CMR yet.
<--...-->
<-- THIS ERROR REPEATED CONTINUOUSLY DURING THE CALL -->
<--...-->
Configurations:
OpenBSC trx 0 config:
trx 0
rf_locked 0
arfcn 636
nominal power 23
max_power_red 0
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
hopping enabled 0
timeslot 1
phys_chan_config SDCCH8
hopping enabled 0
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
mncc-int
default-codec tch-f fr
LCR config:
interfaces.conf
[GSM]
gsm-bs
tones yes
earlyb no
[SIP]
extern
sip localhost:5059 localhost:5060
tones yes
earlyb yes
Asterisk User conf:
user.conf (one user)
[6001]
fullname = SIPPhone2
registersip = no
host = dynamic
callgroup = 1
mailbox = 6001
call-limit = 100
type = peer
username = 6001
secret = nomypasshere
transfer = yes
nat = yes
context = openBSC_Integration
dtmfmode = rfc2833
cid_number = 6001
disallow = all
allow = alaw,gsm ; I Tried different codecs
callcounter = no
hasvoicemail = no
vmsecret =
email =
threewaycalling = no
hasdirectory = no
callwaiting = no
hasmanager = no
hasagent = no
hassip = yes
hasiax = no
canreinvite = no
insecure = no
pickupgroup = 1
autoprov = yes
label = 6001
linenumber = 1
LINEKEYS = 1
Other configs seem irrelevant...
--
--
Leonardo Nve <lnve(a)s21sec.com>
Project Manager ACSS
Grupo S21sec Gestión, S.A.
Telefono 628275870
--
La información contenida en este mail, así como los archivos adjuntos,es
CONFIDENCIAL. Grupo S21sec Gestión, S.A. garantiza la adopción de las
medidas necesarias para asegurar el tratamiento confidencial de los datos
de carácter personal. En el caso de que el destinatario del correo
no sea usted, le rogamos envíe una notificación al remitente y lo destruya
de forma inmediata. La lectura y/o manipulación de esta información en la
situación señalada anteriormente será considerada ilegal, permitiendo a la
empresa remitente realizar acciones legales de diferente envergadura.
Hello Harald and everyone out there!
I have been going through your Osmocom projects especially Openbsc (osmo-nitb) and Osmobts projects and I must say it's a real great work!
I'm a lead engineer at Octasic and after looking at your work on OpenBSC and OsmoBTS, we decided to use your OpenBSC stack for internal testing of our Octasic PHY.
I know currently openbsc supports few BTS models like ip.access, sysmocom etc. I have gone through the wiki and some of the openbsc archives. I could find an archive regarding Octasic SDR, but I guess it has not gone any further.
http://lists.osmocom.org/pipermail/openbsc/2010-November/002196.html
I will be interested in osmo-nitb which I can use for network part of GSM and use osmo-bts for BTS L2/L3 stuff, which already has abis-over-ip interface to openBSC(osmo-nitb). I have Octasic SDR hardware that has the layer1 (DSP image), so all I need to implement is the interfaces between Octasic Layer1 and osmobts L2/L3 to communicate between them, which I'm working on.
I have already installed openbsc (osmo-nitb) and also osmobts on my Debian 7.1.0. I'm currently in a process of writing interfaces between Octasic L1 and osmobts.
I'm using the default config file openbsc.cfg for osmo-nitb & using ip.access config file for osmobts (with changes in the OML ip & band GSM900)
At present I'm trying to get TRX config request from osmo-nitb. However though I'm receiving few OML messages like NM_MT_SET_BTS_ATTR (pcap attached), I guess they are specific to ip.access BTS, I'm not able to see any TRX config request coming from osmo-nitb (Or by any chance is that what I'm receiving is the TRX config one?)
I'm simply sending ack for those OML messages and eventually expecting a TRX config request from osmo-nitb. I'm not sure if osmo-nitb expects something to se sent from BTS side, looks like it is simply waiting for something(see below).
I have tried to run osmo-nitb program and it look like:
./osmo-nitb -c openbsc.cfg
<0019> input/ipaccess.c:934 enabling ipaccess BSC mode
DB: Database initialized.
DB: Database prepared.
<001d> sms_queue.c:220 Attempting to send 20 SMS
<0019> input/ipa.c:323 accept()ed new link from 127.0.0.1 to port 3002
(I do not see RSL link becoming up here)
I tried turn on debug:
./osmo-nitb -c openbsc.cfg -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM
DB: Database initialized.
DB: Database prepared.
<0005> abis_nm.c:315 OC=SITE-MANAGER(00) INST=(ff,ff,ff) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=NULL AVAIL=Dependency(05)
<0005> abis_nm.c:1442 Set BTS Attr (bts=0) <0005> abis_nm.c:1763 OC=BTS(01) INST=(00,ff,ff) Sending OPSTART
<0005> abis_nm.c:315 OC=GPRS-NSE(f0) INST=(00,ff,ff) STATE CHG: OP_STATE=NULL AVAIL=Dependency(05)
<0005> abis_nm.c:315 OC=GPRS-CELL(f1) INST=(00,ff,ff) STATE CHG: OP_STATE=NULL AVAIL=Dependency(05)
<0005> abis_nm.c:315 OC=GPRS-NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=NULL AVAIL=Dependency(05)
<0005> abis_nm.c:315 OC=GPRS-NSVC(f2) INST=(00,01,ff) STATE CHG: OP_STATE=NULL AVAIL=Dependency(05)
<0005> abis_nm.c:315 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=NULL AVAIL=Power off(02)
<0005> abis_nm.c:315 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=Enabled AVAIL=Dependency(05)
<0005> abis_nm.c:1442 Set BTS Attr (bts=0) <0005> abis_nm.c:1763 OC=BTS(01) INST=(00,ff,ff) Sending OPSTART
And then BSC keeps waiting here though at osmobts - osmo-nitb interface IPACCESS ping-pong goes on for keep-alive of the abis OML link and after some time,
Osmobts reports link down(see attached osmo-bts debug).
At present, I have just created socket interface from osmo-bts to octasic L1 and I'm in the process of writing interfaces for the messages.
I'm expecting 1st message, TRX config request from osmo-nitb and do not see it. I was thinking, once the abis interface is up (OML link), osmo-nitb will trigger TRX configuration and then based on the response from BTS, other configurations. Does osmo-nitb require some kind of handshake from the BTS side to send the TRX configuration?
I shall be really grateful to hear advices from the experts out there. I can give you more information if required.
Thanks,
Jason D'Souza
I just wanted to ask before I spend a lot of time with it. Does the
new HO algorithm also works with non-IP based BTSes like Nokia metro
or insite? Or at least in theory it should work?
Because the handover is not working with the current algo for Nokia, I
want to give the new one a try.
Csaba
Currently only mute_state[0] (refers to ts[0]) is inspected to
determine, whether the Radio Carrier's state is set to LOCK.
This patch changes this by looking at all channels and using LOCK
if (and only if) all channels have been muted successfully.
Sponsored-by: On-Waves ehf
---
src/osmo-bts-sysmo/oml.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index c87acb6..4c63fd5 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -342,9 +342,15 @@ int oml_mo_rf_lock_chg(struct gsm_abis_mo *mo, uint8_t mute_state[8],
int success)
{
if (success) {
- /* assume mute_state[i] == mute_state[k] */
+ int i;
+ int is_locked = 1;
+
+ for (i = 0; i < ARRAY_SIZE(mute_state); ++i)
+ if (!mute_state[i])
+ is_locked = 0;
+
mo->nm_state.administrative =
- mute_state[0] ? NM_STATE_LOCKED : NM_STATE_UNLOCKED;
+ is_locked ? NM_STATE_LOCKED : NM_STATE_UNLOCKED;
mo->procedure_pending = 0;
return oml_mo_statechg_ack(mo);
} else {
--
1.7.9.5
Hi,
I am setting up openbsc with LCR and Asterisk to provide external
connectivity for the GSM clients, and I encountered and interesting
problem.
If the GSM phone initiates a voice call towards a SIP phone it works
perfectly, the voice goes both ways, the quality is OK, everything is
fine.
But when the SIP phones initiates a voice call towards the GSM phone,
only the SIP phone can hear the voice of the GSM phone, and not the
other way around (half sided call). The connection setup works both
ways just fine.
The GSM and the SIP phone can also call the asterisk test numbers, and even can do
echo test just fine. The two GSM phones can call each other too
without any problem.
Does somebody has any idea what could go wrong?
Config:
E1 based Nokia BTS with DAHDI card and TCH/F FR codec.
The SIP phone uses Alaw, LCR also set to use Alaw.
The LCR is bridged to Asterisk, interface.conf:
[GSM]
gsm-bs
tones yes
earlyb no
bridge ast
[ast]
remote asterisk
context from-lcr
earlyb no
tones yes
bridge GSM
routing.conf is completely empty.
Astrisk SIP.conf:
[general]
context=incoming
disallow=all
allow=alaw
allow=ulaw
allow=gsm
transport=udp
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
tlsenable=no
tlsbindaddr=0.0.0.0
[5010]
type=friend
username=5010
secret=123456
dtmfmode=rfc2833
callerid="5010" <5010>
host=dynamic
canreinvite=no
context=myphones
Asterisk extensions.conf
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
; Global variables goes here
[incoming]
; Nothing should land here yet, but every context should end in
; a Hangup(), so we do that.
exten => s,1,Hangup()
[myphones]
; When we dial something from the phones we just added in
; sip.conf, Asterisk will look for a matching extension here,
; in this context.
; SIP phone
exten => 5010,1,Dial(SIP/5010)
exten => 5010,n,Hangup()
; Another SIp phone
;exten => 1001,1,Dial(SIP/1001)
;exten => 1001,n,Hangup()
; GSM phone 1
exten => 12346,1,Dial(LCR/ast/${EXTEN:0},60)
exten => 12346,n,Hangup()
; GSM phone 2
exten => 12345,1,Dial(LCR/ast/${EXTEN:0},60)
exten => 12345,n,Hangup()
; Testing extension
exten => 201,1,Answer()
exten => 201,n,Playback(levan_polka.mp3)
exten => 201,n,Hangup()
; Echo-test, it is good to test if we have sound in both directions.
; The call is answered
exten => 202,1,Answer()
; Welcome message is played
exten => 202,n,Playback(dir-welcome)
; Play information about the echo test
exten => 202,n,Playback(demo-echotest)
; Do the echo test, end with the # key
exten => 202,n,Echo()
; Plays information that the echo test is done
exten => 202,n,Playback(demo-echodone)
; Goodbye message is played
exten => 202,n,Playback(vm-goodbye)
; Hangup() ends the call, hangs up the line
exten => 202,n,Hangup()
[from-lcr]
include => myphones
exten => _X.,1,Dial(LCR/ast/${EXTEN:0},60)
exten => 5010,1,Dial(SIP/5010)
exten => 5010,n,Hangup()
BR,
Csaba
here a small patch for a bug which prevent phones to register.
more info is available in the patch
note: the same mistake may exist at other places. I only looked at how the users are read
kevin
Currently uninitialized elements of the femtobts_sysprim_type array
are mistaken as L1P_T_REQ (which is accidently the first element and
thus 0).
This patch adds a new element to the enum that has the value 0 to
detect uninitialized elements of the femtobts_sysprim_type array.
Those will then show up in the log as 'SYS Prim XXX is not a
Request!'.
This patch also adds missing definitions of the CalibTbl messages
in the femtobts_sysprim_type mapping so that the requests can still
be identified as such.
Sponsored-by: On-Waves ehf
---
src/osmo-bts-sysmo/femtobts.c | 10 ++++++++++
src/osmo-bts-sysmo/femtobts.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/src/osmo-bts-sysmo/femtobts.c b/src/osmo-bts-sysmo/femtobts.c
index 6bd9ce4..1e513bf 100644
--- a/src/osmo-bts-sysmo/femtobts.c
+++ b/src/osmo-bts-sysmo/femtobts.c
@@ -106,6 +106,16 @@ const enum l1prim_type femtobts_sysprim_type[SuperFemto_PrimId_NUM] = {
[SuperFemto_PrimId_RfClockSetupCnf] = L1P_T_CONF,
[SuperFemto_PrimId_Layer1ResetReq] = L1P_T_REQ,
[SuperFemto_PrimId_Layer1ResetCnf] = L1P_T_CONF,
+#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0)
+ [SuperFemto_PrimId_GetTxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_GetTxCalibTblCnf] = L1P_T_CONF,
+ [SuperFemto_PrimId_SetTxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_SetTxCalibTblCnf] = L1P_T_CONF,
+ [SuperFemto_PrimId_GetRxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_GetRxCalibTblCnf] = L1P_T_CONF,
+ [SuperFemto_PrimId_SetRxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_SetRxCalibTblCnf] = L1P_T_CONF,
+#endif
};
const struct value_string femtobts_sysprim_names[SuperFemto_PrimId_NUM+1] = {
diff --git a/src/osmo-bts-sysmo/femtobts.h b/src/osmo-bts-sysmo/femtobts.h
index 7239757..a2b8dea 100644
--- a/src/osmo-bts-sysmo/femtobts.h
+++ b/src/osmo-bts-sysmo/femtobts.h
@@ -44,6 +44,7 @@
(OSMO_MAX(sizeof(SuperFemto_Prim_t), sizeof(GsmL1_Prim_t)) + 128)
enum l1prim_type {
+ L1P_T_INVALID, /* this must be 0 to detect uninitialized elements */
L1P_T_REQ,
L1P_T_CONF,
L1P_T_IND,
--
1.7.9.5