aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/smpp_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2019-03-29Write configuration correctly from vty (alert notifications)Keith1-2/+2
The default is [yes] alert-notifications, therefore write "no alert-notifications" in the case that this has been set, in order to preserve configuration after write is called from vty. Change-Id: I4b0363fa34dd9ac0a221844974e4ebf7465b56f4
2019-01-17Cosmetic: Fix spelling in smpp vtyKeith1-2/+2
Change-Id: If2180828e2acd28d96754c593c317c2868644c4b
2019-01-17Make alert notifications vty configurable per ESMEKeith1-0/+26
OSMO-MSC backport Adds (no) alert-notifications as a per-esme vty command, in order to allow some ESMEs to be excluded from alerts. The default is still to send alert notifications to all esme, so no changes are required to the config file to maintain identical operation after this patch. Change-Id: I2b52f2778b24eebc82b2e5e2fb3c2250b1f9e5b0
2017-11-01vty: skip installing cmds now always installed by defaultNeels Hofmeyr1-2/+0
vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I4951982fc78ae167d8e16a672d7af44d703721a9
2016-12-20Fix some typos in stdout outputRuben Undheim1-2/+2
Change-Id: I0dbb438f3bfbaf9744717cbeec31ceefdd679ee9 Related: OS#1694
2016-02-25smpp: refactor initialization, add bind addressNeels Hofmeyr1-12/+63
Make the SMPP bind address configurable (used to be harcoded as "0.0.0.0"). Add VTY command smpp local-tcp A.B.C.D <1-65535> while keeping the old command 'local-tcp-port <1-65535>'. Both the old and the new command immediately change the SMPP listening address and port. Add a LOGL_NOTICE log when the SMPP listening address and/or port change. However, to be useful, this patch has to go somewhat further: refactor the initialization procedure, because it was impossible to run the VTY commands without an already established connection. The SMPP initialization procedure was weird. It would first open a connection on the default port, and a subsequent VTY port reconfiguration while reading the config file would try to re-establish a connection on a different port. If that failed, smpp would switch back to the default port instead of failing the program launch as the user would expect. If anything else ran on port 2775, SMPP would thus refuse to launch despite the config file having a different port: the first bind would always happen on 0.0.0.0:2775. Change that. In the VTY commands, merely store address and port if no fd is established yet. Introduce several SMPP initialization stages: * allocate struct and initialize pointers, * then read config file without immediately starting to listen, * and once the main program is ready, start listening. After that, the VTY command behaves as before: try to re-establish the old connection if the newly supplied address and port don't work out. I'm not actually sure why this switch-back behavior is needed, but fair enough. In detail, replace the function smpp_smsc_init() with the various steps smpp_smsc_alloc_init() -- prepare struct for VTY commands smpp_smsc_conf() -- set addr an port only, for reading the config file smpp_smsc_start() -- establish a first connection, for main() smpp_smsc_restart() -- switch running connection, for telnet VTY smpp_smsc_stop() -- tear down connection, used by _start() twice And replace smpp_openbsc_init() smpp_openbsc_set_net() with smpp_openbsc_alloc_init() smpp_openbsc_start() I'd have picked function names like "_bind"/"_unbind", but in the SMPP protocol there is also a bind/unbind process, so instead I chose the names "_start", "_restart" and "_stop". The smsc struct used to be talloc'd outside of smpp_smsc_init(). Since the smsc code internally uses talloc anyway and employs the smsc struct as talloc context, I decided to enforce talloc allocation within smpp_smsc_alloc_init(). Be stricter about osmo_signal_register_handler() return codes.
2015-07-06sms: Add a way to always route SMS through SMPP systemsHolger Hans Peter Freyther1-0/+22
default-route would only be looked at after there has been no subscriber in the local database. Depending on the setup this is not what one wants. This has been discussed at the OsmoDevCon and there have been hacks in some branches. Let's introduce a VTY command to select if SMPP should be consulted first and then fallback to the current behavior.
2013-10-30vty: Use vty_install_default() instead of bsc_install_default()Jacob Erlbeck1-3/+2
Remove ournode_exit_cmd, ournode_end_cmd, and bsc_install_default() since this functionality is provided by the current libosmocore. Replace calls to bsc_install_default() by call to vty_install_default() with the following semantic patch: @rule1@ expression N; @@ - bsc_install_default(N); + vty_install_default(N); Ticket: OW#952 Sponsored-by: On-Waves ehf
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-2/+2
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).
2013-09-02SMPP: add missing VTY parameter 'deliver-src-imsi' for ESMEHarald Welte1-0/+24
the parameter was already used in the code and saved from VTY code, but somehow the functions for parsing it didn't make it into master.
2013-07-21SMPP: complete the VTY help/documentationHarald Welte1-9/+33
As discovered by osmotestconfig.py, a number of SMPP related VTY commands were missing their help/documentation text.
2013-07-14smpp: Checking an array for NULL will always be falseHolger Hans Peter Freyther1-1/+1
The if (submit->short_message) and if (smsc->system_id) will always be true. Fixes: Coverity CID 1042371, CID 1042372
2013-06-12smpp: Only write the systemd-id if it is not emptyHolger Hans Peter Freyther1-1/+1
system_id is a char array, which makes the NULL check a tautology, so we should check with strlen if the string is empty or not. This is fixing the "write" command of VTY that would otherwise create a config file that can not be parsed.
2013-05-28SMPP: Add new 'dcs_transparent' ESME settingHarald Welte1-0/+27
If an ESME has the dcs_transparent config flag, then the TP-DCS of MO-SMS is transparently passed to SMPP and not converted to SMPP specific data_coding values. This is needed in cases where ESMEs actually care about the exact TP-DCS, as the conversion from TP-DCS to SMPP data_coding is not bijective.
2013-03-13SMPP: Implement SMPP Osmocom Estensions on MO-SMS0.13.0Harald Welte1-0/+26
An ESME can now be configured in the VTY to enable osmocom-extensions, which will add vendor-specific SMPP TLVs for RxLev/RxQual/ARFCN/IMEI and transmit power to the SMPP DELIVER-SM message type.
2013-01-24smpp_vty: Ensure to not print 'system-id' in openbsc.cfg if its emptyHarald Welte1-1/+2
... as an empty system-id would render the openbsc.cfg unparseable on next openbsc start.
2012-11-24SMPP: Implement support for MO SMSHarald Welte1-8/+138
Each ESME can have a number of prefix-matching routes, or it can be a 'default route' to whcih all otherwise unknown SMS destinations are routed.
2012-11-24SMPP: VTY configuration of SMPP code, authentication supportHarald Welte1-0/+308