Commit Graph

3881 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
Harald Welte 90d7f26f67 Makefile: just a slight re-order / breaking of a line 2012-11-16 22:00:09 +01:00
Holger Hans Peter Freyther eedb45362d mgcp: Print both receivd and expected address in the error statement
The log statement is split into two because inet_ntoa works on an
internal buffer and would print the last address twice.
2012-11-12 10:55:29 +01:00
Holger Hans Peter Freyther 98da544992 nat: Move the ctrl handling code into a separate file
Move to the control command handling out of the main file into
a dedicated module. There are still some calls embedded into the
main code but it will be moved soon.
2012-11-12 10:49:10 +01:00
Holger Hans Peter Freyther 88c06bcd64 Merge branch 'zecke/mgcp-rtp-statistics' 2012-11-12 10:46:11 +01:00
Holger Hans Peter Freyther cb306a689e mgcp: Send the jitter statistics at the end of the call 2012-11-12 10:45:09 +01:00
Holger Hans Peter Freyther 30690adbc8 mgcp: Calculate the jitter with the formula/code from the appendix
Use a usec timestamp for the local time. The seconds to usec will
swap over to the lower bits but this appears to be correct. The
CLOCK_MONOTONIC is used to fulfill the RFC 3550 requirement even
if it is a bit slower than the gettimeofday.

Make sure to initialize transit in a way that the first transit
time will be 0. Otherwise the jitter will contain the difference
of the localtime and the remote time.
2012-11-12 10:45:03 +01:00
Holger Hans Peter Freyther 38e02c5125 mgcp: Calculate the packet loss as of Appendix A of RFC 3550
Calculate the expected packages and packet loss as of RFC 3550.
The values should be clamped but our packet loss counter is 32
bits and not 24 and we should clamp at other values but I am
waiting for some issues first before dealing with that.
2012-11-12 10:44:58 +01:00
Holger Hans Peter Freyther 769912c9e9 mgcp: Calculate the wrap around as of Appendix A in RFC 3550
This is missing the probation and the dealing with a remote
restart. For the remote restart we will simply write a log
statement as this is unlikely to happen during a call or if
it does happen the call will be taken down by the BSC anyway.
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther 1e85af661c mgcp: Document a difference between RFC 3550 and this code
Explain why this code deals with only one source and that this is
a limit of some equipment (e.g. the nanoBTS).
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther ed3a661d0b mgcp: Align the variable naming with Appendix A of RFC 3550
Align the naming inside the mgcp_rtp_state with the naming inside
the 'source' struct of the appendix. Make first_seq_no/base_seq
a uint16_t. This is removing rules for alignments and reduces the
struct from 40 bytes to 36.
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther 0bf15a8187 mgcp: Include statistics at the end of a connection
Follow the MGCP specification and send the collected statistics
at the end of a call. Right now this does not include jitter, packet
loss and delay.
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther 2e8e659586 mgcp: Remember the initial sequence number of the stream
This information is required for calculating the packet loss at the
end of a phone call.
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther 952f752ffa mgcp: Count the received octets as of the MGCP specification
Count the received octets. This is encouraged by the MGCP specification.
Use a 32bit counter that is good enough for more than 12 hours of a EFR
call. This limit is good enough for the current configuration.
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther 2a60a11c48 mgcp: Remove the lost_no from the mgcp statistics
The RFC 3435 specifies a different formula for calculating the lost
packages. It involves the number of received packages and the delta
of the sequence number.
2012-11-12 10:42:05 +01:00
Holger Hans Peter Freyther de1674ab02 bts: Really drop the BTS in case of an OML NACK
The previous code didn't work as expected. The trx and dst pointer
are located in an union and in the case of the Abis code the dst
is used to point to the signalling link timeslot and not the TRX.

The is_ipaccess_bts always returned false because the dst was casted
to a trx while it was no trx.

This fix was tested with the nack_test/NACKTest.st of the test repo.
2012-11-11 18:33:17 +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 3dfe8a1705 nat: sizeof char * != sizeof char[], make the code work on 64bit systems
The test cases were failing on 64bit systems because the sizeof
code operated on the pointer size which is 8 and longer than the
size that was intended to be used for comparing it.
2012-11-07 13:35:14 +01:00
Holger Hans Peter Freyther e2f34d588c nat: Inject a a=fmtp:%d to force the right AMR code
This assumes that AMR is used and/or the mode-set is ignored for other
codecs by the remote end.
2012-11-07 13:34:43 +01:00
Holger Hans Peter Freyther 93fda87cf8 debian: Make the package creation work on debian squeeze (stable)
the dh_autoreconf application did not honor the sourcedirectory
option back then. Override the target and call autoreconf from
the right directory.
The libdbi development package is called libdbi0-dev. Use this name
for Debian stable but it should work for Ubuntu as well.
2012-11-06 23:12:02 +01:00
Holger Hans Peter Freyther e0b5972d30 debian: We require libdbi-sqlite3 for running the tests
The tests are not broken but the db test fails when the dbi driver
is not installed. Make it a build time depedency.
2012-11-06 23:12:00 +01:00
Holger Hans Peter Freyther f3a317ceed debian: Update the rules to work from the toplevel directory 2012-11-06 23:11:43 +01:00
Holger Hans Peter Freyther e600eed7fa debian: Move debian directory to ease building packages
This is required to have git-buildpackage be able to create tarballs
from the git repository and was done by Jan in the debian branch as
well.
2012-11-06 23:01:43 +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
Holger Hans Peter Freyther 7456891439 mgcp: Fix the log message. This is inside the MDCX printing routine 2012-10-30 11:22:21 +01:00
Holger Hans Peter Freyther cb3c2c95bf nat: Make MGCP helper routine static as it is internal to the MGCP code 2012-10-29 19:41:51 +01:00
Holger Hans Peter Freyther 07fc097fc4 nat: Document the high level goal of the MGCP/NAT routines
Provide some high level documentation that might help to understand
what this code is supposed to be doing.
2012-10-29 19:41:37 +01:00
Tobias Engel aff20717e4 Set byte order defines when compiled on OSX
Byte order defines have a DARWIN prefix on OSX so the values openbsc
expects are set from their Darwin counterparts when compiled on OSX.
2012-10-27 10:09:21 +02:00
Holger Hans Peter Freyther 511f9c3e4a si: Partially implement the range encoding for the SI.
I saw the old copy of the "Appendix J" code too late and I have
discovered some quirks and I am more familar with my implementation.
Most noticable 'w' only needs to be as big as the input arfcn but
requires the 'w' to be initialized. The power_of_2 implementation
differs as well (mine matches the output of wirehsark).

The f0 could be chosen in a better way but right now picking
the lower bound is the easiest. It is not clear if to use
modulo if the range is chosen in the middle. This can be improved
in the future. Right now I have no bit fiddling for range128, 256
and 1024 as I was running out of time.
2012-10-22 15:23:58 +02:00
Pablo Neira Ayuso d49eb74732 libbsc: fix message leaks on several error paths
This patch fixes several leak of msgbs in uncommon error paths.

Add break at the end of default to make Holger and Peter happy ;-)
2012-10-18 19:04:40 +02:00
Andreas Eversberg 2ee7ecddeb Allow setting of Control Channel Description parameters via VTY 2012-10-18 12:01:32 +02:00
Holger Hans Peter Freyther 94c2b0578b bsc: Do not print "SI 18" but SI2ter when the SI generation fails 2012-10-09 11:54:00 +02:00
Harald Welte c15d0ac8dd SI13: Set alpha value to a safer default of 0 instead of 10
alpha=0 (the new value) doesn't reduce MS transmission power during GPRS
as much as we did with alpha=10.  This is to optimize for coverage and
to keep GPRS working at all cost, and not care about MS battery life
time or uplink interference in surrounding cells.

FIXME: This should be made configurable via the VTY and the normal
default (unless configured otherwise by vty/config file) should be '6'.
2012-10-08 21:22:08 +02:00
Harald Welte d9173c3fce bsc_init: Don't drop all BTSs because a single BTS had an error 2012-10-08 21:17:51 +02:00
Holger Hans Peter Freyther 8936d00587 tests: Remove the debug/logging test as it is in libosmocore now 2012-10-04 10:55:58 +02:00
Andreas Eversberg becc89a98e Fix: T3192 and T3193 must be similar
In order to keep mobile at PACCH as long as possible the timer T3192 is
set to 1500ms. This reduces the probablity of long lasting assignment
process on CCCH for subsequent downlink TBFs.
2012-09-29 20:29:16 +02:00
Holger Hans Peter Freyther 778695d0b4 mgcp: Add the disable color option to the mgcp binary 2012-09-20 16:06:56 +02:00
Holger Hans Peter Freyther 221ff66327 systemd: Add service units for the BSC, NITB and MGCP
Add simple systemd service units.
2012-09-20 16:06:56 +02: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 34203bd487 abis_nm: Provide a reason when an invalid channel configuration is used
Provide a human readable reason the channel combination is not allowed.
2012-09-17 17:24:49 +02:00
Holger Hans Peter Freyther 9ceea68ba9 abis_nm: Log an error when the channel combination can not be set. 2012-09-17 14:21:53 +02:00