kamailio cfg file and dockerfile changes to use latest code from upstream
This commit is contained in:
@@ -32,14 +32,14 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && \
|
||||
apt-get -y install mysql-server tcpdump screen tmux ntp ntpdate git-core dkms \
|
||||
gcc flex bison libmysqlclient-dev make libssl-dev libcurl4-openssl-dev \
|
||||
libxml2-dev libpcre3-dev bash-completion g++ autoconf libmnl-dev \
|
||||
libxml2-dev libpcre2-dev bash-completion g++ autoconf libmnl-dev \
|
||||
libsctp-dev libradcli-dev libradcli4 libjson-c-dev pkg-config iproute2 net-tools \
|
||||
iputils-ping
|
||||
|
||||
# Fetch Kamailio code (branch 5.3)
|
||||
RUN mkdir -p /usr/local/src/ && cd /usr/local/src/ && \
|
||||
git clone https://github.com/herlesupreeth/kamailio && \
|
||||
cd kamailio && git checkout 5.3
|
||||
git clone https://github.com/kamailio/kamailio && \
|
||||
cd kamailio && git checkout 4df92312166d8aad700007ef0898d0a7c6ba40b7
|
||||
|
||||
# Build and Install Kamailio
|
||||
RUN cd /usr/local/src/kamailio && make cfg
|
||||
|
@@ -10,13 +10,13 @@ cfg_group_include=
|
||||
include_modules= cdp cdp_avp db_mysql dialplan enum json http_client ims_auth ims_charging ims_dialog ims_diameter_server ims_icscf ims_ipsec_pcscf ims_isc ims_ocs ims_qos ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf outbound presence presence_conference presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml pua pua_bla pua_dialoginfo pua_reginfo pua_rpc pua_usrloc pua_xmpp sctp tls utils xcap_client xcap_server xmlops xmlrpc
|
||||
|
||||
# the list of static modules
|
||||
static_modules=
|
||||
static_modules=
|
||||
|
||||
# the list of modules to skip from compile list
|
||||
skip_modules=
|
||||
skip_modules=
|
||||
|
||||
# the list of modules to exclude from compile list
|
||||
exclude_modules= acc_json acc_radius app_java app_lua app_lua_sr app_mono app_perl app_python app_python3 app_ruby auth_ephemeral auth_identity auth_radius cnxcc cplc crypto db2_ldap db_berkeley db_cassandra db_mongodb db_oracle db_perlvdb db_postgres db_redis db_sqlite db_unixodbc dnssec erlang evapi geoip geoip2 gzcompress h350 http_async_client jansson janssonrpcc jsonrpcc jwt kafka kazoo lcr ldap log_systemd lost lwsc memcached misc_radius ndb_cassandra mqtt ndb_mongodb ndb_redis nsq osp peering phonenum pua_json rabbitmq regex rls rtp_media_server secsipid secsipid_proc snmpstats stirshaken systemdops topos_redis uuid websocket xhttp_pi xmpp $(skip_modules)
|
||||
exclude_modules= malloc_test app_sqlang acc_json acc_radius app_java app_lua app_lua_sr app_mono app_perl app_python app_python3 app_python3s app_ruby app_ruby_proc auth_ephemeral auth_identity auth_radius cnxcc cplc crypto db2_ldap db_berkeley db_cassandra db_mongodb db_oracle db_perlvdb db_postgres db_redis db_sqlite db_unixodbc dnssec erlang evapi geoip geoip2 gzcompress h350 http_async_client http_client jansson janssonrpcc json jsonrpcc jwt kafka kazoo lcr ldap log_systemd lost lwsc memcached microhttpd misc_radius mqtt nats ndb_cassandra ndb_mongodb ndb_redis nsq osp peering phonenum rabbitmq regex rls rtp_media_server ruxc secsipid secsipid_proc slack snmpstats stirshaken systemdops tls_wolfssl tlsa topos_redis uuid websocket xhttp_pi xmpp $(skip_modules)
|
||||
|
||||
modules_all= $(filter-out modules/CVS,$(wildcard modules/*))
|
||||
modules_noinc= $(filter-out $(addprefix modules/, $(exclude_modules) $(static_modules)), $(modules_all))
|
||||
|
@@ -396,6 +396,7 @@ modparam("ims_registrar_pcscf", "ignore_reg_state", 1)
|
||||
modparam("ims_registrar_pcscf", "ignore_contact_rxport_check", 1)
|
||||
modparam("ims_registrar_pcscf", "pending_reg_expires", 30)
|
||||
modparam("ims_registrar_pcscf", "subscription_expires", 36000)
|
||||
modparam("ims_registrar_pcscf", "delete_delay", CONTACT_DELETE_DELAY)
|
||||
modparam("ims_usrloc_pcscf", "expires_grace", 120)
|
||||
|
||||
#!ifdef WITH_REGINFO
|
||||
@@ -427,6 +428,8 @@ modparam("ims_qos", "authorize_video_flow", 1)
|
||||
modparam("ims_qos", "af_signaling_ip", RX_AF_SIGNALING_IP)
|
||||
modparam("ims_qos", "include_rtcp_fd", 1)
|
||||
modparam("ims_qos", "rx_auth_expiry", 36000)
|
||||
modparam("ims_qos", "recv_mode", 1)
|
||||
modparam("ims_qos", "dialog_direction", RX_IMS_REG_DIALOG_DIRECTION)
|
||||
#!endif
|
||||
|
||||
# -- pua params --
|
||||
|
@@ -16,6 +16,21 @@ listen=tcp:PCSCF_IP:5060
|
||||
#!define IPSEC_SERVER_PORT 6100
|
||||
#!define IPSEC_MAX_CONN 10
|
||||
|
||||
# Value: 1 for true and 0 for false
|
||||
#!define IPSEC_DELETE_UNUSED_TUNNELS 1
|
||||
|
||||
# Delay in seconds to delete contact from registrar
|
||||
#!define CONTACT_DELETE_DELAY 10
|
||||
|
||||
# Logical OR of following flags:
|
||||
# - IPSEC_SEND_FORCE_SOCKET 1
|
||||
# - IPSEC_SETDSTURI_FULL 128
|
||||
# - IPSEC_FORWARD_USEVIA 256
|
||||
# - IPSEC_FORWARD_TRYTCP 512
|
||||
#!define IPSEC_FORWARD_FLAGS 897
|
||||
|
||||
#!define RX_IMS_REG_DIALOG_DIRECTION 3
|
||||
|
||||
# IP used in Rx_AAR_Register - IP of this P-CSCF, to be used in the flow for the AF-signaling
|
||||
#!define RX_AF_SIGNALING_IP "PCSCF_IP"
|
||||
# Uncomment the below line only when UE is behind double NAT (e.g. VoIP calling over WiFi/ CN behind a NAT)
|
||||
|
@@ -111,7 +111,7 @@ onreply_route[MO_reply] {
|
||||
append_hf("Contact: $ct;$hdr(C-Params)\r\n");
|
||||
}
|
||||
#!ifdef WITH_IPSEC
|
||||
ipsec_forward("location");
|
||||
ipsec_forward("location", IPSEC_FORWARD_FLAGS);
|
||||
#!endif
|
||||
# In case of 1xx and 2xx do NAT
|
||||
if(status=~"[12][0-9][0-9]")
|
||||
@@ -177,7 +177,7 @@ route[MO_indialog] {
|
||||
#!ifdef WITH_IPSEC
|
||||
if ($dd != "" && $rd != "" && $fs != "") {
|
||||
if ($rd =~ ".*" + $dd + ".*") {
|
||||
ipsec_forward("location");
|
||||
ipsec_forward("location", IPSEC_FORWARD_FLAGS);
|
||||
}
|
||||
}
|
||||
#!endif
|
||||
|
@@ -8,7 +8,7 @@ route[MT] {
|
||||
xnotice("Contact header: $ct\n");
|
||||
set_dlg_profile("term");
|
||||
#!ifdef WITH_IPSEC
|
||||
ipsec_forward("location");
|
||||
ipsec_forward("location", IPSEC_FORWARD_FLAGS);
|
||||
#!endif
|
||||
t_on_reply("MT_reply");
|
||||
}
|
||||
@@ -96,7 +96,7 @@ route[MT_indialog] {
|
||||
#!ifdef WITH_IPSEC
|
||||
if ($dd != "" && $rd != "" && $fs != "") {
|
||||
if ($rd =~ ".*" + $dd + ".*") {
|
||||
ipsec_forward("location");
|
||||
ipsec_forward("location", IPSEC_FORWARD_FLAGS);
|
||||
}
|
||||
}
|
||||
#!endif
|
||||
|
@@ -257,11 +257,11 @@ onreply_route[REGISTER_reply]
|
||||
update_stat("register_success", "+1");
|
||||
update_stat("register_time", "$var(stat_add)");
|
||||
#!ifdef WITH_IPSEC
|
||||
ipsec_forward("location");
|
||||
ipsec_forward("location", IPSEC_FORWARD_FLAGS);
|
||||
}
|
||||
else {
|
||||
if (t_check_status("401")) {
|
||||
if($(T_req($hdr(Security-Client))) != $null && ipsec_create("location")!=1) {
|
||||
if($(T_req($hdr(Security-Client))) != $null && ipsec_create("location", IPSEC_DELETE_UNUSED_TUNNELS)!=1) {
|
||||
send_reply("503", "Service Unavailable (Create ipsec failed)");
|
||||
}
|
||||
if ($sht(ipsec_clients=>$(T_req($ct){nameaddr.uri})) != $null) {
|
||||
|
@@ -1169,7 +1169,7 @@ route[PSTN_handling]
|
||||
# $ru: tel:+(34)-999-888-777
|
||||
# $fu: sip:test@foo.com
|
||||
# becomes $ru: sip:+34999888777@foo.com;user=phone
|
||||
if (tel2sip("$ru", "$fd", "$ru") < 0)
|
||||
if (tel2sip2("$ru", "$fd", "$ru") < 0)
|
||||
xlog("L_WARN","Failed to convert $ru to a sip:-URI - M=$rm R=$ru F=$fu T=$tu IP=$si:$sp ID=$ci\n\n");
|
||||
|
||||
if ($rU =~ "\+[0-9]+") {
|
||||
|
@@ -69,7 +69,7 @@ loadmodule "pua"
|
||||
loadmodule "pua_reginfo"
|
||||
|
||||
modparam("sqlops", "sqlcon", SMS_DB_URL)
|
||||
modparam("dialplan|pua", "db_url", DIALPLAN_PUA_DB_URL)
|
||||
modparam("dialplan", "db_url", DIALPLAN_PUA_DB_URL)
|
||||
modparam("uac", "restore_mode", "none")
|
||||
|
||||
modparam("htable", "htable", "publish_sent=>size=8;autoexpire=SUBSCRIBE_EXPIRE")
|
||||
@@ -81,6 +81,7 @@ modparam("rtimer", "exec", "timer=sms;route=SMS_WORKER")
|
||||
|
||||
modparam("pua_reginfo", "server_address", "sip:SMSC_SERVER")
|
||||
modparam("pua_reginfo", "publish_reginfo", 0)
|
||||
modparam("pua", "db_url", DIALPLAN_PUA_DB_URL)
|
||||
|
||||
####### Routing Logic ########
|
||||
# Main SIP request routing logic
|
||||
|
Reference in New Issue
Block a user