Commit Graph

46 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 3c6f6c25a6 sms: Make the max_pending tunable via a vty runtime setting
Make it possible to change the max pending via the vty. This
can be useful to play with the performance of the queue.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 7a0e166fb0 sms: Add vty command to trigger running the queue.
Allow to manually trigger running the queue. This can be useful
if SMS were manually added to the database or such.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 81c0e2582f sms: Provide some simple vty command for the state of the SMS queue 2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 73b878a85a db: Introduce a limit in delivery attempts for the SMS search
We do not want to attempt submitting SMS that has failed for
too many times. The failure could be due RF failure or due
a bug in the message handling.
2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther 3d76e44968 subscr: Print the lac of the subscriber. 2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther abd0cac0c5 subscr: Add a VTY command to update the subscriber from the database. 2010-12-24 21:40:48 +01:00
Holger Hans Peter Freyther c577ca1822 subscr: Add VTY command to purge subscribers that are held in memory
Call the subscr_purge_inactive function and mention how many
subscribers were removed from the RAM.
2010-12-24 21:40:48 +01:00
Harald Welte a29e43a26f BSC Call Control: Actually implement call statistics
The existing call realated statistics counters apparently were
never used.  This introduces a new set of counters, two for the
MO and MT case.
2010-12-24 16:07:40 +01:00
Harald Welte 75e2defc7f BSC VTY: Print some more of the already-generated statistics 2010-12-24 16:07:35 +01:00
Harald Welte 88f9d98ccc Use hexparse() from libosmocore >= 0.1.14 2010-07-30 10:39:26 +02:00
Holger Hans Peter Freyther e731e1d6dd gsm_04_80: Allow to specify the alert pattern for the notification
Allow to specify the level (not the category) of the notification
this provides an easy way to test it on the phones.
2010-07-27 18:27:46 +08:00
Holger Hans Peter Freyther 68d26796ca gsm_04_80: Send a Release Complete otherwise the USSD unit stays BUSY
We need to release the USSD unit, otherwise it is staying blocked
and will stop to function (even across LUs on my a1200). This code
should encode the transaction and the direction depending on the
network state but this is omitted right now.
2010-07-27 03:31:50 +08:00
Holger Hans Peter Freyther daf753477e gsm_04_80: Add untested code for USSD notification...
One should be able to send a USSD Notification to a given
subscriber if we has an active link...
2010-07-26 20:01:07 +08:00
Holger Hans Peter Freyther 742fc70011 vty_interface_layer3: Fix a subscriber memory leak.. 2010-07-26 19:43:54 +08:00
Nico Golde 5950236b5e * Fix null ptr dereference and sms memleak in case the recipient of an sms sent via vty is not attached. Store the sms in the database in this case for later delivery.
The problem is that sms_from_text returns NULL in case the
subscriber is not attached which a) leaks memory of the
previously allocated sms and b) runs into a null ptr
dereference in _send_sms_str().

There may be a better solution than this but this is the
easiest way of noticing and taking action I could find
without changing return values of sms_from_text.
2010-06-30 09:10:04 +02:00
Harald Welte bd17b39fd2 [BSC] VTY: Fix parsing of uppercase hex digits 2010-06-30 09:01:35 +02:00
Harald Welte 9d4cca7a0e [BSC] Enable the use of whitespaces in the subscriber name
This patch (originally by Luca Bertoncello) adds support for spaces
in the subscriber name when specified from the VTY.
2010-06-24 08:06:38 +02:00
Holger Hans Peter Freyther 86481c29d4 bsc_api: Make paging/silent call work with the subscriber_connection
Do not use the lchan for the paging but operate on the
subscriber_connection, change the signals too to not carry
the lchan but the subscriber connection... the silent call
and vty code still assume there is a lchan inside the
subscriber connection.
2010-06-17 15:05:57 +08:00
Sylvain Munaut e824d9c2a1 auth: Add support for XOR test A3A8 algo (and vty commands)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:53 +02:00
Sylvain Munaut 0c873a06b6 vty/auth: Make sure we clear the last tuple when changing auth params
If the Ki or auth algo changes, chances are that the last tuple cannot
be used anymore, so clear it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:52 +02:00
Sylvain Munaut 92b2ff5081 db: Change naming convention for auth info functions
- exported function have a 'db_' prefix
 - use 'sync' vs 'set'
 - use 'for' vs 'by'

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:50 +02:00
Sylvain Munaut c614a6a199 db: Rename AuthTuples to AuthLastTuples
Ultimately, we'll need to store both the last used tuple by a
subscriber and a list of known tuples (for unknown Ki). What's
currently implemented for AuthTuples is the former behavior, so
reflect that.

The second use case will be added as a separate table with separate
accessors later on.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:50 +02:00
Harald Welte d3cf85d57c VTY: Fix help for 'subscriber .... a3a8' command 2010-05-27 10:48:11 +02:00
Harald Welte b4a84e11b7 VTY: Unify Subscriber functions, remove SUBSCR_NODE
We previuosly had a 'subscriber node' under the 'configure node'
which is strange, since subscriber data is not part of the config file.

The relevant operations have now all been moved to the ENABLE node
of the VTY.

Furthermore, 'show subscriber' does no longer require the IMSI but
can also identify the subscriber by ID, TMSI or other identifier.
2010-05-27 10:44:58 +02:00
Harald Welte 4b037e4117 Migrate VTY code to libosmovty 2010-05-25 23:40:38 +02:00
Harald Welte dcccb1818d VTY: decouple telnet_interface from 'struct gsmnet'
We want the VTY and telnet code to be independent from the BSC
application(s).  As a side note, we also like to eliminate static
global variables for 'struct gsm_network' all over the code.

As such, telnet_init() is now passed along a "private" pointer,
which getst stored in telnet_connection.priv.  This telnet_connection
is then stored in vty->priv, which in turn gets dereferenced if
anyone needs a reference to 'struct gsm_network' from the BSC vty
code.

Also:
 * vty_init() now calls cmd_init()
 * the ugliness that telnet_init() calls back into the application by means of
   bsc_vty_init() function has been removed.
 * telnet_init() now returns any errors, so the main program can exit
   e.g. if the port is already in use.
2010-05-16 20:52:23 +02:00
Harald Welte 20474ad029 VTY: use argv_concat() instead of vty_argv_to_buffer + buffer_getstr() 2010-05-16 19:28:32 +02:00
Harald Welte 2832606e5c VTY: More interactive help 2010-05-14 20:05:17 +02:00
Harald Welte 62ab20c5dd [VTY] Remove OpenBSC specific node-exit handling from src/vty
The idea is to move the VTY code into libosmocore at some point,
and for that we need to eliminate OpenBSC specifics from it
2010-05-14 18:59:17 +02:00
Harald Welte 197dea95ff VTY: Introduce common code to add 'description' to objects like BTS
There is now an option to add a human-readable description to objects
that are configured in the VTY.
2010-05-14 18:05:41 +02:00
Harald Welte b4d5b17a8d Ensure all 'view' commands are availalbe from 'enable' too 2010-05-12 18:28:00 +02:00
Holger Hans Peter Freyther 1700c933f2 [vty] Allow to create a buffer in a given context.
Stop using the global vty context for all allocations
and allow to embed the buffer into a given context, and
allocate sub buffers with the context of its parent.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther e0ec326867 [vty] Separate BSC and MSC statistics. Make it easy to print them.
Move the statistics command into the MSC part and move the
BSC statistics printing into a subroutine.
2010-04-15 11:28:14 +02:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Holger Hans Peter Freyther 424c4f0e29 [vty] Move db usage out of the libbsc (fork dumping of subscr)
vty_interface.c is part of libbsc.a but it started to use code
which is found in db.c recently. Fork the subscriber dumping and
provide more information on the layer3+ (MSC) commands. This
is restoring the separation again.
2010-01-06 06:00:40 +01:00
Sylvain Munaut 99792900e8 vty: Add command to set auth algo & Ki for a subscriber
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:51:55 +01:00
Sylvain Munaut 504807001d silent_call: Add option to choose channel type
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:10:47 +01:00
Sylvain Munaut ff1f19e199 Implement a better sending of pending SMS
The previous implementation had some shortcomings:
 - If the MIN ID given was not the exact id of the first unsent SMS,
 it would try to submit the same sms several time until id++ finally
 made id go to the next one.
 - If a subscriber had several SMS pending it would try to submit
 them individually (only to get rejected because a paging for that
 subscriber was already in progress)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-22 13:22:29 +01:00
Harald Welte b54d950ac1 silent call: add header file for function prototypes 2009-11-17 06:00:23 +01:00
Harald Welte 20f9831168 VTY (silent sms / sms): better error reporting 2009-11-14 10:11:45 +01:00
Harald Welte af8c7b497e silent sms: make it silent again (type 64), fix subscriber refcount leak 2009-11-14 10:10:54 +01:00
Harald Welte a148233b5e Add "silent call" feature to OpenBSC
This allows the administrator to use the vty interface to issue a silent
call to a given subscriber by using
	"subscriber extension XXXX silent call start"
and stopping that silent call with
	"subscriber extension XXXX silent call stop"
2009-11-14 10:08:40 +01:00
Harald Welte 98f9c75094 [VTY] restructure sms and silent sms commands 2009-11-14 08:00:53 +01:00
Harald Welte 793a1355d6 [VTY] Add feature to send silent SMS from console
"Silent SMS" is a SMS that is delivered (and confirmed) but
not shown on the display of the phone.  You can now send
such SMS by using
	sms send silent extension 12345 text
or
	sms send silent imsi 123451234512345 text
2009-11-14 06:11:14 +09:00
Holger Hans Peter Freyther e33966cec2 vty: Do not leak the gsm_subscriber 2009-11-06 23:33:59 +09:00
Holger Hans Peter Freyther cfa90d4165 [vty] Move layer3+ functionality to vty_interface_layer3.c
Move everything that is policy, requires access to a DB or is
generally in the domain of the MSC to vty_interface_layer3.c.
2009-08-17 09:52:42 +02:00