Merge pull request #407 from micmac1/kam52

kamailio-5.x: bump to 5.2.1
This commit is contained in:
Jiri Slachta 2019-01-21 06:59:23 +01:00 committed by GitHub
commit f4fb577f9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 149 additions and 124 deletions

View file

@ -1,6 +1,6 @@
#
# Copyright (C) 2017 - 2018 OpenWrt.org
# Copyright (C) 2017 - 2018 Jiri Slachta
# Copyright (C) 2017 OpenWrt.org
# Copyright (C) 2017 Jiri Slachta
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -9,14 +9,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=kamailio5
PKG_VERSION:=5.1.6
PKG_RELEASE:=2
PKG_VERSION:=5.2.1
PKG_RELEASE:=1
PKG_SOURCE_URL := \
https://sources.openwrt.org \
https://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src
PKG_SOURCE_URL:=https://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src
PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz
PKG_HASH:=99880df20dd836e4d9ec03fe863f7a5fc77bb29e3d56f59ea92b8b986deb5186
PKG_HASH:=95d2158f97c76124a381364d99de1420f193275c5a1c9f88489c6409702f2c8f
PKG_USE_MIPS16:=0
PKG_LICENSE:=GPL-2.0+
@ -29,10 +27,13 @@ PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
MODULES_AVAILABLE:= \
acc \
acc_diameter \
acc_json \
alias_db \
app_jsdt \
app_lua \
app_python \
app_python3 \
app_ruby \
app_sqlang \
async \
auth \
@ -67,6 +68,7 @@ MODULES_AVAILABLE:= \
db_flatstore \
db_mysql \
db_postgres \
db_redis \
db_sqlite \
db_text \
db_unixodbc \
@ -96,6 +98,7 @@ MODULES_AVAILABLE:= \
ims_dialog \
ims_diameter_server \
ims_icscf \
ims_ipsec_pcscf \
ims_isc \
ims_ocs \
ims_qos \
@ -145,6 +148,7 @@ MODULES_AVAILABLE:= \
pua \
pua_bla \
pua_dialoginfo \
pua_json \
pua_reginfo \
pua_rpc \
pua_usrloc \
@ -453,10 +457,13 @@ $(eval $(call BuildPackage,kamailio5-util-kambdb-recover))
$(eval $(call BuildKamailio5Module,acc,Accounting,,+kamailio5-mod-tm))
$(eval $(call BuildKamailio5Module,acc_diameter,Accounting for DIAMETER backend,,+kamailio5-mod-acc))
$(eval $(call BuildKamailio5Module,acc_json,Accounting with records exported in JSON format,,+jansson +kamailio5-mod-acc))
$(eval $(call BuildKamailio5Module,alias_db,Database-backend aliases,,))
$(eval $(call BuildKamailio5Module,app_jsdt,Execute JavaScript scripts,,))
$(eval $(call BuildKamailio5Module,app_lua,Execute embedded Lua scripts,,+liblua))
$(eval $(call BuildKamailio5Module,app_python,Execute Python scripts,,+python-light))
$(eval $(call BuildKamailio5Module,app_python3,Python3 scripting interpreter,,@BROKEN +python3-light))
$(eval $(call BuildKamailio5Module,app_ruby,Ruby scripting interpreter,,+libruby))
$(eval $(call BuildKamailio5Module,app_sqlang,Execute Squirrel language scripts,,+libstdcpp))
$(eval $(call BuildKamailio5Module,async,Asynchronous SIP handling functions,,+kamailio5-mod-tm +kamailio5-mod-tmx))
$(eval $(call BuildKamailio5Module,auth,Authentication Framework,,))
@ -491,6 +498,7 @@ $(eval $(call BuildKamailio5Module,db_cluster,Database clustering system,,))
$(eval $(call BuildKamailio5Module,db_flatstore,fast write-only text DB-backend,,))
$(eval $(call BuildKamailio5Module,db_mysql,MySQL DB-backend,,+libmysqlclient,mysql))
$(eval $(call BuildKamailio5Module,db_postgres,PostgreSQL DB-backend,,+libpq,postgres))
$(eval $(call BuildKamailio5Module,db_redis,Database backend with Redis server,,+libhiredis,db_redis))
$(eval $(call BuildKamailio5Module,db_sqlite,SQLite DB-backend,,+libsqlite3,db_sqlite))
$(eval $(call BuildKamailio5Module,db_text,Text DB-backend,,,dbtext/kamailio))
$(eval $(call BuildKamailio5Module,db_unixodbc,UnixODBC DB-backend,,+unixodbc))
@ -520,6 +528,7 @@ $(eval $(call BuildKamailio5Module,ims_charging,IMS charging component module,,+
$(eval $(call BuildKamailio5Module,ims_dialog,IMS dialog tracking module,,+kamailio5-mod-rr +kamailio5-mod-tm))
$(eval $(call BuildKamailio5Module,ims_diameter_server,IMS DIAMETER server module,,+kamailio5-lib-libkamailio-ims +kamailio5-mod-cdp +kamailio5-mod-cdp-avp))
$(eval $(call BuildKamailio5Module,ims_icscf,IMS ICSCF component module,,+kamailio5-lib-libkamailio-ims +kamailio5-mod-cdp +kamailio5-mod-cdp-avp +kamailio5-mod-sl +kamailio5-mod-tm))
$(eval $(call BuildKamailio5Module,ims_ipsec_pcscf,Diameter server implementation,,+kamailio5-lib-libkamailio-ims +kamailio5-mod-ims-usrloc-pcscf +kamailio5-mod-tm +libmnl))
$(eval $(call BuildKamailio5Module,ims_isc,IMS ISC component module,,+kamailio5-lib-libkamailio-ims +kamailio5-mod-ims-usrloc-scscf +kamailio5-mod-tm))
$(eval $(call BuildKamailio5Module,ims_ocs,MS OCS component module,,+kamailio5-lib-libkamailio-ims +kamailio5-mod-cdp +kamailio5-mod-cdp-avp))
$(eval $(call BuildKamailio5Module,ims_qos,IMS Diameter Rx interface between PCSCF and PCRF functions,,+kamailio5-lib-libkamailio-ims +kamailio5-mod-cdp +kamailio5-mod-cdp-avp +kamailio5-mod-ims-dialog +kamailio5-mod-ims-usrloc-pcscf +kamailio5-mod-tm))
@ -569,6 +578,7 @@ $(eval $(call BuildKamailio5Module,presence_xml,XCAP presence,,+kamailio5-mod-pr
$(eval $(call BuildKamailio5Module,pua,Presence User Agent,,+kamailio5-mod-tm +libxml2))
$(eval $(call BuildKamailio5Module,pua_bla,Bridged Line Appearence PUA,,+kamailio5-mod-presence +kamailio5-mod-pua +kamailio5-mod-usrloc))
$(eval $(call BuildKamailio5Module,pua_dialoginfo,Dialog Event PUA,,+kamailio5-mod-dialog +kamailio5-mod-pua))
$(eval $(call BuildKamailio5Module,pua_json,Presence user agent implementation with JSON messages,,+libjson-c))
$(eval $(call BuildKamailio5Module,pua_reginfo,PUA registration info,,+kamailio5-mod-pua +kamailio5-mod-usrloc))
$(eval $(call BuildKamailio5Module,pua_rpc,RPC extensions for PUA,,+kamailio5-mod-pua))
$(eval $(call BuildKamailio5Module,pua_usrloc,PUA User Location,,+kamailio5-mod-pua +kamailio5-mod-usrloc))

View file

@ -23,58 +23,46 @@
#
# control tool for maintaining Kamailio databases
#
--- a/utils/kamctl/kamdbctl.base
+++ b/utils/kamctl/kamdbctl.base
@@ -33,19 +33,19 @@ INSTALL_DBUID_TABLES=${INSTALL_DBUID_TAB
# Used by dbtext and db_berkeley to define tables to be created, used by
# postgres to do the grants
-STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain domain_attrs
- grp uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber
- location location_attrs re_grp trusted address missed_calls
- usr_preferences aliases silo dialog dialog_vars dispatcher dialplan
+STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain domain_attrs \
+ grp uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber \
+ location location_attrs re_grp trusted address missed_calls \
+ usr_preferences aliases silo dialog dialog_vars dispatcher dialplan \
acc_cdrs topos_d topos_t}
-EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy
- carrierroute carrier_name domain_name carrierfailureroute userblacklist
- globalblacklist htable purplemap uacreg pl_pipes mtree mtrees
- sca_subscriptions mohqcalls mohqueues rtpproxy rtpengine
+EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy \
+ carrierroute carrier_name domain_name carrierfailureroute userblacklist \
+ globalblacklist htable purplemap uacreg pl_pipes mtree mtrees \
+ sca_subscriptions mohqcalls mohqueues rtpproxy rtpengine \
dr_gateways dr_rules dr_gw_lists dr_groups}
-PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap
+PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap \
pua rls_presentity rls_watchers}
-DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs
+DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs \
uid_global_attrs uid_uri uid_uri_attrs uid_user_attrs}
# SQL definitions
@@ -69,17 +69,17 @@ GREP=${GREP:-grep}
SED=${SED:-sed}
# define what modules should be installed
-STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group
- permissions registrar usrloc msilo alias_db uri_db speeddial
+STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group \
+ permissions registrar usrloc msilo alias_db uri_db speeddial \
avpops auth_db pdt dialog dispatcher dialplan topos}
PRESENCE_MODULES=${PRESENCE_MODULES:-presence rls}
-EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute
- drouting userblacklist htable purple uac pipelimit mtree sca mohqueue
+EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute \
+ drouting userblacklist htable purple uac pipelimit mtree sca mohqueue \
rtpproxy rtpengine}
-DBUID_MODULES=${UID_MODULES:-uid_auth_db uid_avp_db uid_domain uid_gflags
+DBUID_MODULES=${UID_MODULES:-uid_auth_db uid_avp_db uid_domain uid_gflags \
uid_uri_db}
############################################################
--- a/utils/kamctl/kamctl.base
+++ b/utils/kamctl/kamctl.base
@@ -651,7 +651,7 @@ in SIP_DOMAIN"
check_aor() {
echo "$1" | $EGREP "^$USERNAME_RE@.*\..*" >/dev/null
if [ $? -ne 0 ] ; then
- echo "error: invalid AoR: $1" > /dev/stderr
+ echo "error: invalid AoR: $1" >&2
exit 1
fi
}
@@ -670,7 +670,7 @@ is_aor() {
check_sipaor() {
echo "$1" | $EGREP "^sip(s)?:$USERNAME_RE@.*\..*" >/dev/null
if [ $? -ne 0 ] ; then
- echo "error: invalid SIP AoR: $1" > /dev/stderr
+ echo "error: invalid SIP AoR: $1" >&2
exit 1
fi
}
@@ -681,7 +681,7 @@ check_sipaor() {
check_uri() {
echo "$1" | $EGREP "^sip(s)?:($USERNAME_RE@)?.*\..*" > /dev/null
if [ $? -ne 0 ] ; then
- echo "error: invalid SIP URI: $1" > /dev/stderr
+ echo "error: invalid SIP URI: $1" >&2
exit 1
fi
}
--- a/utils/kamctl/kamctl.sqlbase
+++ b/utils/kamctl/kamctl.sqlbase
@@ -38,9 +38,9 @@ prompt_pw() {
if [ -z "$DBRWPW" ] ; then
savetty=`stty -g`
if [ -z "$1" ] ; then
- printf "Password: " > /dev/stderr
+ printf "Password: " >&2
else
- printf "$1: " > /dev/stderr
+ printf "$1: " >&2
fi
stty -echo
read DBRWPW

View file

@ -0,0 +1,87 @@
--- a/src/modules/cnxcc/Makefile
+++ b/src/modules/cnxcc/Makefile
@@ -8,12 +8,10 @@ include ../../Makefile.defs
auto_gen=
NAME=cnxcc.so
-ifeq ($(CROSS_COMPILE),)
HIREDIS_BUILDER = $(shell \
if pkg-config --exists hiredis; then \
echo 'pkg-config hiredis'; \
fi)
-endif
ifeq ($(HIREDIS_BUILDER),)
HIREDISDEFS=-I$(LOCALBASE)/include
--- a/src/modules/db_redis/Makefile
+++ b/src/modules/db_redis/Makefile
@@ -5,12 +5,10 @@ include ../../Makefile.defs
auto_gen=
NAME=db_redis.so
-ifeq ($(CROSS_COMPILE),)
HIREDIS_BUILDER = $(shell \
if pkg-config --exists hiredis; then \
echo 'pkg-config hiredis'; \
fi)
-endif
ifeq ($(HIREDIS_BUILDER),)
HIREDISDEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/hiredis -I/usr/include/hiredis
@@ -19,7 +17,7 @@ else
HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
-ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
+ifneq (,$(findstring hiredis,$(HIREDISDEFS)))
DEFS+=-DWITH_HIREDIS_PATH
endif
--- a/src/modules/ndb_redis/Makefile
+++ b/src/modules/ndb_redis/Makefile
@@ -5,12 +5,10 @@ include ../../Makefile.defs
auto_gen=
NAME=ndb_redis.so
-ifeq ($(CROSS_COMPILE),)
HIREDIS_BUILDER = $(shell \
if pkg-config --exists hiredis; then \
echo 'pkg-config hiredis'; \
fi)
-endif
ifeq ($(HIREDIS_BUILDER),)
HIREDISDEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/hiredis -I/usr/include/hiredis
@@ -19,7 +17,7 @@ else
HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
-ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
+ifneq (,$(findstring hiredis,$(HIREDISDEFS)))
DEFS+=-DWITH_HIREDIS_PATH
endif
--- a/src/modules/topos_redis/Makefile
+++ b/src/modules/topos_redis/Makefile
@@ -5,12 +5,10 @@ include ../../Makefile.defs
auto_gen=
NAME=topos_redis.so
-ifeq ($(CROSS_COMPILE),)
HIREDIS_BUILDER = $(shell \
if pkg-config --exists hiredis; then \
echo 'pkg-config hiredis'; \
fi)
-endif
ifeq ($(HIREDIS_BUILDER),)
HIREDISDEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/hiredis -I/usr/include/hiredis
@@ -19,7 +17,7 @@ else
HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
-ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
+ifneq (,$(findstring hiredis,$(HIREDISDEFS)))
DEFS+=-DWITH_HIREDIS_PATH
endif

View file

@ -1,30 +0,0 @@
commit 59d287586f502a8df71c2e91899fde49594e072e
Author: Sebastian Kemper <sebastian_ml@gmx.net>
Date: Sun Oct 7 18:54:39 2018 +0200
kamctl: make jsonrpc filter portable
The filter has a regex looking for a literal '{' in the beginning of a
line. Some awk implementations interpret this as a meta character, so
the regex is deemed broken. Example with busybox awk (POSIX):
root@hank2:~# kamctl ps
awk: bad regex '^{.+"id"[ ]*:[ ]*[0-9]+[ ]*}$': Invalid contents of {}
root@hank2:~#
To fix this enclose the character in square brackets. This always
matches for a literal '{' and is portable.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
--- a/utils/kamctl/kamctl.base
+++ b/utils/kamctl/kamctl.base
@@ -699,7 +699,7 @@ filter_json()
$AWK 'function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
BEGIN { line=0; IGNORECASE=1; }
{ line++; }
- NR == 1 && /^{.+"id"[ \t]*:[ \t]*[0-9]+[ \t]*}$/ { print; next; }
+ NR == 1 && /^[{].+"id"[ \t]*:[ \t]*[0-9]+[ \t]*}$/ { print; next; }
NR == 1 && /^200 OK/ { next; }
/^[ \t]*"jsonrpc":[ \t]*"2.0"/ { print; next; }
/^[ \t]*"result":[ \t]*\[.+/ {

View file

@ -1,30 +0,0 @@
commit cbff35909edccffe778d04f3871d880195d82b7a
Author: Sebastian Kemper <sebastian_ml@gmx.net>
Date: Fri Nov 2 10:10:38 2018 +0100
dialplan: fix dp_replace() in cmd_export_t struct
In the struct 'int param_no' is set to '2'. But dp_replace() has actually three
parameters (dpid, inval, outvar), so kamailio's cfg parser fails when
dp_replace() is called:
yyparse(): cfg. parser: failed to find command dp_replace (params 3)
yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 366, column 45: unknown command, missing loadmodule?
This commit fixes 'int param_no' to address this.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
diff --git a/src/modules/dialplan/dialplan.c b/src/modules/dialplan/dialplan.c
index 39ba1ceef..a96b246b7 100644
--- a/src/modules/dialplan/dialplan.c
+++ b/src/modules/dialplan/dialplan.c
@@ -115,7 +115,7 @@ static cmd_export_t cmds[]={
ANY_ROUTE},
{"dp_match",(cmd_function)w_dp_match, 2, fixup_igp_spve,
fixup_free_igp_spve, ANY_ROUTE},
- {"dp_replace",(cmd_function)w_dp_replace, 2, dp_replace_fixup,
+ {"dp_replace",(cmd_function)w_dp_replace, 3, dp_replace_fixup,
dp_replace_fixup_free, ANY_ROUTE},
{0,0,0,0,0,0}
};