Commit 8fd354c3 authored by Jonas Smedegaard's avatar Jonas Smedegaard

New upstream version 1.4.5

parent 1932028d
2014-08-01 Stipe Tolj <stolj at kannel.org>
* Making stable release 1.4.4.
2018-06-19 Stipe Tolj <stolj at kannel.org>
* Making stable release 1.4.5.
2018-06-19 Stipe Tolj <stolj at kannel.org>
* README: update documentation build package dependencies.
2018-06-19 Stipe Tolj <stolj at kannel.org>
* bootstrap.sh: re-order GNU auto-tools calls, NLC.
* Makefile.in: provide phony 'am--refresh' to cope with bootstrapped source
packages on different environments.
2018-06-19 Stipe Tolj <stolj at kannel.org>
* doc/*/[alligata|arch|userguide|wtls].xml: update DOCTYPE URL reference to
new official URL location to fix 'make docs' processing.
* configure.in: adding Debian 8 location for xml.dcl.
\ No newline at end of file
/* ====================================================================
* The Kannel Software License, Version 1.0
*
* Copyright (c) 2001-2014 Kannel Group
* Copyright (c) 2001-2018 Kannel Group
* Copyright (c) 1998-2001 WapIT Ltd.
* All rights reserved.
*
......
......@@ -96,25 +96,19 @@ XML_DCL=@XML_DCL@
# Version number is common.
suffix = $(SUFFIX)
SUBDIRS = utils
#
# You probably don't need to touch anything below this, if you're just
# compiling and installing the software.
#
STARTSTOPDAEMONSRC=@STARTSTOPDAEMONSRC@
binsrcs = \
wmlscript/wmlsc.c \
wmlscript/wmlsdasm.c \
utils/seewbmp.c \
utils/mtbatch.c \
utils/decode_emimsg.c
wmlscript/wmlsdasm.c
sbinsrcs = \
gw/bearerbox.c \
gw/smsbox.c \
gw/wapbox.c \
utils/run_kannel_box.c \
$(STARTSTOPDAEMONSRC)
gw/wapbox.c
progsrcs = $(binsrcs) $(sbinsrcs)
progobjs = $(progsrcs:.c=.o)
progs = $(progsrcs:.c=@EXE_EXT@)
......@@ -160,10 +154,10 @@ pres = $(srcs:.c=.i)
libs = libgw.a libwmlscript.a libwap.a libgwlib.a
srcdirs = gw gw/smsc gwlib test utils wmlscript checks wap radius
srcdirs = gw gw/smsc gwlib test wmlscript checks wap radius
man1pages = utils/seewbmp.1 utils/mtbatch.1 wmlscript/wmlsc.1 wmlscript/wmlsdasm.1
man8pages = gw/kannel.8 utils/run_kannel_box.8
man1pages = wmlscript/wmlsc.1 wmlscript/wmlsdasm.1
man8pages = gw/kannel.8
docsrcs = $(wildcard grep -l '<!DOCTYPE ' doc/*/*.xml)
docs = $(docsrcs:.xml=.html) $(docsrcs:.xml=.rtf) $(docsrcs:.xml=.ps) $(docsrcs:.xml=.pdf)
......@@ -233,7 +227,7 @@ figs = $(figsrcs:.fig=.png) $(figsrcs:.fig=.ps)
.c.i:
$(CC) $(CFLAGS) -o $@ -E $<
all: progs $(testprogs) $(checkprogs) $(DOCSTARGET) gw-config
all: $(libs) $(SUBDIRS) progs $(testprogs) $(checkprogs) $(DOCSTARGET) gw-config
progs: $(progs)
tests: $(testprogs)
docs: figs ps $(docs)
......@@ -242,15 +236,15 @@ figs: $(figs)
ps: $(ps)
pp: $(pres)
check: all
check: all $(SUBDIRS)
utils/run-checks $(checks)
bench: all $(benchformats)
bench: all $(benchformats) $(SUBDIRS)
benchmarks/report.xml: dummy
benchmarks/run-benchmarks benchmarks/*.sh
dummy:
install: all
install: all $(SUBDIRS)
$(INSTALL) -d $(DESTDIR)$(bindir)
for prog in $(binprogs); do \
$(INSTALL) $$prog \
......@@ -283,7 +277,7 @@ install: all
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel
$(INSTALL_DATA) lib*.a $(DESTDIR)$(libdir)/kannel
install-test: all
install-test: all $(SUBDIRS)
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel/test
(cd test && find . -type f ! -name "*.c" ! -name "*.o" | grep -v ".cvsignore" | grep -v "/CVS/" | while read a ; do $(INSTALL_DATA) $$a $(DESTDIR)$(libdir)/kannel/test ; done)
......@@ -291,20 +285,20 @@ install-test: all
chmod 755 $(DESTDIR)$(libdir)/kannel/$$prog ; \
done
install-checks: all
install-checks: all $(SUBDIRS)
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel/checks
(cd checks && find . -type f ! -name "*.c" ! -name "*.o" | grep -v ".cvsignore" | grep -v "/CVS/" | while read a ; do $(INSTALL_DATA) $$a $(DESTDIR)$(libdir)/kannel/checks ; done)
for prog in $(checks) ; do \
chmod 755 $(DESTDIR)$(libdir)/kannel/$$prog ; \
done
install-contrib: all
install-contrib: all $(SUBDIRS)
$(INSTALL) -d $(DESTDIR)$(docdir)/contrib
(cd contrib && find . -type d ! -name "CVS" | while read a ; do $(INSTALL) -d $(DESTDIR)$(docdir)/contrib/$$a ; done )
(cd contrib && find . -type f ! -name ".cvsignore" | grep -v "/CVS/" | while read a ; do $(INSTALL_DATA) $$a $(DESTDIR)$(docdir)/contrib/$$a ; done )
find $(DESTDIR)$(docdir)/contrib/ -name "*.pl" -o -name "*.sh" -o -name "*.cgi" -o -name "sendsms" -o -name "kannel.monitor" | while read a ; do chmod 755 "$$a" ; done
install-docs:
install-docs: $(SUBDIRS)
$(INSTALL) -d $(DESTDIR)$(docdir)/examples
$(INSTALL_DATA) doc/examples/*.conf $(DESTDIR)$(docdir)/examples
for docfile in userguide alligata wtls ; do \
......@@ -316,13 +310,13 @@ install-docs:
$(INSTALL_DATA) doc/$$docfile/*.png $(DESTDIR)$(docdir)/$$docfile ; \
done
clean:
clean: $(SUBDIRS)
find . -name "*.o" -o -name "*.i" -o -name "*.a" | xargs rm -f
rm -f core gw-config $(progs) $(testprogs) $(checkprogs)
rm -f $(figs) $(ps) $(docs)
rm -f $(benchoutputs)
distclean: clean
distclean: clean $(SUBDIRS)
rm -f Makefile gw-config.h config.cache config.log config.status config.nice .depend gwlib/gw_uuid_types.h
nag:
......@@ -337,19 +331,19 @@ depend .depend: wmlscript/wsgram.h gw-config.h $(soap_depend)
include .depend
libgw.a: $(gwobjs)
@LIBTOOL@ libgw.a $(gwobjs)
@OLD_LIBTOOL@ libgw.a $(gwobjs)
$(RANLIB) libgw.a
libgwlib.a: $(libobjs)
@LIBTOOL@ libgwlib.a $(libobjs)
@OLD_LIBTOOL@ libgwlib.a $(libobjs)
$(RANLIB) libgwlib.a
libwmlscript.a: $(wmlscriptobjs)
@LIBTOOL@ libwmlscript.a $(wmlscriptobjs)
@OLD_LIBTOOL@ libwmlscript.a $(wmlscriptobjs)
$(RANLIB) libwmlscript.a
libwap.a: $(wapobjs)
@LIBTOOL@ libwap.a $(wapobjs)
@OLD_LIBTOOL@ libwap.a $(wapobjs)
$(RANLIB) libwap.a
wmlscript/wsgram.h: wmlscript/wsgram.c
......@@ -381,3 +375,11 @@ gw-config: utils/foobar-config.sh Makefile
"-L$(libdir)/kannel -lgw -lwap -lgwlib $(LIBS)" \
"@VERSION@" > gw-config
chmod 0755 gw-config
$(SUBDIRS):
$(MAKE) -C $@ $(MAKECMDGOALS)
am--refresh:
@:
.PHONY: $(SUBDIRS) am--refresh
NEWS about Kannel: Open Source WAP and SMS Gateway version 1.4.4
NEWS about Kannel: Open Source WAP and SMS Gateway version 1.4.5
This is a STABLE version. It should be usable for production systems.
Please do report problems to the Kannel bug tracking system available at
http://bugs.kannel.org/ or send a mail to <devel@kannel.org> (the development
mailing list).
https://redmine.kannel.org/issues or send a mail to <devel@kannel.org>
(the development mailing list, see https://www.kannel.org/lists.shtml).
Changes since version 1.5.0 devel:
Changes since version 1.4.4 stable:
[*** Beware that the version move from 1.5.0 devel to 1.4.4 stable contains
[*** Beware that the version move from 1.4.4 stable to 1.4.5 stable contains
numerous change sets, with major bug fixes and improvements. Following is a
summary of the main issues. For a complete and detailed set of changes please
refer to the specific ChangeLog in the doc/ directory of the distribution. ***]
Compatibility breakers:
* SMPP config directives can have ONLY ONE session, either config directive
'port' or 'receive-port' can be set to identify if this is a bind as
transmitter or receiver. Configurations with both config directives will
PANIC at startup time.
New features:
* Added DLR support for redis.
* Added DLR support for spool directories.
* Added graceful-restarting of bearerbox via the SIGHUP signal, which can be
used to softly restart bearerbox on config changes allowing existing SMSC
connections to keep on running.
* Added redis support as message store and DLR storage.
* Added DLR support for SQLite3.
* Added Apache Cassandra 2.1, 2.2 and 3.0 support as DLR storage.
* Added SMSC support for GSMA OneAPI/Ericsson ParlayX via gSOAP.
* Added SMSC SMPP support for optional TLVs of response PDUs via meta-data.
* Added OpenSSL 1.1.x support.
* Added 'dead-start' feature for SMSC groups.
* Added support for chained certificate files.
* Added SMSC HTTP generic support for meta-data.
* Added support to define which SSL/TLS chipher suites to use.
* Added UCS-2 (Unicode) support for FAKE SMSC MOs.
* Allow override of specific SMPP values via meta-data forwarding, i.e. for
TON/NPI, DCS.
* Splitting white/black-list into per direction (sender/receiver) allowing
a more fine grained control.
* Added 'instances' directive for 'group = smsc' contexts to duplicate the
configuration group into any number of instances, so there is no need to
duplicate the configuration in the config files, reducing the potential
for errors and redundancy.
* Added per line PDU dump function for SMPP.
* Added smsbox support to listen to specific interfaces.
* Added support for constant SMPP TLVs.
Bugfixes:
* Fixed smsbox HTTP call starvation while retrying.
* Fixed various SMPP module issues.
* Fixed various minor memory leaks for smsbox reported by valgrind.
* Better handling of MySQL DBPool temporary error codes.
* Converted various PANIC conditions to WARNING/ERROR conditions to keep
the operations running.
* Fixed various issues with DLR handling.
* Various fixes in the routing abstraction layer.
* Fixed segfault in logging module for permission errors.
* Fixed smsbox's XML MT and XML POST processing.
* Fixed various segmentation fault possibilities.
* Fixed HTTP SMSC queue counter.
* Fixed various internal character transcoding issues.
* Fixed waiting time when in bearerbox shutdown phase.
* Fixed issues for smsbox shutdown.
* Fixed missing character set processing in HTTP SMSC (type kannel).
* Fixed bearerbox MO routing logic.
* Fixed MO concatenation handling for re-routing cases.
* Fixed various memory leaks.
* Fixing asymmetric load distribution for this HTTP SMSC type.
* Fixing HTTP Keep-Alive indication as HTTP server.
* Fixed HTTP UCS-2 payload forwarding.
* Fixed HTTP admin command /reload-lists.
Changes since version 1.4.3:
......
......@@ -19,10 +19,11 @@ Introduction
Requirements
You need a Unix-like operating system that supports POSIX threads
(pthreads.h). We use RedHat Linux and Debian GNU/Linux systems.
There is also support for the Cygwin 1.3 POSIX emulation layer
for the Win32 platforms.
(pthreads.h). We use RedHat/CentOS Linux and Debian/Ubuntu GNU/Linux
systems as main targets.
There is also support for the Cygwin POSIX emulation layer for the
Win32 platforms.
You need GNU make, other make's tend not to work. For example,
the FreeBSD and Solaris versions of make do not work. Check the
......@@ -45,40 +46,32 @@ Documentation
documentation (currently very outdated) is in the doc/arch
directory.
In order to convert the documentation from DocBook (a markup
language) to HTML and PostScript, you need some tools.
In order to convert the documentation from DocBook (a mark-up
language) to HTML and PostScript, you need some tools. Please
find here the required packages:
On a Debian GNU/Linux system, you need to install the following
packages via:
Debian 8 GNU/Linux:
$ sudo apt-get install graphicsmagick-imagemagick-compat \
docbook-dsssl jadetex transfig openjade
$ sudo apt-get install openjade jadetex transfig imagemagick \
docbook-dsssl docbook-utils
On a Red Hat Linux (RHEL) system, you need to install the following
packages, in order:
sgml-common
psgml
docbook
stylesheets
jade
jadetex
transfig
See http://www.rpmfind.net to find the packages.
Red Hat Linux 7 (RHEL/CentOS):
$ sudo yum install openjade texlive-jadetex transfig ImageMagick \
docbook-style-dsssl texlive
On a Fedora Core system, you need to install the following packages:
Fedora Core 7 (and higher):
$ sudo yum install openjade jadetex docbook-style-dsssl \
texlive-dvips transfig ImageMagick
$ sudo yum install openjade jadetex transfig ImageMagick \
docbook-style-dsssl
On a Gentoo system, the following should do:
Gentoo:
$ sudo emerge transfig jadetex docbook-dsssl-stylesheets
$ sudo emerge transfig jadetex docbook-dsssl-stylesheets
On a Mandrakelinux system, the following should do:
Mandrake:
$ urpmi transfig jadetex docbook-style-dsssl
$ urpmi transfig jadetex docbook-style-dsssl
Then apply this change to /usr/share/texmf/web2c/texmf.cnf:
......
1.4.4
1.4.5
This file contains the version number of the gateway.
It is stored on the first line. Nothing else should
be there.
......
This diff is collapsed.
2015-05-14 Rene Kluwen <rene.kluwen at chimit.nl>
Fixed crash when garbage was sent to the opensmppbox port.
2014-04-29 Stipe Tolj <stolj at kannel.org>
* doc/userguide.xml: move from DocBook V3.1 to V4.2 and fix various XML
tag errors. No content change.
......
......@@ -80,6 +80,7 @@ SINGLE_GROUP(opensmppbox,
OCTSTR(use-systemid-as-smsboxid)
OCTSTR(enable-pam)
OCTSTR(pam-acl)
OCTSTR(alt-charset)
)
MULTI_GROUP(smsc-route,
......
......@@ -79,6 +79,7 @@
#include "gw/dlr.h"
#include "gw/heartbeat.h"
#include "gw/meta_data.h"
#include "gw/bb_store.h"
#undef GW_NAME
#undef GW_VERSION
......@@ -125,6 +126,7 @@ static Octstr *smppbox_id;
static Octstr *our_system_id;
static Octstr *route_to_smsc;
static time_t smpp_timeout;
static Octstr *alt_charset;
static int systemidisboxcid;
static int enablepam;
......@@ -967,10 +969,10 @@ static List *msg_to_pdu(Boxc *box, Msg *msg)
/*
* convert to the given alternative charset
*/
if (charset_convert(pdu->u.deliver_sm.short_message, "ISO-8859-1",
octstr_get_cstr(box->alt_charset)) != 0)
if (charset_convert(pdu->u.deliver_sm.short_message, "UTF-8", octstr_get_cstr(box->alt_charset)) != 0)
error(0, "Failed to convert msgdata from charset <%s> to <%s>, will send as is.",
"ISO-8859-1", octstr_get_cstr(box->alt_charset));
octstr_get_cstr(box->alt_charset), "UTF-8");
pdu->u.deliver_sm.sm_length = octstr_len(pdu->u.deliver_sm.short_message);
}
}
......@@ -1193,9 +1195,9 @@ static Msg *pdu_to_msg(Boxc *box, SMPP_PDU *pdu, long *reason)
* unless it was specified binary, ie. UDH indicator was detected
*/
if (box->alt_charset && msg->sms.coding != DC_8BIT) {
if (charset_convert(msg->sms.msgdata, octstr_get_cstr(box->alt_charset), "ISO-8859-1") != 0)
if (charset_convert(msg->sms.msgdata, octstr_get_cstr(box->alt_charset), "UTF-8") != 0)
error(0, "Failed to convert msgdata from charset <%s> to <%s>, will leave as is.",
octstr_get_cstr(box->alt_charset), "ISO-8859-1");
"UTF-8", octstr_get_cstr(box->alt_charset));
msg->sms.coding = DC_7BIT;
} else { /* assume GSM 03.38 7-bit alphabet */
charset_gsm_to_utf8(msg->sms.msgdata);
......@@ -1379,9 +1381,9 @@ static Msg *data_sm_to_msg(Boxc *box, SMPP_PDU *pdu, long *reason)
* unless it was specified binary, ie. UDH indicator was detected
*/
if (box->alt_charset && msg->sms.coding != DC_8BIT) {
if (charset_convert(msg->sms.msgdata, octstr_get_cstr(box->alt_charset), "ISO-8859-1") != 0)
if (charset_convert(msg->sms.msgdata, "UTF-8", octstr_get_cstr(box->alt_charset)) != 0)
error(0, "Failed to convert msgdata from charset <%s> to <%s>, will leave as is.",
octstr_get_cstr(box->alt_charset), "ISO-8859-1");
"UTF-8", octstr_get_cstr(box->alt_charset));
msg->sms.coding = DC_7BIT;
} else { /* assume GSM 03.38 7-bit alphabet */
charset_gsm_to_utf8(msg->sms.msgdata);
......@@ -1624,6 +1626,9 @@ static void handle_pdu(Connection *conn, Boxc *box, SMPP_PDU *pdu) {
/* destroy values */
gwlist_destroy(parts_list, msg_destroy_item);
}
else if (msg != msg2) {
msg_destroy(msg);
}
}
}
break;
......@@ -1667,6 +1672,9 @@ static void handle_pdu(Connection *conn, Boxc *box, SMPP_PDU *pdu) {
/* destroy values */
gwlist_destroy(parts_list, msg_destroy_item);
}
else if (msg != msg2) {
msg_destroy(msg);
}
}
}
break;
......@@ -1730,7 +1738,8 @@ static Boxc *boxc_create(int fd, Octstr *ip, int ssl)
boxc->boxc_id = NULL;
boxc->routable = 0;
boxc->smpp_pdu_counter = counter_create();
boxc->alt_charset = NULL; /* todo: get from config */
boxc->alt_charset = NULL;
if (NULL != alt_charset) boxc->alt_charset = octstr_duplicate(alt_charset); /* todo: make this configurable on a per-esme basis */
boxc->version = 0x33; /* default value, set upon receiving a bind */
boxc->route_to_smsc = route_to_smsc ? octstr_duplicate(route_to_smsc) : NULL;
boxc->msg_acks = dict_create(256, smpp_pdu_destroy_item);
......@@ -1748,6 +1757,7 @@ static Boxc *boxc_create(int fd, Octstr *ip, int ssl)
boxc->validityperiod = -1;
boxc->priority = 0;
boxc->mo_recode = 0;
boxc->sms_service = NULL;
return boxc;
}
......@@ -1773,9 +1783,13 @@ static void boxc_destroy(Boxc *boxc)
}
if (boxc->client_ip)
octstr_destroy(boxc->client_ip);
if (boxc->alt_charset) {
octstr_destroy(boxc->alt_charset);
}
dict_destroy(boxc->msg_acks);
dict_destroy(boxc->deliver_acks);
octstr_destroy(boxc->sms_service);
if (boxc->sms_service)
octstr_destroy(boxc->sms_service);
gw_free(boxc);
}
......@@ -2004,16 +2018,16 @@ static void bearerbox_to_smpp(void *arg)
Octstr *text;
text = octstr_duplicate(msg->sms.msgdata);
if(0 == octstr_recode (octstr_imm("iso-8859-1"), octstr_imm("UTF-16BE"), text)) {
if(0 == octstr_recode (octstr_imm("UTF-8"), octstr_imm("UTF-16BE"), text)) {
if(octstr_search(text, octstr_imm("&#"), 0) == -1) {
/* XXX I'm trying to search for &#xxxx; text, which indicates that the
* text couldn't be recoded.
* We should use other function to do the recode or detect it using
* other method */
info(0, "MO message converted from UCS-2 to ISO-8859-1");
info(0, "MO message converted from UCS-2 to UTF-8");
octstr_destroy(msg->sms.msgdata);
msg->sms.msgdata = octstr_duplicate(text);
msg->sms.charset = octstr_create("ISO-8859-1");
msg->sms.charset = octstr_create("UTF-8");
msg->sms.coding = DC_7BIT;
converted=1;
} else {
......@@ -2404,6 +2418,8 @@ static void init_smppbox(Cfg *cfg)
CfgGroup *grp;
Octstr *logfile;
long lvl;
Octstr *val, *log; /* temporary store variables */
long store_dump_freq = -1; /* dummy variable */
/* some default values */
smppbox_port = 13005;
......@@ -2417,6 +2433,25 @@ static void init_smppbox(Cfg *cfg)
/* init dlr storage */
dlr_init(cfg);
/* init storage store */
grp= cfg_get_single_group(cfg, octstr_imm("core"));
if (grp != NULL) {
log = cfg_get(grp, octstr_imm("store-file"));
if (log != NULL) {
warning(0, "'store-file' option deprecated, please use 'store-location' and 'store-type' instead.");
val = octstr_create("file");
} else {
log = cfg_get(grp, octstr_imm("store-location"));
val = cfg_get(grp, octstr_imm("store-type"));
}
if (val != NULL) {
if (store_init(cfg, val, log, store_dump_freq, msg_pack, msg_unpack_wrapper) == -1) {
panic(0, "Could not start with store init failed.");
}
}
octstr_destroy(val);
octstr_destroy(log);
}
/* initialize low level PDUs */
if (smpp_pdu_init(cfg) == -1)
......@@ -2450,6 +2485,7 @@ static void init_smppbox(Cfg *cfg)
if (our_system_id == NULL) {
panic(0, "our-system-id is not set.");
}
alt_charset = cfg_get(grp, octstr_imm("alt-charset"));
/* setup logfile stuff */
logfile = cfg_get(grp, octstr_imm("log-file"));
......
2015-11-10 Rnne Kluwen <rene dot kluwen at chimit.nl>
- Initializing mysql port to 3306 if not set in config.
Thanks to Vyronas Tsingaras <vtsingaras at amdtelecom.net> for the patch.
2014-04-29 Stipe Tolj <stolj at kannel.org>
* doc/userguide.xml: move from DocBook V3.1 to V4.2 and fix various XML
tag errors. No content change.
......
......@@ -25,4 +25,6 @@ SINGLE_GROUP(sqlbox,
OCTSTR(ssl-server-cert-file)
OCTSTR(ssl-server-key-file)
OCTSTR(ssl-trusted-ca-file)
OCTSTR(ssl-client-cipher-list)
OCTSTR(ssl-server-cipher-list)
)
......@@ -146,6 +146,7 @@ Msg *mysql_fetch_msg()
msg->sms.charset = octstr_null_create(row[23]);
msg->sms.binfo = octstr_null_create(row[25]);
msg->sms.meta_data = octstr_null_create(row[26]);
msg->sms.priority = atol_null(row[27]);
if (row[24] == NULL) {
msg->sms.boxc_id= octstr_duplicate(sqlbox_id);