Commit Graph

62 Commits

Author SHA1 Message Date
Harald Welte 6c7680d726 SMPP: build the smpp interface only in case of ./configure --enable-smpp 2012-11-16 22:16:46 +01:00
Harald Welte 1a2993adb7 SMPP: fix subscriber reference leak.
subscr_get_by_* is already increasing the refcount, we shouldn't
do that a second time (thanks, Holger).
2012-11-16 22:00:10 +01:00
Harald Welte 9122c13933 SMPP: More logging in error cases, fix UDH in 7bit ASCII 2012-11-16 22:00:10 +01:00
Harald Welte 874f9f1aa7 SMPP: More consistent logging / error reporting 2012-11-16 22:00:10 +01:00
Harald Welte 8a1b056bff SMPP: Implement ALERT NOTIFICATION on attach/detach of subscribers 2012-11-16 22:00:10 +01:00
Harald Welte 9ad0362429 SMPP: Deal with DCS according to 03.38 and respect TP-PID 2012-11-16 22:00:09 +01:00
Harald Welte 4dbcdad903 SMPP: Introduce wrapper macro to memset all structures to zero
For some reason, libsmpp34 is too smart to zero out the entire structure
to which it is unpacking.  This introduces an ugly wrapper macro to
work around.  This needs discussion with the libsmpp34 maintainer.
2012-11-16 22:00:09 +01:00
Harald Welte e94db49698 SMPP: Introduce ESME reference coounting
In case a ESME disappears after SUBMIT-SM but before the MT-SMS
is delivered (transaction mode), we have to make sure the esme
structure still exists.
2012-11-16 22:00:09 +01:00
Harald Welte d4bdee79e9 SMPP: Implement transaction mode for SUBMIT-SM
WARNING: if the ESME disconnects, osmo_esme gets freed, and
sms->smpp.esme might point to invalid/unallocated memory!
2012-11-16 22:00:09 +01:00
Harald Welte f1033cc752 Initial support of SMPP interface for MT-SMS 2012-11-16 22:00:09 +01:00
Holger Hans Peter Freyther 75172124e7 sms: Re-order the include files after the separationf OpenBSC and osmocore 2012-11-11 18:33:09 +01:00
Holger Hans Peter Freyther 6b55f603e3 sms_queue: It is a bad idea to detach a subscriber on failed delivery
It is a bad idea to detach a subscriber. The subscriber will not
be reachable until the next periodic updating cycle. In case we have
too many failed deliveries we will need to reduce the period for the
LU and implement a subscriber purging task.

This is a preparation for the 29C3 and a problem Jolly experience with
his type writer system.
2012-11-02 17:23:05 +01:00
Harald Welte bf0a7c97be nncc_builtin: send CHAN MODE MODIFY after CALL PROCEEDING
This is specified in fifugre 7.10c of 3GPP TS 04.08.
2012-09-19 11:47:49 +02:00
Holger Hans Peter Freyther a5050b14c9 misc: Address compiler warning on unused variables
abis_nm.c: In function ‘abis_nm_get_attr’:
abis_nm.c:1380:11: warning: unused variable ‘cur’ [-Wunused-variable]

abis_nm.c: In function ‘ipac_parse_bcch_info’:
abis_nm.c:2588:11: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]

bts_nokia_site.c:1310:6: warning: variable ‘constructed’ set but not used [-Wunused-but-set-variable]
bts_nokia_site.c: At top level:
bts_nokia_site.c:1364:12: warning: ‘dump_elements’ defined but not used [-Wunused-function]

gsm_04_08.c: In function ‘mm_rx_loc_upd_req’:
gsm_04_08.c:521:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

osmo_msc.c: In function ‘msc_ciph_m_compl’:
osmo_msc.c:122:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

bts_hsl_femtocell.c: In function ‘hslfemto_bootstrap_om’:
bts_hsl_femtocell.c:101:11: warning: variable ‘cur’ set but not used [-Wunused-but-set-variable]

bts_hsl_femtocell.c: In function ‘hsl_drop_oml’:
bts_hsl_femtocell.c:232:21: warning: variable ‘line’ set but not used [-Wunused-but-set-variable]

handover_logic.c: In function ‘ho_chan_activ_ack’:
handover_logic.c:197:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
2012-09-11 12:41:23 +02:00
Harald Welte 570ce24deb VTY: improve VTY prompt and make sure exit/end works everywhere
Some nodes below 'config' didn't have ournode_exit / ournode_end,
and thus were not able to properly perform this function.  exit should
always only go back one level, while end drops us back to ENABLE_NODE.

The prompt now represents the nesting level, and there's one consistent
space after the final prompt character (typically #).
2012-08-17 13:16:10 +02:00
Harald Welte d13e0cd6db Some more VTY documentation / help fixes 2012-08-17 09:52:03 +02:00
Harald Welte cfaabbb21e complete the VTY help messages so we don't get "null" in the manual 2012-08-16 23:23:50 +02:00
Holger Hans Peter Freyther 3217fa2412 nitb: Document missing parameters, reword documentation, combine param
Change "pending send" to "pending-send" as there is no other pending
command right now, add missing documentation for parameters.
2012-07-21 00:01:01 +02:00
Harald Welte 70f9205cd9 MSC 04.08: RRLP messages are DRR, not DNM ! 2012-07-16 13:22:19 +02:00
Harald Welte 45f9171175 move BTS-specific timezone override into sub-structure
Group all three structure members involved in bts-specific timezone
handling into a sub-structure.
2012-07-12 01:14:28 +02:00
Holger Hans Peter Freyther 153b13b02e msc: Attempt to release the lchan immediately on IMSI Detach
The Nokia E71 sends a "IMSI Detach" this msc code does not immediately
send the "RR Channel Release", the E71 is impatient and sends a DISC,
the "RELEASE INDICATION" is handled by starting the channel release
procedure. OpenBSC sends a "RR Channel Release" which will never be
answered, during the early release there is no timer and the lchan will
be in "RELEASE REQUESTED" forever.

This commit removes the anchor operation and checks if the channel can
be released immediately. Regarding the channel release handling there
is already a branch that needs to be tested.
2012-07-10 08:57:41 +02:00
Harald Welte f383aa11a5 BSC: introduce new "sysmobts" BTS model
so far, osmo-bts/sysmobts used to be entered as "sysmobts" type in the
configuration file.  However, there are some differences in the
protocol/behaviour and we should reflect that by a new BTS plugin (with
lots of code reuse from the nanobts driver).
2012-07-02 20:13:08 +02:00
Sylvain Munaut 5e80cc4adc libmsc/db: Fix max value of ainfo->a3a8_ki_len in db_get_authinfo_for_subscr
Thanks to Robert Ingr for pointing this out

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-05-07 22:09:15 +02:00
Harald Welte 9c3dc90d16 introduce HAVE_TM_GMTOFF_IN_TM
Not all architectures have the tm.tm_gmtoff member.  This fixes cygwin
builds.
2012-04-08 16:59:24 +02:00
Holger Hans Peter Freyther a8ddb08e05 misc: Use msgb_free for freeing the messages 2012-03-01 20:30:32 +01:00
Tobias Engel c33d7d71cb Make sure USSD code only responds *#100# for retrieving own number
strstr() was used with wrong argument order, causing it to always match,
and causing an invalid response to a variety of different SS and USSD
requests.

This has apparently caused havoc among a number of HTC phones which
issue SS requests without user interaction upon boot, and then trip over
our inappropriate response.
2012-02-24 22:23:17 +01:00
Harald Welte cf149eebb6 Move the bulk of RR processing from MSC into BSC
RR Messages like STATUS, GPRS SUSPEND, HANDOVER COMPLETE/FAIL, ...
should be processed on the BSC side of things, not on the MSC side.

This is among other things required in preparation of intra-BSC
hand-over support in osmo-bsc.
2012-01-23 16:40:24 +01:00
Harald Welte 95e862cab4 Move processing of CLASSMARK CHANGE behind bsc_api
This prevents osmo-bsc from sending RR messages to the MSC and rather
process them inside the BSC and turn them into BSSAP CM UPDATE.
2012-01-23 10:28:35 +01:00
Holger Hans Peter Freyther 794e8f2649 abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflags
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the
LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same
time as we only build .a archives.
2012-01-15 17:52:02 +01:00
Holger Hans Peter Freyther 9e7837a14d mncc: Include size and offsets of struct gsm_mncc in the hello
Increase the version number and send the sizeof of the gsm_mncc
and the gsm_data_frame structure. Include the offsets of some
members as well to maybe identify ABI problems.

The reason we go through this is that we want to benefit from
the native ABI and don't want to force packed structs.
2012-01-15 00:40:42 +01:00
Holger Hans Peter Freyther 40aac3f7f6 bsc: Assume assignment_complete/assignment_fail is set
The osmo-nitb application sometimes crashes because the BSC API
is doing an assignment underneath which is not handled by the code,
add dumy handlers to not crash, the right thing to do is to change
MNCC to have an assignment that can succeed/fail.

The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should
wait for an ack/nack but right now the call just continues.
2011-12-27 12:55:44 +01:00
Gus Bourg 1c5dd2c9bb Add NITZ (timezone) support as part of MM INFO
The UTC offset from the operating system will be used by default to
calculate the NITZ in MM INFO.  However,  a "timezone" vty command is
added at the BTS level, allowing BTS-specific overrides, e.g. in case
BTSs are distributed accross multiple timezones.
2011-12-02 10:18:17 +01:00
Alexander Huemer 6b8a56c365 fix two mistakes in AM_LDFLAGS 2011-11-25 09:43:45 +01:00
Holger Hans Peter Freyther 2692e3bcff gsm0408: Print a message when the LU is timing out. 2011-11-07 12:26:29 +01:00
Holger Hans Peter Freyther 347e7ba377 mncc: Introduce a hello packet that is sent to the client.
Send a hello packet down to the client with the version number
of the MNCC interface. The hello structure might be extended to
include the endianes, size of each structure, etc.
2011-11-06 21:49:18 +01:00
Holger Hans Peter Freyther da6597ea29 mncc: Remove FIXME about queuing messages
mncc_sock_from_cc will discard the messages when the
fd has been set to -1.
2011-11-06 21:41:51 +01:00
Holger Hans Peter Freyther 694c82d8e3 mncc: Address the fixme and put the mncc_sock_state in gsm_network
Remove the unused mncc_sock_write_pending, switch over from the
static s_state to net->mncc_state.
2011-11-06 21:41:51 +01:00
Harald Welte ab386e6120 Add VTY command to specify default speech codec
In order to have the MNCC application reliably decide on the codec type,
it needs to know if we are running on a TCH/F or TCH/H.  Thus, we pass
lchan_mode as a new parameter to the 'struct gsm_mncc'
2011-09-03 18:23:20 +02:00
Pablo Neira Ayuso ed5cacb240 src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.

The main changes are:

- The directory libabis/ has been removed as it now lives in
  libosmo-abis.

- new configuration file format for nanoBTS and HSL femto, we
  need to define the virtual e1_line and attach it to the OML
  link.

- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
  BS11 and rbs2000) now use the new libosmo-abis framework.

- use r232 input driver available in libosmo-abis for bs11_config.

- use ipa_msg_recv instead of old ipaccess_read_msg function.

- delete definition of gsm_e1_subslot and input_signal_data.
  These structures now lives in libosmo-abis.

Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.

This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:

- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node

This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-19 22:38:35 +02:00
Pablo Neira Ayuso 7abecfcfc9 src: use new msg->dst pointer instead of deprecated msg->trx
This patch modifies openBSC code to use msg->dst which stores the
pointer to the signalling link structure instead of the pointer to
the transceiver structure.

This patch prepares the introduction of libosmo-abis.
2011-08-19 22:38:33 +02:00
Peter Stuge 46f799b224 MNCC: Never send zero-length msgb packets to the socket
This will cause the remote end to read 0 bytes, which is interpreted as
if we cleanly closed the socket, making the remote end close their side
of the socket, which would lead to us closing our side of the socket,
so we should never send such a packet.
2011-08-11 17:21:24 +02:00
Harald Welte 1045697c34 Fix MNCC for the NOKIA BTS type
(thanks to Gus Bourg)
2011-08-10 10:51:02 +02:00
Dieter Spaar 1664602476 Initial version of Support for Nokia *Site BTS
This includes the MetroSite, but also other Nokia BTS models.
2011-08-10 10:51:01 +02:00
Harald Welte e5215b5398 04.08 / MNCC: elevate error messages to LOGL_ERROR
this way you can actually see them...
2011-08-09 22:06:08 +02:00
Holger Hans Peter Freyther 074b2b24e0 smsqueue: There was a race/bug with a booting phone, paging and LU
It was possible to set the LAC=0 on a subscriber that just has
done a LU because it did not respond to a paging request.

E.g. when a phone is rebooting, a SMS being delivered, the phone
is doing the LU, sub_ready_for_sm will try to send a SMS (but the
phone is not ready yet and it will timeout), then the paging code will
send us an expiration note and we might set the LAC=0 for this
subscriber.

Ideally we would be able to stop the paging request once the subscriber
is authenticated and then hand this to the SMS layer, right now the
best thing to do is to detect that we will run into this problem and
not send the SMS, not try to set the LAC=0.
2011-07-25 00:19:36 +02:00
Harald Welte 258c713343 gsm_04_11: use 'unsigned int sms_alphabet' to include 0xffffffff
Detected by Smatch
2011-07-16 13:34:52 +02:00
Harald Welte d1476bc603 db: use ANSI (void) function declarations 2011-07-16 13:24:09 +02:00
Harald Welte 2c5f4c635a db: fix Smatch warnings
/home/laforge/projects/git/openbsc/openbsc/src/libmsc/db.c +254 db_fini(6) info: redundant null check on db_dirname calling free()
/home/laforge/projects/git/openbsc/openbsc/src/libmsc/db.c +256 db_fini(8) info: redundant null check on db_basename calling free()
/home/laforge/projects/git/openbsc/openbsc/src/libmsc/db.c +280 db_create_subscriber(20) warn: variable dereferenced before check 'subscr'
2011-07-16 13:22:57 +02:00
Pablo Neira Ayuso c0d17f2266 src: use namespace prefix osmo_* for misc utils
Summary of changes:

s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g
2011-05-07 12:58:59 +02:00
Pablo Neira Ayuso dfb342c19a src: use namespace prefix osmo_counter*
Summary of changes:

s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free
2011-05-06 12:14:16 +02:00