Alexander Chemeris
f3fbf2a39e
Update OpenBTS init script
2011-06-21 16:46:55 -07:00
Alexander Chemeris
fc61ebaf53
Correctly exit OpenBTS even if console is not started yet.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
7d9fa86569
Add option to run OpenBTS in a failsafe loop.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
d0c9057711
Shutdown without core dump on a usual SocketError.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
a0f3b96688
Remove Transceiver PID file on OpenBTS exit.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
7b3c0d3090
Save transceiver PID to a file and use it to kill old transceivers.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
1cd7f00470
Correct comment for Server.WritePID.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
f7d78ff578
Set FD_CLOEXEC flag on all sockets.
...
We don't want them to be inherited on exec(). We use exec() to run Transceiver and it OpenBTS process crashes, transceiver becomes owner of all LISTEN sockets.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
08bdbb921c
Stupid bug fixed - can't move stack variables initialization to a separate function.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
1965ab4255
Gracefully shutdown OpenBTS on transceiver timeout/error.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
0e6f974b1e
Make functions and variables in OpenBTS.cpp static to avoid their use outside of the file.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
7a3d355655
Remove PID file on program exit.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
7db74d0cce
Implemented daemon mode, configured from config.
...
I have to do a weird thing - forking during initialization of static variables. I turns out main() is too late for that, because we bind sockets in static variables and when we run second instance, it fails in bind and not in our lockfile checking code. Some other ramifications come out because of our heavy use of global variables. Don't do that in your next project - use global variables only when strictly necessary.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
2bafba55a3
Better default name for OpenBTS control UNIX socket.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
7be28a2263
Initialize logger right after loading config file.
...
This avoids printing of log messages to the screen on program startup.
2011-06-21 16:46:55 -07:00
Alexander Chemeris
a5c9b9ecbb
Use normal cout and cerr while we have only one thread.
...
COUT() and CERR() macros output current time before text, which looks ugly for the welcome message.
2011-06-21 16:46:54 -07:00
Alexander Chemeris
aec7d8c604
Better comments for previous commit.
2011-06-21 16:46:54 -07:00
Alexander Chemeris
8598e72800
Catch SIGINT, SIGTERM and SIGHUP and shutdown the server gracefully.
2011-06-21 16:46:54 -07:00
Alexander Chemeris
163290b60e
Uncomment real BTS start/stop.
2011-06-21 16:46:54 -07:00
Alexander Chemeris
a4cbf3bae3
Update files generated by autoconf.
2011-06-21 16:46:54 -07:00
Alexander Chemeris
5ababfad65
A big patch implementing remote CLI.
...
This patch adds ability to connect to OpenBTS CLI with TCP socket and UNIX socket. This is configurable in the config file. To connect to the CLI use apps/OpenBTScli executable, which reads configuration from the same config file.
2011-06-21 16:46:54 -07:00
Alexander Chemeris
1418461410
smqueue: Add SMSC short code to smqueue.config.example
2011-06-21 15:30:44 -07:00
Alexander Chemeris
2b26d6cf26
Checking in forgotten smsc.cpp and smsc.h files.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
970beeb816
Ignore User-Data-Header in SMS TPDU when decoding text in TLUserData::encode7bit().
2011-06-21 15:30:44 -07:00
Alexander Chemeris
ef988a4b2f
Transparently pass TP-UHDI (User-Data-Header-Indicator) from SMS-SUBMIT to SMS-DELIVER.
...
Among other things this allows us to correctly pass-through concatenated SMS messages.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
63202cbf24
Slightly cleaner output in TLUserData::write().
2011-06-21 15:30:44 -07:00
Alexander Chemeris
7318cc60f9
Log contents of a message instead of its memory addresss in SMS::parseTPDU().
2011-06-21 15:30:44 -07:00
Alexander Chemeris
a55a85eeba
Use decoded text from original message in bounce and e-mail messages.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
ff7b341dae
More readable bounce message.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
53123da4f0
Maximum SMS length is 160 symbols in default alphabet.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
e61168a39c
Avoid duplication of "IMSI" in SC.Register.Msg.
...
"IMSI" is also a prefix to phone's imsi-number, so when you output this error message, you get something like IMSIIMSI310260550682564.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
d498358b6e
Set Log.Alarms.* values in smqueue config.
...
Logging system expect those valus to exist.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
49b8ffd2d8
Make "from" address for bounce messages configurable.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
d54e4d82fd
Move most of the SMS processing to smqueue (initial check-in).
...
Idea is to make OpenBTS as dumb as possible. It should forward all received SMS messages' RPDU to SMSC (smqueue) and vice versa. All actual message decoding and processing is to be done in smqueue.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
57d292d962
Better documentation and error reporting for ThreadSemaphore.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
971b6ba700
Implementation of Semaphore.
2011-06-21 15:30:44 -07:00
Alexander Chemeris
2ab4ca6648
Implemented "trans" CLI command to list all active transacions.
2011-06-21 15:30:29 -07:00
Alexander Huemer
a2d4ed5c71
configure.ac: use AM_SILENT_RULES if available
...
M_SILENT_RULES improves readability of the messages emitted by make,
compiler warnings are easier to spot.
Available since automake-1.11, ignored on earlier versions.
Traditional verbose output can be forced by
"./configure --disable-silent-rules" or "make V=1"
Written-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-05-23 19:04:50 +02:00
Alexander Chemeris
d15a9730fe
Indicate no support for emergency calls in OpenBTS.config.example.
2011-02-08 14:39:21 +03:00
Alexander Chemeris
3fa2aa19cb
Transceiver52M: Do not delete 'trx' on exit.
...
This should make it slightly less frequent to segfault on exit.
Actually we should shutdown all our threads correctly, but that's a lot of work.
(cherry picked from commit 7cd65d3e5a717e0c224477cacfe932cfd7a45b8f)
2010-12-21 18:29:57 +03:00
Alexander Chemeris
6423e707df
common libs: Implemented ISLOGGING() macro to test whether given loglevel is going to be logged.
...
(cherry picked from commit d5e1c75147ef6d4bd6699c57250cc7b4def2e92b)
2010-12-21 18:29:23 +03:00
Alexander Chemeris
a2ce7ae628
common libs: Implemented BitVector::unhex() which reads a hex string into a BitVector.
...
(cherry picked from commit d017dd20de029dbaa275335450728885f19ed01d)
2010-12-21 18:28:45 +03:00
Alexander Chemeris
e2e267dcca
common libs: Lower log level for "setting log path to " message.
...
I don't see real value of this message, while it's been printed to the screen like something very important.
(cherry picked from commit 3f3c9b2d2599a672f08624b3081c2c687cbba4d4)
2010-12-21 18:13:05 +03:00
Alexander Chemeris
80963d1ed9
common libs: Use gethostbyname2_r() instead of gethostbyname() if available.
...
gethostbyname() is not thread-safe. It's recommended to use gethostbyname_r() or gethostbyname2_r() instead.
(cherry picked from commit f27e9581cdb6837f83d0aab467f0e5f83e814e7b)
2010-12-21 18:11:14 +03:00
Alexander Chemeris
422848f5c1
control: Save IMEI in TMSI table for informational purposes.
...
So yes, now you should be able to identify all those annoying iPhones.
(cherry picked from commit e09c0b87d2ecbb5df713c020b814e3a8f371a9d4)
2010-12-21 18:09:31 +03:00
Alexander Chemeris
c5e8a2337d
sip: Set display name for To field in a SIP MESSAGE.
...
(cherry picked from commit 82d2d87f3f726976d9003829517a6cce395543ee)
2010-12-21 18:07:36 +03:00
Alexander Chemeris
25cef9ef96
control: Use std::string in TransactionEntry to ctore messaging payload.
...
Originally there was a fixed-size char array, which didn't allow to work with long hex strings.
(cherry picked from commit fdc6fc85f9f431438ef7279975c2f7c230cb4aa5)
2010-12-21 18:06:31 +03:00
Alexander Chemeris
c39af79c75
smqueue: Documentation fixes for sm_state enumeration in smqueue.
...
(cherry picked from commit 70dffa1fcfb497cb6f90c1f83bf5d34942d27c59)
2010-12-21 18:05:51 +03:00
Alexander Chemeris
b854303428
gsm: Add 8-bit alphabet to enumeration of GSM alphabets.
...
(cherry picked from commit 6c2e5134808e66f525e7df3e250a3f7be5cfd31c)
2010-12-21 18:05:09 +03:00
Alexander Chemeris
9de3435b20
sip: More comments and minor code ordering in SIP::sip_message().
...
(cherry picked from commit e7d2a39129e86c9a844bdb0c282fdf489f2f4ee7)
2010-12-21 18:03:56 +03:00