[sr-dev] git:master:07dbb965: etc/kamailio.cfg: detect sipvicious as scanner
Module: kamailio Branch: master Commit: 07dbb9659ac4bf2e879c0246a7532851f4d631fb URL: https://github.com/kamailio/kamailio/commit/07dbb9659ac4bf2e879c0246a7532851f4d631fb Author: Kevin Olbrich Committer: GitHub Date: 2019-03-22T21:45:35+01:00 etc/kamailio.cfg: detect sipvicious as scanner --- Modified: etc/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/07dbb9659ac4bf2e879c0246a7532851f4d631fb.diff Patch: https://github.com/kamailio/kamailio/commit/07dbb9659ac4bf2e879c0246a7532851f4d631fb.patch --- diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index 851a3d0af8..20871fbc62 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -581,7 +581,7 @@ route[REQINIT] { } } #!endif - if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") { + if($ua =~ "friendly-scanner|sipcli|sipvicious|VaxSIPUserAgent") { # silent drop for scanners - uncomment next line if want to reply # sl_send_reply("200", "OK"); exit; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e04e65f0: Merge pull request #1903 from kevin-olbrich/patch-1
Module: kamailio Branch: master Commit: e04e65f06c724929829912afb42e96efcb137c29 URL: https://github.com/kamailio/kamailio/commit/e04e65f06c724929829912afb42e96efcb137c29 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-03-23T18:30:42+01:00 Merge pull request #1903 from kevin-olbrich/patch-1 etc/kamailio.cfg: detect sipvicious as scanner --- Modified: etc/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/e04e65f06c724929829912afb42e96efcb137c29.diff Patch: https://github.com/kamailio/kamailio/commit/e04e65f06c724929829912afb42e96efcb137c29.patch --- diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index 851a3d0af8..20871fbc62 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -581,7 +581,7 @@ route[REQINIT] { } } #!endif - if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") { + if($ua =~ "friendly-scanner|sipcli|sipvicious|VaxSIPUserAgent") { # silent drop for scanners - uncomment next line if want to reply # sl_send_reply("200", "OK"); exit; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:4489b19f: Merge pull request #1910 from kamailio/auth_username_expired
Module: kamailio Branch: master Commit: 4489b19fe3c3d82442c98323a348cca69ef520cc URL: https://github.com/kamailio/kamailio/commit/4489b19fe3c3d82442c98323a348cca69ef520cc Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-03-28T17:14:43+01:00 Merge pull request #1910 from kamailio/auth_username_expired AUTH_USERNAME_EXPIRED auth api return code --- Modified: src/modules/auth/api.h Modified: src/modules/auth_ephemeral/authorize.c --- Diff: https://github.com/kamailio/kamailio/commit/4489b19fe3c3d82442c98323a348cca69ef520cc.diff Patch: https://github.com/kamailio/kamailio/commit/4489b19fe3c3d82442c98323a348cca69ef520cc.patch --- diff --git a/src/modules/auth/api.h b/src/modules/auth/api.h index 9730b409ed..33d131840a 100644 --- a/src/modules/auth/api.h +++ b/src/modules/auth/api.h @@ -39,6 +39,7 @@ */ typedef enum auth_cfg_result { AUTH_USER_MISMATCH = -8,/*!< Auth user != From/To user */ + AUTH_USERNAME_EXPIRED = -7, /*!< Ephemeral auth username expired */ AUTH_NONCE_REUSED = -6, /*!< Returned if nonce is used more than once */ AUTH_NO_CREDENTIALS = -5, /*!< Credentials missing */ AUTH_STALE_NONCE = -4, /*!< Stale nonce */ diff --git a/src/modules/auth_ephemeral/authorize.c b/src/modules/auth_ephemeral/authorize.c index 745f12d7ab..216332b321 100644 --- a/src/modules/auth_ephemeral/authorize.c +++ b/src/modules/auth_ephemeral/authorize.c @@ -203,7 +203,7 @@ int autheph_verify_timestamp(str *_username) if (cur_time > expires) { LM_WARN("username has expired\n"); - return -1; + return AUTH_USERNAME_EXPIRED; } return 0; @@ -255,10 +255,16 @@ static inline int digest_authenticate(struct sip_msg *_m, str *_realm, username = ((auth_body_t *) h->parsed)->digest.username.whole; LM_DBG("username: %.*s\n", username.len, username.s); - if (autheph_verify_timestamp(&username) < 0) + int res = autheph_verify_timestamp(&username); + if (res < 0) { - LM_ERR("invalid timestamp in username\n"); - return AUTH_ERROR; + if (res == -1) + { + LM_ERR("invalid timestamp in username\n"); + return AUTH_ERROR; + } else { + return AUTH_USERNAME_EXPIRED; + } } SECRET_LOCK; @@ -489,10 +495,16 @@ int ki_autheph_authenticate(sip_msg_t *_m, str *susername, str *spassword) return AUTH_ERROR; } - if (autheph_verify_timestamp(susername) < 0) + int res = autheph_verify_timestamp(susername); + if (res < 0) { - LM_ERR("invalid timestamp in username\n"); - return AUTH_ERROR; + if (res == -1) + { + LM_ERR("invalid timestamp in username\n"); + return AUTH_ERROR; + } else { + return AUTH_USERNAME_EXPIRED; + } } LM_DBG("username: %.*s\n", susername->len, susername->s); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:4e91dc32: Merge pull request #1914 from marcocapetta/master
Module: kamailio Branch: master Commit: 4e91dc3222d9bb6e41317d4ca0eabe95a933c45a URL: https://github.com/kamailio/kamailio/commit/4e91dc3222d9bb6e41317d4ca0eabe95a933c45a Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-03-28T17:17:57+01:00 Merge pull request #1914 from marcocapetta/master Small fixes to dialplan module when an avp is used as subst_exp --- Modified: src/modules/dialplan/dp_repl.c --- Diff: https://github.com/kamailio/kamailio/commit/4e91dc3222d9bb6e41317d4ca0eabe95a933c45a.diff Patch: https://github.com/kamailio/kamailio/commit/4e91dc3222d9bb6e41317d4ca0eabe95a933c45a.patch --- diff --git a/src/modules/dialplan/dp_repl.c b/src/modules/dialplan/dp_repl.c index 06762ce6d2..06534a9dab 100644 --- a/src/modules/dialplan/dp_repl.c +++ b/src/modules/dialplan/dp_repl.c @@ -432,7 +432,7 @@ int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, /*search for the pattern from the compiled subst_exp*/ if (pcre_exec(subst_comp, NULL, instr->s, instr->len, 0, 0, ovector, 3 * (MAX_REPLACE_WITH + 1)) <= 0) { - LM_ERR("the string %.*s matched " + LM_DBG("the string %.*s matched " "the match_exp %.*s but not the subst_exp %.*s!\n", instr->len, instr->s, rule->match_exp.len, rule->match_exp.s, @@ -700,7 +700,7 @@ int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, } } if(rulep->tflags&DP_TFLAGS_PV_SUBST) { - re_list = dpl_dynamic_pcre_list(msg, &rulep->match_exp); + re_list = dpl_dynamic_pcre_list(msg, &rulep->subst_exp); if(re_list==NULL) { /* failed to compile dynamic pcre -- ignore */ LM_DBG("failed to compile dynamic pcre[%.*s]\n", @@ -721,6 +721,13 @@ int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, pkg_free(re_list); re_list = rt; } while(re_list); + if(rez<0) { + LM_ERR("the string %.*s matched " + "the match_exp %.*s but not the subst_exp %.*s!\n", + input->len, input->s, + rulep->match_exp.len, rulep->match_exp.s, + rulep->subst_exp.len, rulep->subst_exp.s); + } } else { if(rule_translate(msg, input, rulep, rulep->subst_comp, output)!=0){ ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6224a38d: Merge pull request #1913 from samael33/master
Module: kamailio Branch: master Commit: 6224a38df635876333749d6fc6919f31dc087991 URL: https://github.com/kamailio/kamailio/commit/6224a38df635876333749d6fc6919f31dc087991 Author: Federico Cabiddu Committer: GitHub Date: 2019-03-29T07:53:29+01:00 Merge pull request #1913 from samael33/master Small notes on $http_req(timeout) usage. --- Modified: src/modules/http_async_client/doc/http_async_client_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/6224a38df635876333749d6fc6919f31dc087991.diff Patch: https://github.com/kamailio/kamailio/commit/6224a38df635876333749d6fc6919f31dc087991.patch --- diff --git a/src/modules/http_async_client/doc/http_async_client_admin.xml b/src/modules/http_async_client/doc/http_async_client_admin.xml index 5a050bf424..a9e344a5dc 100644 --- a/src/modules/http_async_client/doc/http_async_client_admin.xml +++ b/src/modules/http_async_client/doc/http_async_client_admin.xml @@ -435,7 +435,7 @@ xlog("L_INFO", "received reply for query $http_req_id\n"); hdr: sets/modifies/removes a HTTP header. N.B.: setting this variable multiple times will add several headers to the query. body: sets/modifies/removes the request body method: sets the HTTP method: either "GET", "POST", "PUT" or "DELETE" (these are the supported methods). (Note: if the method is not set, curl will use GET, or POST if a body is specified) - timeout: sets the HTTP timeout + timeout: sets the HTTP timeout. (Note, this timeout should be normally less than tm.fr_timer timeout, because transaction timeout has a higher priority over HTTP timeout) tls_client_cert: sets the client certificate to use tls_client_key: sets the client certificate key to use tls_ca_path: sets the CA certificate path to use ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.1:547f3dfa: Merge pull request #1925 from sergey-safarov/pg_make
Module: kamailio Branch: 5.1 Commit: 547f3dfaa6536f0e768b89844aa287d8de478b77 URL: https://github.com/kamailio/kamailio/commit/547f3dfaa6536f0e768b89844aa287d8de478b77 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-04-10T10:54:40+02:00 Merge pull request #1925 from sergey-safarov/pg_make [5.1] Fixed packaging in opensuse/tumbleweed --- Modified: src/modules/db_postgres/Makefile --- Diff: https://github.com/kamailio/kamailio/commit/547f3dfaa6536f0e768b89844aa287d8de478b77.diff Patch: https://github.com/kamailio/kamailio/commit/547f3dfaa6536f0e768b89844aa287d8de478b77.patch --- diff --git a/src/modules/db_postgres/Makefile b/src/modules/db_postgres/Makefile index d780467f27..26a76d8ebc 100644 --- a/src/modules/db_postgres/Makefile +++ b/src/modules/db_postgres/Makefile @@ -9,6 +9,19 @@ NAME=db_postgres.so # the autodetection # CROSS_COMPILE=true +ifeq ($(CROSS_COMPILE),) +LIBPQ_BUILDER = $(shell \ + if pkg-config --exists libpq; then \ + echo 'pkg-config libpq'; \ + fi) +ifneq ($(LIBPQ_BUILDER),) + DEFS += $(shell $(LIBPQ_BUILDER) --cflags) + LIBS += $(shell $(LIBPQ_BUILDER) --libs) +endif +endif + +ifeq ($(LIBPQ_BUILDER),) + ifeq ($(CROSS_COMPILE),) PGCFG=$(shell which pg_config) endif @@ -27,6 +40,8 @@ else -L$(LOCALBASE)/lib/pgsql -lpq endif +endif + #DEFS += -DPG_TEST DEFS += -DSER_MOD_INTERFACE ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:ef09ff97: Merge pull request #1927 from kamailio/rfuchs/openssl-locking-fix
Module: kamailio Branch: master Commit: ef09ff976bb06185d9b50abe0f1564d8fc3e1a7c URL: https://github.com/kamailio/kamailio/commit/ef09ff976bb06185d9b50abe0f1564d8fc3e1a7c Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-04-15T08:38:33+02:00 Merge pull request #1927 from kamailio/rfuchs/openssl-locking-fix Preloaded library for openssl v1.1 process shared locking --- Added: src/modules/tls/utils/openssl_mutex_shared/Makefile Added: src/modules/tls/utils/openssl_mutex_shared/README.md Added: src/modules/tls/utils/openssl_mutex_shared/openssl_mutex_shared.c Modified: src/modules/tls/Makefile Modified: src/modules/tls/doc/tls.xml --- Diff: https://github.com/kamailio/kamailio/commit/ef09ff976bb06185d9b50abe0f1564d8fc3e1a7c.diff Patch: https://github.com/kamailio/kamailio/commit/ef09ff976bb06185d9b50abe0f1564d8fc3e1a7c.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:caaa8650: Merge pull request #1929 from kamailio/usrloc_sync-better-warn-log
Module: kamailio Branch: master Commit: caaa8650c2882eb665dd97b4fa4518ee0f27c759 URL: https://github.com/kamailio/kamailio/commit/caaa8650c2882eb665dd97b4fa4518ee0f27c759 Author: Charles Chance Committer: GitHub Date: 2019-04-18T13:01:02+01:00 Merge pull request #1929 from kamailio/usrloc_sync-better-warn-log dmq_usrloc: output AoR on warning message --- Modified: src/modules/dmq_usrloc/usrloc_sync.c --- Diff: https://github.com/kamailio/kamailio/commit/caaa8650c2882eb665dd97b4fa4518ee0f27c759.diff Patch: https://github.com/kamailio/kamailio/commit/caaa8650c2882eb665dd97b4fa4518ee0f27c759.patch --- diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c index 1a7eef0ab8..5f7b55fb94 100644 --- a/src/modules/dmq_usrloc/usrloc_sync.c +++ b/src/modules/dmq_usrloc/usrloc_sync.c @@ -144,7 +144,7 @@ static int delete_contact(str aor, ucontact_info_t* ci) /* it locks the udomain on success */ if (dmq_ul.get_urecord_by_ruid(_d, dmq_ul.get_aorhash(&aor), &ci->ruid, &r, &c) != 0) { - LM_WARN("AOR/Contact not found\n"); + LM_WARN("AOR/Contact ['%.*s'] not found\n", aor.len, aor.s); return -1; } if (dmq_ul.delete_ucontact(r, c) != 0) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:413b6d57: Fix incorrect length of static string
Module: kamailio Branch: master Commit: 413b6d572683c0d8e7a40f0788d881112b5a1aa2 URL: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d881112b5a1aa2 Author: Jan Janak Committer: GitHub Date: 2019-04-19T16:13:44-04:00 Fix incorrect length of static string This change fixes Coverity bug "185775 Out-of-bounds access". --- Modified: src/modules/imc/imc_cmd.c --- Diff: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d881112b5a1aa2.diff Patch: https://github.com/kamailio/kamailio/commit/413b6d572683c0d8e7a40f0788d881112b5a1aa2.patch --- diff --git a/src/modules/imc/imc_cmd.c b/src/modules/imc/imc_cmd.c index 391c7840a0..2dd6d834db 100644 --- a/src/modules/imc/imc_cmd.c +++ b/src/modules/imc/imc_cmd.c @@ -991,9 +991,9 @@ int imc_handle_rooms(struct sip_msg* msg, imc_cmd_t *cmd, p = imc_body_buf; left = IMC_BUF_SIZE; - memcpy(p, "Rooms:\n", 9); - p += 9; - left -= 9; + memcpy(p, "Rooms:\n", 7); + p += 7; + left -= 7; for (i = 0; i < imc_hash_size; i++) { lock_get(&_imc_htable[i].lock); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:ff1ce230: Merge pull request #1931 from ionutionita92/master
Module: kamailio Branch: master Commit: ff1ce23083387e15cdd7dde5d5b59e5564d2409c URL: https://github.com/kamailio/kamailio/commit/ff1ce23083387e15cdd7dde5d5b59e5564d2409c Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-04-23T08:53:28+02:00 Merge pull request #1931 from ionutionita92/master siptrace: safety check for tm callback parameter --- Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/ff1ce23083387e15cdd7dde5d5b59e5564d2409c.diff Patch: https://github.com/kamailio/kamailio/commit/ff1ce23083387e15cdd7dde5d5b59e5564d2409c.patch --- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index c34d25d249..e559d7874a 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -1956,6 +1956,12 @@ static void trace_dialog_transaction(struct dlg_cell* dlg, int type, struct dlg_ return; } + /* coverity fix - there shouldn't be a scenario for this to happen */ + if (params == NULL) { + LM_ERR("NULL tm params!\n"); + return; + } + /** * DUAL BYE - internally generated BYE from kamailio * set flag to signal request_in callback which will register ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8df2a65a: Merge pull request #1928 from adubovikov/master
Module: kamailio Branch: master Commit: 8df2a65a9d39cd929e7e2554d0ff7fa6b176458f URL: https://github.com/kamailio/kamailio/commit/8df2a65a9d39cd929e7e2554d0ff7fa6b176458f Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-04-23T08:55:08+02:00 Merge pull request #1928 from adubovikov/master modules:sipcapture Fixed wrong pointer for payload buffer. --- Modified: src/modules/sipcapture/hep.c Modified: src/modules/sipcapture/sipcapture.c --- Diff: https://github.com/kamailio/kamailio/commit/8df2a65a9d39cd929e7e2554d0ff7fa6b176458f.diff Patch: https://github.com/kamailio/kamailio/commit/8df2a65a9d39cd929e7e2554d0ff7fa6b176458f.patch --- diff --git a/src/modules/sipcapture/hep.c b/src/modules/sipcapture/hep.c index 0430b96969..f435477a09 100644 --- a/src/modules/sipcapture/hep.c +++ b/src/modules/sipcapture/hep.c @@ -739,7 +739,11 @@ int hepv3_message_parse(char *buf, unsigned int len, sip_msg_t *msg) msg->rcv.proto = PROTO_UDP; if(payload != NULL) + { ret = len - payload_len; + msg->buf = payload; +msg->len = payload_len; + } done: diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c index dbb53c0537..a7a7564608 100644 --- a/src/modules/sipcapture/sipcapture.c +++ b/src/modules/sipcapture/sipcapture.c @@ -2969,11 +2969,8 @@ static int nosip_hep_msg(sr_event_param_t *evp) return 0; } - buf = msg->buf + len; - len = msg->len - len; - - msg->buf = buf; - msg->len = len; + buf = msg->buf; + len = msg->len; } else { LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: not supported version " "or bad length: v:[%d] l:[%d]\n", ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e8ea999b: Merge pull request #1932 from nferreyra/ndb_mongodb_mongoc_init
Module: kamailio Branch: master Commit: e8ea999b3f208d71fb8bdaa282c5f1d31296860b URL: https://github.com/kamailio/kamailio/commit/e8ea999b3f208d71fb8bdaa282c5f1d31296860b Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-04-23T08:56:20+02:00 Merge pull request #1932 from nferreyra/ndb_mongodb_mongoc_init ndb_mongodb: fix initialization crash --- Modified: src/modules/ndb_mongodb/mongodb_client.c --- Diff: https://github.com/kamailio/kamailio/commit/e8ea999b3f208d71fb8bdaa282c5f1d31296860b.diff Patch: https://github.com/kamailio/kamailio/commit/e8ea999b3f208d71fb8bdaa282c5f1d31296860b.patch --- diff --git a/src/modules/ndb_mongodb/mongodb_client.c b/src/modules/ndb_mongodb/mongodb_client.c index 746c5876fd..b49f111998 100644 --- a/src/modules/ndb_mongodb/mongodb_client.c +++ b/src/modules/ndb_mongodb/mongodb_client.c @@ -53,6 +53,7 @@ int mongodbc_init(void) return -1; } + mongoc_init(); for(rsrv=_mongodbc_srv_list; rsrv; rsrv=rsrv->next) { if(rsrv->uri==NULL || rsrv->uri->len<=0) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:285a6710: Merge pull request #1934 from mslehto/UINT32_MAX
Module: kamailio Branch: master Commit: 285a67101c4b412fcac0b1a6a7f28ab8f25216e0 URL: https://github.com/kamailio/kamailio/commit/285a67101c4b412fcac0b1a6a7f28ab8f25216e0 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-04-23T14:05:27+02:00 Merge pull request #1934 from mslehto/UINT32_MAX core: fix compilation error --- Modified: src/core/tcp_main.c --- Diff: https://github.com/kamailio/kamailio/commit/285a67101c4b412fcac0b1a6a7f28ab8f25216e0.diff Patch: https://github.com/kamailio/kamailio/commit/285a67101c4b412fcac0b1a6a7f28ab8f25216e0.patch --- diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c index 20e16606c0..85e06e9513 100644 --- a/src/core/tcp_main.c +++ b/src/core/tcp_main.c @@ -50,6 +50,7 @@ #include /* writev*/ #include #include /*exit() */ +#include /* UINT32_MAX */ #include ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:0b9e0925: Merge pull request #1945 from seven1240/typo
Module: kamailio Branch: master Commit: 0b9e092579acbc3552a78b7f61186c3e47f71029 URL: https://github.com/kamailio/kamailio/commit/0b9e092579acbc3552a78b7f61186c3e47f71029 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-05-04T08:46:14+02:00 Merge pull request #1945 from seven1240/typo core: fix timer typo --- Modified: src/core/timer.c --- Diff: https://github.com/kamailio/kamailio/commit/0b9e092579acbc3552a78b7f61186c3e47f71029.diff Patch: https://github.com/kamailio/kamailio/commit/0b9e092579acbc3552a78b7f61186c3e47f71029.patch --- diff --git a/src/core/timer.c b/src/core/timer.c index 92e26ba5f1..8f6e305b24 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -405,7 +405,7 @@ inline static void adjust_ticks(void) diff_time_ticks=(ticks_t)((diff_time*TIMER_TICKS_HZ)/100LL); delta=(s_ticks_t)(diff_time_ticks-diff_ticks_raw); if (delta<-1){ - LM_WARN("our timer runs faster then real-time" + LM_WARN("our timer runs faster than real-time" " (%lu ms / %u ticks our time .->" " %lu ms / %u ticks real time)\n", (unsigned long)(diff_ticks_raw*1000L/TIMER_TICKS_HZ), ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:5436e1fe: Merge pull request #1951 from ionutionita92/siptrace-bugfix
Module: kamailio Branch: master Commit: 5436e1fe824dee419f0ceb5db836ad3d523c7313 URL: https://github.com/kamailio/kamailio/commit/5436e1fe824dee419f0ceb5db836ad3d523c7313 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-05-14T10:38:09+02:00 Merge pull request #1951 from ionutionita92/siptrace-bugfix siptrace: fix tracing messages to database when destination uri not set --- Modified: src/modules/siptrace/doc/siptrace_admin.xml Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/5436e1fe824dee419f0ceb5db836ad3d523c7313.diff Patch: https://github.com/kamailio/kamailio/commit/5436e1fe824dee419f0ceb5db836ad3d523c7313.patch --- diff --git a/src/modules/siptrace/doc/siptrace_admin.xml b/src/modules/siptrace/doc/siptrace_admin.xml index 288824ba93..b3cb739130 100644 --- a/src/modules/siptrace/doc/siptrace_admin.xml +++ b/src/modules/siptrace/doc/siptrace_admin.xml @@ -556,6 +556,9 @@ sip_trace("sip:10.1.1.2:5085"); ... sip_trace("sip:10.1.1.2:5085", "$ci-abc"); ... +/* trace current dialog; needs to be done on initial INVITE and dialog has to be loaded */ +sip_trace("sip:10.1.1.2:5085", "$ci-abc", "d"); +... diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index fc97290285..92e2019917 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -1011,7 +1011,7 @@ static int w_sip_trace3(sip_msg_t *msg, char *dest, char *correlation_id, char * } } - if(trace_is_off(msg)) { + if(trace_type != SIPTRACE_MESSAGE && trace_is_off(msg)) { LM_DBG("trace off...\n"); return 1; } ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:d3770425: Merge pull request #1954 from omnicate/master
Module: kamailio Branch: master Commit: d377042513a5092ad2dc127ed500d50e97002d73 URL: https://github.com/kamailio/kamailio/commit/d377042513a5092ad2dc127ed500d50e97002d73 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-05-15T18:33:43+02:00 Merge pull request #1954 from omnicate/master ims_qos: use msg_ctx_id_t to detect same msg/transaction processing --- Modified: src/modules/ims_qos/ims_qos_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/d377042513a5092ad2dc127ed500d50e97002d73.diff Patch: https://github.com/kamailio/kamailio/commit/d377042513a5092ad2dc127ed500d50e97002d73.patch --- diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c index 5715a05275..6f68b39be1 100644 --- a/src/modules/ims_qos/ims_qos_mod.c +++ b/src/modules/ims_qos/ims_qos_mod.c @@ -153,9 +153,9 @@ struct _pv_req_data { struct cell *T; struct sip_msg msg; struct sip_msg *tmsgp; - unsigned int id; char *buf; int buf_size; + msg_ctx_id_t msg_ctx; }; static struct _pv_req_data _pv_treq; @@ -736,8 +736,7 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int (which we cannot assume) then we would pollute the shm_msg t->uas.request if we did any parsing on it. Instead, we need to make a private copy of the message and free it when we are done */ - if ((_pv_treq.T != t || t->uas.request != _pv_treq.tmsgp) - && t->uas.request->id != _pv_treq.id) { + if (msg_ctx_id_match(t->uas.request, &_pv_treq.msg_ctx) != 1) { /* make a copy */ if (_pv_treq.buf == NULL || _pv_treq.buf_size < t->uas.request->len + 1) { @@ -746,7 +745,8 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int if (_pv_treq.tmsgp) free_sip_msg(&_pv_treq.msg); _pv_treq.tmsgp = NULL; - _pv_treq.id = 0; +_pv_treq.msg_ctx.msgid=0; +_pv_treq.msg_ctx.pid=0; _pv_treq.T = NULL; _pv_treq.buf_size = t->uas.request->len + 1; _pv_treq.buf = (char*) pkg_malloc(_pv_treq.buf_size * sizeof(char)); @@ -764,7 +764,7 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int _pv_treq.msg.len = t->uas.request->len; _pv_treq.msg.buf = _pv_treq.buf; _pv_treq.tmsgp = t->uas.request; - _pv_treq.id = t->uas.request->id; +msg_ctx_id_set(t->uas.request, &_pv_treq.msg_ctx); _pv_treq.T = t; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:70061f56: Merge pull request #1958 from sergey-safarov/mips
Module: kamailio Branch: master Commit: 70061f565e8f2132fc2f2856d9d83a7c45202053 URL: https://github.com/kamailio/kamailio/commit/70061f565e8f2132fc2f2856d9d83a7c45202053 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-05-20T09:16:49+02:00 Merge pull request #1958 from sergey-safarov/mips src/Makefile.defs: fix build on mips --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/70061f565e8f2132fc2f2856d9d83a7c45202053.diff Patch: https://github.com/kamailio/kamailio/commit/70061f565e8f2132fc2f2856d9d83a7c45202053.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index 21ca28e097..0577ac011c 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -321,7 +321,8 @@ ppc64_macros= __ppc64__ _ARCH_PPC64 mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1 mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \ - _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4 + _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4 \ + _MIPS_ISA_MIPS32 mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64 alpha_macros= __alpha__ __alpha _M_ALPHA_ @@ -1344,7 +1345,7 @@ ifeq ($(ARCH), mips2) ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff - CFLAGS= -mips2 $(CC_OPT) -funroll-loops $(PROFILE) + CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE) #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+ ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER CFLAGS+=-ftree-vectorize -fno-strict-overflow @@ -1390,7 +1391,7 @@ ifeq ($(ARCH), mips64) ifeq ($(CC_NAME), gcc) C_DEFS+=-DCC_GCC_LIKE_ASM #common stuff - CFLAGS= -mips64 $(CC_OPT) -funroll-loops $(PROFILE) + CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE) #if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+ ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER CFLAGS+=-ftree-vectorize -fno-strict-overflow ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8351df3d: Merge pull request #1967 from alishir/master
Module: kamailio Branch: master Commit: 8351df3db3891d52cdeb1fd59de4e44cecb67dcd URL: https://github.com/kamailio/kamailio/commit/8351df3db3891d52cdeb1fd59de4e44cecb67dcd Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-05-28T13:26:55+02:00 Merge pull request #1967 from alishir/master kamdbctl: Fixes name of ims_charging sql script. --- Added: utils/kamctl/mysql/ims_charging-create.sql Removed: utils/kamctl/mysql/ims_charging_create.sql --- Diff: https://github.com/kamailio/kamailio/commit/8351df3db3891d52cdeb1fd59de4e44cecb67dcd.diff Patch: https://github.com/kamailio/kamailio/commit/8351df3db3891d52cdeb1fd59de4e44cecb67dcd.patch --- diff --git a/utils/kamctl/mysql/ims_charging_create.sql b/utils/kamctl/mysql/ims_charging-create.sql similarity index 100% rename from utils/kamctl/mysql/ims_charging_create.sql rename to utils/kamctl/mysql/ims_charging-create.sql ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6c902f52: Merge pull request #1964 from alexyosifov/registrar_pcscf_sec_agree
Module: kamailio Branch: master Commit: 6c902f526698904129cc5369c74d83312b435ff7 URL: https://github.com/kamailio/kamailio/commit/6c902f526698904129cc5369c74d83312b435ff7 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-05-28T13:27:24+02:00 Merge pull request #1964 from alexyosifov/registrar_pcscf_sec_agree ims_registrar_pcscf: parse security verify header --- Modified: src/modules/ims_registrar_pcscf/save.c Modified: src/modules/ims_registrar_pcscf/sec_agree.c Modified: src/modules/ims_registrar_pcscf/sec_agree.h --- Diff: https://github.com/kamailio/kamailio/commit/6c902f526698904129cc5369c74d83312b435ff7.diff Patch: https://github.com/kamailio/kamailio/commit/6c902f526698904129cc5369c74d83312b435ff7.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:711da9dd: Merge pull request #1974 from alexyosifov/ipsec_tcp
Module: kamailio Branch: master Commit: 711da9ddac8e58603558ec5440bcc240d38b0bcb URL: https://github.com/kamailio/kamailio/commit/711da9ddac8e58603558ec5440bcc240d38b0bcb Author: Tsvetomir Dimitrov Committer: GitHub Date: 2019-06-05T09:53:50+03:00 Merge pull request #1974 from alexyosifov/ipsec_tcp Ipsec tcp --- Modified: src/modules/ims_ipsec_pcscf/cmd.c Modified: src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml Modified: src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c Modified: src/modules/ims_ipsec_pcscf/ipsec.c Modified: src/modules/ims_ipsec_pcscf/ipsec.h Modified: src/modules/ims_usrloc_pcscf/udomain.c Removed: src/modules/ims_ipsec_pcscf/README --- Diff: https://github.com/kamailio/kamailio/commit/711da9ddac8e58603558ec5440bcc240d38b0bcb.diff Patch: https://github.com/kamailio/kamailio/commit/711da9ddac8e58603558ec5440bcc240d38b0bcb.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:71e8bf1e: Delete README
Module: kamailio Branch: master Commit: 71e8bf1e99e830800f379ea8ceabbc37d048cdd6 URL: https://github.com/kamailio/kamailio/commit/71e8bf1e99e830800f379ea8ceabbc37d048cdd6 Author: alexyosifov <47529095+alexyosi...@users.noreply.github.com> Committer: GitHub Date: 2019-06-05T09:32:58+03:00 Delete README Will be autogenerated. --- Removed: src/modules/ims_ipsec_pcscf/README --- Diff: https://github.com/kamailio/kamailio/commit/71e8bf1e99e830800f379ea8ceabbc37d048cdd6.diff Patch: https://github.com/kamailio/kamailio/commit/71e8bf1e99e830800f379ea8ceabbc37d048cdd6.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:1c3ab78a: Merge pull request #1976 from kamailio/vhernando/xhttp_prom_branch
Module: kamailio Branch: master Commit: 1c3ab78a6e70a4e2af2c0926e13e71e00ae47459 URL: https://github.com/kamailio/kamailio/commit/1c3ab78a6e70a4e2af2c0926e13e71e00ae47459 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-06-13T11:26:28+02:00 Merge pull request #1976 from kamailio/vhernando/xhttp_prom_branch xhttp_prom: module to generate Prometheus metrics. --- Added: src/modules/xhttp_prom/Makefile Added: src/modules/xhttp_prom/doc/Makefile Added: src/modules/xhttp_prom/doc/xhttp_prom.xml Added: src/modules/xhttp_prom/doc/xhttp_prom_admin.xml Added: src/modules/xhttp_prom/prom.c Added: src/modules/xhttp_prom/prom.h Added: src/modules/xhttp_prom/prom_metric.c Added: src/modules/xhttp_prom/prom_metric.h Added: src/modules/xhttp_prom/xhttp_prom.c Added: src/modules/xhttp_prom/xhttp_prom.h --- Diff: https://github.com/kamailio/kamailio/commit/1c3ab78a6e70a4e2af2c0926e13e71e00ae47459.diff Patch: https://github.com/kamailio/kamailio/commit/1c3ab78a6e70a4e2af2c0926e13e71e00ae47459.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:15066536: Merge pull request #1982 from alexyosifov/ipsec_fix_defects
Module: kamailio Branch: master Commit: 15066536e65314f976328fc4387be2a5b53fe455 URL: https://github.com/kamailio/kamailio/commit/15066536e65314f976328fc4387be2a5b53fe455 Author: Tsvetomir Dimitrov Committer: GitHub Date: 2019-06-13T22:05:21+03:00 Merge pull request #1982 from alexyosifov/ipsec_fix_defects --- Modified: src/modules/ims_ipsec_pcscf/cmd.c Modified: src/modules/ims_registrar_pcscf/save.c --- Diff: https://github.com/kamailio/kamailio/commit/15066536e65314f976328fc4387be2a5b53fe455.diff Patch: https://github.com/kamailio/kamailio/commit/15066536e65314f976328fc4387be2a5b53fe455.patch --- diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c index 576bf56ded..f696ac9e71 100644 --- a/src/modules/ims_ipsec_pcscf/cmd.c +++ b/src/modules/ims_ipsec_pcscf/cmd.c @@ -571,7 +571,7 @@ int ipsec_forward(struct sip_msg* m, udomain_t* d) struct cell *t = tmb.t_gett(); if (!t) { LM_ERR("Error getting transaction\n"); -goto cleanup; +return ret; } req = t->uas.request; @@ -662,7 +662,7 @@ int ipsec_forward(struct sip_msg* m, udomain_t* d) struct socket_info * client_sock = grep_sock_info(via_host.af == AF_INET ? &ipsec_listen_addr : &ipsec_listen_addr6, src_port, dst_proto); if(!client_sock) { LM_ERR("Error calling grep_sock_info() for ipsec client port\n"); -return -1; +goto cleanup; } m->force_send_socket = client_sock; diff --git a/src/modules/ims_registrar_pcscf/save.c b/src/modules/ims_registrar_pcscf/save.c index fb701e6af6..61a1d7a001 100644 --- a/src/modules/ims_registrar_pcscf/save.c +++ b/src/modules/ims_registrar_pcscf/save.c @@ -444,12 +444,6 @@ int save(struct sip_msg* _m, udomain_t* _d, int _cflags) { cscf_get_p_associated_uri(_m, &public_ids, &num_public_ids, 1); service_routes = cscf_get_service_route(_m, &num_service_routes, 1); - { - struct via_body* vb = cscf_get_ue_via(_m); - LM_DBG("Save contact with AOR(uri) [%.*s], proto %d, port %d\n", - cb->contacts->uri.len, cb->contacts->uri.s, vb->proto, vb->port?vb->port:5060); - } - //update contacts if (!update_contacts(req, _m, _d, cb->star, expires_hdr, public_ids, num_public_ids, service_routes, num_service_routes, 0)) { LM_ERR("failed to update pcontact\n"); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:b465c6e5: Merge pull request #1986 from ionutionita92/rtpengine
Module: kamailio Branch: master Commit: b465c6e5d0f7583f17a06dde771595ae9e102549 URL: https://github.com/kamailio/kamailio/commit/b465c6e5d0f7583f17a06dde771595ae9e102549 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-06-22T16:40:50+02:00 Merge pull request #1986 from ionutionita92/rtpengine Extend rtpengine hashing algorithms --- Added: src/modules/crypto/api.c Added: src/modules/crypto/api.h Modified: src/modules/crypto/crypto_mod.c Modified: src/modules/crypto/crypto_uuid.c Modified: src/modules/crypto/crypto_uuid.h Modified: src/modules/rtpengine/doc/rtpengine_admin.xml Modified: src/modules/rtpengine/rtpengine.c Modified: src/modules/rtpengine/rtpengine.h --- Diff: https://github.com/kamailio/kamailio/commit/b465c6e5d0f7583f17a06dde771595ae9e102549.diff Patch: https://github.com/kamailio/kamailio/commit/b465c6e5d0f7583f17a06dde771595ae9e102549.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:d0464279: Merge pull request #1989 from MrHillo/master
Module: kamailio Branch: master Commit: d04642793d9465c1c39ca17b899382372b89955e URL: https://github.com/kamailio/kamailio/commit/d04642793d9465c1c39ca17b899382372b89955e Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-06-22T19:30:03+02:00 Merge pull request #1989 from MrHillo/master userblacklist: fix double "check_user_blacklist" in module documentation --- Modified: src/modules/userblacklist/doc/userblacklist_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/d04642793d9465c1c39ca17b899382372b89955e.diff Patch: https://github.com/kamailio/kamailio/commit/d04642793d9465c1c39ca17b899382372b89955e.patch --- diff --git a/src/modules/userblacklist/doc/userblacklist_admin.xml b/src/modules/userblacklist/doc/userblacklist_admin.xml index bcc48705f2..d68747de31 100644 --- a/src/modules/userblacklist/doc/userblacklist_admin.xml +++ b/src/modules/userblacklist/doc/userblacklist_admin.xml @@ -324,7 +324,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) { parameter can be used to check for example against the from URI user. - check_user_blacklist usage + check_user_whitelist usage ... $avp(i:80) = $rU; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:57961c9f: Merge pull request #2001 from alexyosifov/ipsec_tcp_multiple_conns
Module: kamailio Branch: master Commit: 57961c9f485a9324e140f90acbfc82857efbf0f5 URL: https://github.com/kamailio/kamailio/commit/57961c9f485a9324e140f90acbfc82857efbf0f5 Author: Tsvetomir Dimitrov Committer: GitHub Date: 2019-07-15T19:41:34+03:00 Merge pull request #2001 from alexyosifov/ipsec_tcp_multiple_conns Ipsec tcp multiple conns --- Added: src/modules/ims_ipsec_pcscf/port_gen.c Added: src/modules/ims_ipsec_pcscf/port_gen.h Added: src/modules/ims_ipsec_pcscf/sec_agree.c Added: src/modules/ims_ipsec_pcscf/sec_agree.h Modified: src/modules/ims_ipsec_pcscf/cmd.c Modified: src/modules/ims_ipsec_pcscf/cmd.h Modified: src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml Modified: src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c Modified: src/modules/ims_ipsec_pcscf/ipsec.c Modified: src/modules/ims_ipsec_pcscf/ipsec.h Modified: src/modules/ims_ipsec_pcscf/spi_gen.c Modified: src/modules/ims_ipsec_pcscf/spi_list.c Modified: src/modules/ims_ipsec_pcscf/spi_list_tests.c Modified: src/modules/ims_registrar_pcscf/ims_registrar_pcscf_mod.c Modified: src/modules/ims_registrar_pcscf/save.c Modified: src/modules/ims_usrloc_pcscf/udomain.c Modified: src/modules/ims_usrloc_pcscf/udomain.h Modified: src/modules/ims_usrloc_pcscf/ul_callback.c Modified: src/modules/ims_usrloc_pcscf/ul_callback.h Modified: src/modules/ims_usrloc_pcscf/usrloc.c Modified: src/modules/ims_usrloc_pcscf/usrloc.h Modified: src/modules/ims_usrloc_pcscf/usrloc_db.c Modified: src/modules/ims_usrloc_pcscf/usrloc_db.h Modified: utils/kamctl/mysql/ims_usrloc_pcscf-create.sql --- Diff: https://github.com/kamailio/kamailio/commit/57961c9f485a9324e140f90acbfc82857efbf0f5.diff Patch: https://github.com/kamailio/kamailio/commit/57961c9f485a9324e140f90acbfc82857efbf0f5.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:72099714: Merge pull request #2013 from surendratiwari3/no_evapi_client_send_failed
Module: kamailio Branch: master Commit: 72099714de86311b704621034b5ef07ec05a1147 URL: https://github.com/kamailio/kamailio/commit/72099714de86311b704621034b5ef07ec05a1147 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-07-19T09:56:45+02:00 Merge pull request #2013 from surendratiwari3/no_evapi_client_send_failed evapi:return code and log fixed for no evapi client while sending --- Modified: src/modules/evapi/evapi_dispatch.c --- Diff: https://github.com/kamailio/kamailio/commit/72099714de86311b704621034b5ef07ec05a1147.diff Patch: https://github.com/kamailio/kamailio/commit/72099714de86311b704621034b5ef07ec05a1147.patch --- diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c index b6997e2295..52a62d8551 100644 --- a/src/modules/evapi/evapi_dispatch.c +++ b/src/modules/evapi/evapi_dispatch.c @@ -728,6 +728,7 @@ int _evapi_relay(str *evdata, str *ctag, int unicast) int len; int sbsize; + int evapi_send_count; evapi_msg_t *emsg; LM_DBG("relaying event data [%.*s] (%d)\n", @@ -781,7 +782,12 @@ int _evapi_relay(str *evdata, str *ctag, int unicast) cfg_update(); LM_DBG("dispatching [%p] [%.*s] (%d)\n", emsg, emsg->data.len, emsg->data.s, emsg->data.len); - evapi_dispatch_notify(emsg); + evapi_send_count = evapi_dispatch_notify(emsg); +if (evapi_send_count == 0) { + shm_free(emsg); + LM_ERR("no evapi client to send the message, failed to send message\n"); + return -1; + } shm_free(emsg); } return 0; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:431e9459: Merge pull request #2023 from alexyosifov/ipsec_fix_defects
Module: kamailio Branch: master Commit: 431e9459225b7e58bdb7cc5cc9235bea98d2a82b URL: https://github.com/kamailio/kamailio/commit/431e9459225b7e58bdb7cc5cc9235bea98d2a82b Author: Tsvetomir Dimitrov Committer: GitHub Date: 2019-08-10T23:05:13+03:00 Merge pull request #2023 from alexyosifov/ipsec_fix_defects Ipsec fix defects --- Modified: src/modules/ims_ipsec_pcscf/cmd.c Modified: src/modules/ims_ipsec_pcscf/cmd.h Modified: src/modules/ims_ipsec_pcscf/port_gen.c Modified: src/modules/ims_ipsec_pcscf/port_gen.h Modified: src/modules/ims_ipsec_pcscf/spi_gen.c Modified: src/modules/ims_ipsec_pcscf/spi_gen.h Modified: src/modules/ims_ipsec_pcscf/spi_list.c Modified: src/modules/ims_ipsec_pcscf/spi_list.h Modified: src/modules/ims_registrar_pcscf/save.c Modified: src/modules/ims_usrloc_pcscf/pcontact.c Modified: src/modules/ims_usrloc_pcscf/usrloc.c Modified: src/modules/ims_usrloc_pcscf/usrloc.h --- Diff: https://github.com/kamailio/kamailio/commit/431e9459225b7e58bdb7cc5cc9235bea98d2a82b.diff Patch: https://github.com/kamailio/kamailio/commit/431e9459225b7e58bdb7cc5cc9235bea98d2a82b.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:0a161d19: Merge pull request #2022 from mancasg/master
Module: kamailio Branch: master Commit: 0a161d19707917f690b5823b64d120354c8b URL: https://github.com/kamailio/kamailio/commit/0a161d19707917f690b5823b64d120354c8b Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-08-12T11:37:11+02:00 Merge pull request #2022 from mancasg/master core: Fix the cfg framework variable input type default --- Modified: src/core/cfg/cfg.c --- Diff: https://github.com/kamailio/kamailio/commit/0a161d19707917f690b5823b64d120354c8b.diff Patch: https://github.com/kamailio/kamailio/commit/0a161d19707917f690b5823b64d120354c8b.patch --- diff --git a/src/core/cfg/cfg.c b/src/core/cfg/cfg.c index 3822a9c94d..488d72f35a 100644 --- a/src/core/cfg/cfg.c +++ b/src/core/cfg/cfg.c @@ -94,7 +94,7 @@ int cfg_declare(char *group_name, cfg_def_t *def, void *values, int def_size, /* verify the type of the input */ if (CFG_INPUT_MASK(def[i].type)==0) { - def[i].type |= def[i].type << CFG_INPUT_SHIFT; + def[i].type |= CFG_VAR_MASK(def[i].type) << CFG_INPUT_SHIFT; } else { if ((CFG_INPUT_MASK(def[i].type) != CFG_VAR_MASK(def[i].type) << CFG_INPUT_SHIFT) && (def[i].on_change_cb == 0)) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:7d7670f6: Merge pull request #2038 from surendratiwari3/memory_leak_rtpengine
Module: kamailio Branch: master Commit: 7d7670f6d19cba5cbb8a3533795d6e271edad8f1 URL: https://github.com/kamailio/kamailio/commit/7d7670f6d19cba5cbb8a3533795d6e271edad8f1 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-08-23T09:46:40+02:00 Merge pull request #2038 from surendratiwari3/memory_leak_rtpengine Module:rtpengine: memory leak is fixed, if no rtpengine in list --- Modified: src/modules/rtpengine/rtpengine_db.c --- Diff: https://github.com/kamailio/kamailio/commit/7d7670f6d19cba5cbb8a3533795d6e271edad8f1.diff Patch: https://github.com/kamailio/kamailio/commit/7d7670f6d19cba5cbb8a3533795d6e271edad8f1.patch --- diff --git a/src/modules/rtpengine/rtpengine_db.c b/src/modules/rtpengine/rtpengine_db.c index 0da3a6f371..8532fd270a 100644 --- a/src/modules/rtpengine/rtpengine_db.c +++ b/src/modules/rtpengine/rtpengine_db.c @@ -98,6 +98,7 @@ static int rtpp_load_db(void) if (n_rows == 0) { LM_WARN("No rtpproxy instances in database\n"); + rtpp_dbf.free_result(rtpp_db_handle, res); return 0; } ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e4edf538: Merge pull request #2040 from kamailio/set_rtpengine_set
Module: kamailio Branch: master Commit: e4edf53858c399e5a3e635d04725a8a137523d15 URL: https://github.com/kamailio/kamailio/commit/e4edf53858c399e5a3e635d04725a8a137523d15 Author: juha-h Committer: GitHub Date: 2019-08-26T21:43:53+03:00 Merge pull request #2040 from kamailio/set_rtpengine_set modules/rtpengine: set_rtpengine_set fix --- Modified: src/modules/rtpengine/rtpengine.c --- Diff: https://github.com/kamailio/kamailio/commit/e4edf53858c399e5a3e635d04725a8a137523d15.diff Patch: https://github.com/kamailio/kamailio/commit/e4edf53858c399e5a3e635d04725a8a137523d15.patch --- diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index 7a6b73d747..6e436083ec 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -3079,6 +3079,15 @@ select_rtpp_node_old(str callid, str viabranch, int do_test, enum rtpe_operation return node; } +unsigned int node_in_set(struct rtpp_node *node, struct rtpp_set *set) { + struct rtpp_node *current = set->rn_first; + while (current) { + if (current->idx == node->idx) return 1; + current = current->rn_next; + } + return 0; +} + /* * Main balancing routine. This DO try to keep the same proxy for * the call if some proxies were disabled or enabled (e.g. kamctl command) @@ -3107,7 +3116,7 @@ select_rtpp_node(str callid, str viabranch, int do_test, struct rtpp_node **quer node = select_rtpp_node_old(callid, viabranch, do_test, op); // check node - if (!node) { + if (!node || (node_in_set(node, active_rtpp_set) == 0)) { // run the selection algorithm node = select_rtpp_node_new(callid, viabranch, do_test, queried_nodes_ptr, queried_nodes); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:042971bc: Merge pull request #2047 from kamailio/grumvalski/siptrace_fix
Module: kamailio Branch: master Commit: 042971bcb6bb47ced735f5405fa5534f94d81dce URL: https://github.com/kamailio/kamailio/commit/042971bcb6bb47ced735f5405fa5534f94d81dce Author: Federico Cabiddu Committer: GitHub Date: 2019-08-27T09:26:48+02:00 Merge pull request #2047 from kamailio/grumvalski/siptrace_fix siptrace: check if trace_to_database is set before checking the db co⦠--- Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/042971bcb6bb47ced735f5405fa5534f94d81dce.diff Patch: https://github.com/kamailio/kamailio/commit/042971bcb6bb47ced735f5405fa5534f94d81dce.patch --- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 8fa832a043..211ddac363 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -542,14 +542,14 @@ static int sip_trace_store(siptrace_data_t *sto, dest_info_t *dst, static int sip_trace_store_db(siptrace_data_t *sto) { + if(trace_to_database_flag == NULL || *trace_to_database_flag == 0) + goto done; + if(db_con == NULL) { LM_DBG("database connection not initialized\n"); return -1; } - if(trace_to_database_flag == NULL || *trace_to_database_flag == 0) - goto done; - db_key_t db_keys[NR_KEYS]; db_val_t db_vals[NR_KEYS]; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c556067b: Merge pull request #2051 from aalba6675/kemi-rr-preset
Module: kamailio Branch: master Commit: c556067bc3c0d99b7e81ee0bd1a97c1b416617d3 URL: https://github.com/kamailio/kamailio/commit/c556067bc3c0d99b7e81ee0bd1a97c1b416617d3 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-09-04T00:21:16+02:00 Merge pull request #2051 from aalba6675/kemi-rr-preset module rr: KEMI expose record_route_preset --- Modified: src/modules/rr/rr_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/c556067bc3c0d99b7e81ee0bd1a97c1b416617d3.diff Patch: https://github.com/kamailio/kamailio/commit/c556067bc3c0d99b7e81ee0bd1a97c1b416617d3.patch --- diff --git a/src/modules/rr/rr_mod.c b/src/modules/rr/rr_mod.c index 6e9dda1318..31a6031a5f 100644 --- a/src/modules/rr/rr_mod.c +++ b/src/modules/rr/rr_mod.c @@ -291,6 +291,35 @@ static int ki_record_route(sip_msg_t *msg) return ki_record_route_params( msg, 0 ); } +/** + * wrapper for record_route_preset(msg, key1, key2) + */ +static int ki_record_route_preset(sip_msg_t *msg, str *key1, str *key2) +{ + if (msg->msg_flags & FL_RR_ADDED) { + LM_ERR("Double attempt to record-route\n"); + return -1; + } + if (key2 && !enable_double_rr) { + LM_ERR("Attempt to double record-route while 'enable_double_rr' param is disabled\n"); + return -1; + } + + if ( record_route_preset( msg, key1)<0 ) + return -1; + + if (!key2) + goto done; + + if ( record_route_preset( msg, key2)<0 ) + return -1; + +done: + msg->msg_flags |= FL_RR_ADDED; + return 1; + +} + /** * config wrapper for record_route(msg, params) */ @@ -317,7 +346,7 @@ static int w_record_route_preset(struct sip_msg *msg, char *key, char *key2) str s; if (msg->msg_flags & FL_RR_ADDED) { - LM_ERR("Duble attempt to record-route\n"); + LM_ERR("Double attempt to record-route\n"); return -1; } if (key2 && !enable_double_rr) { @@ -747,6 +776,11 @@ static sr_kemi_t sr_kemi_rr_exports[] = { { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, + { str_init("rr"), str_init("record_route_preset"), + SR_KEMIP_INT, ki_record_route_preset, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } }; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:5a380e95: Merge pull request #2058 from kamailio/grumvalski/dlg_check_xdata_len
Module: kamailio Branch: master Commit: 5a380e95b0914f9ae3b24ce9638404ad0b0afd6b URL: https://github.com/kamailio/kamailio/commit/5a380e95b0914f9ae3b24ce9638404ad0b0afd6b Author: Federico Cabiddu Committer: GitHub Date: 2019-09-08T10:17:13+02:00 Merge pull request #2058 from kamailio/grumvalski/dlg_check_xdata_len dialog: check xdata length when loading profile from db --- Modified: src/modules/dialog/dlg_db_handler.c --- Diff: https://github.com/kamailio/kamailio/commit/5a380e95b0914f9ae3b24ce9638404ad0b0afd6b.diff Patch: https://github.com/kamailio/kamailio/commit/5a380e95b0914f9ae3b24ce9638404ad0b0afd6b.patch --- diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c index 2c89685ffc..56c7ef39a2 100644 --- a/src/modules/dialog/dlg_db_handler.c +++ b/src/modules/dialog/dlg_db_handler.c @@ -457,7 +457,7 @@ int load_dialog_info_from_db(int dlg_hash_size, int fetch_num_rows, dlg_set_toroute(dlg, &toroute_name); GET_STR_VALUE(xdata, values, 21, 0, 0); - if(xdata.s!=NULL && dlg->state!=DLG_STATE_DELETED) + if(xdata.len > 0 && xdata.s!=NULL && dlg->state!=DLG_STATE_DELETED) { srjson_InitDoc(&jdoc, NULL); jdoc.buf = xdata; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a638c714: Merge pull request #2059 from kamailio/grumvalski/db_redis_keys_doc
Module: kamailio Branch: master Commit: a638c71454499d78363c5f213769c57a78772278 URL: https://github.com/kamailio/kamailio/commit/a638c71454499d78363c5f213769c57a78772278 Author: Federico Cabiddu Committer: GitHub Date: 2019-09-08T10:21:34+02:00 Merge pull request #2059 from kamailio/grumvalski/db_redis_keys_doc db_redis: add examples about usage with dialog module --- Modified: src/modules/db_redis/doc/db_redis_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/a638c71454499d78363c5f213769c57a78772278.diff Patch: https://github.com/kamailio/kamailio/commit/a638c71454499d78363c5f213769c57a78772278.patch --- diff --git a/src/modules/db_redis/doc/db_redis_admin.xml b/src/modules/db_redis/doc/db_redis_admin.xml index 0c8ba2ed04..6439c79b6f 100644 --- a/src/modules/db_redis/doc/db_redis_admin.xml +++ b/src/modules/db_redis/doc/db_redis_admin.xml @@ -226,12 +226,15 @@ loadmodule "db_redis.so" #!define DBURL_ACC"redis://127.0.0.1:6379/6" #!define DBURL_AUTH "redis://127.0.0.1:6379/7" #!define DBURL_PERM "redis://127.0.0.1:6379/8" +#!define DBURL_DLG"redis://127.0.0.1:6379/9" ... modparam("db_redis", "schema_path", "/usr/share/kamailio/db_redis/kamailio") modparam("db_redis", "keys", "version=entry:table_name") modparam("db_redis", "keys", "location=entry:ruid&usrdom:username,domain&timer:partition,keepalive") modparam("db_redis", "keys", "acc=entry:callid,time_hires&cid:callid") modparam("db_redis", "keys", "subscriber=entry:username,domain") +modparam("db_redis", "keys", "dialog=entry:hash_entry,hash_id&cid:callid") +modparam("db_redis", "keys", "dialog_vars=entry:hash_entry,hash_id,dialog_key&dialog:hash_entry,hash_id") ... modparam("usrloc", "db_url", DBURL_USRLOC) ... @@ -240,6 +243,8 @@ modparam("acc_db", "db_url", DBURL_ACC) modparam("auth_db", "db_url", DBURL_AUTH) ... modparam("permissions", "db_url", DBURL_PERM) +... +modparam("dialog", "db_url", DBURL_DLG) ... ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a0ca4cd4: tls: openssl_mutex_shared - add a date to the note about libssl workaround validity
Module: kamailio Branch: master Commit: a0ca4cd43f098d10aa5aadcc18453cbd0120dcef URL: https://github.com/kamailio/kamailio/commit/a0ca4cd43f098d10aa5aadcc18453cbd0120dcef Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-09-13T13:39:23+02:00 tls: openssl_mutex_shared - add a date to the note about libssl workaround validity --- Modified: src/modules/tls/utils/openssl_mutex_shared/README.md --- Diff: https://github.com/kamailio/kamailio/commit/a0ca4cd43f098d10aa5aadcc18453cbd0120dcef.diff Patch: https://github.com/kamailio/kamailio/commit/a0ca4cd43f098d10aa5aadcc18453cbd0120dcef.patch --- diff --git a/src/modules/tls/utils/openssl_mutex_shared/README.md b/src/modules/tls/utils/openssl_mutex_shared/README.md index 0be8aaac64..d5002b3335 100644 --- a/src/modules/tls/utils/openssl_mutex_shared/README.md +++ b/src/modules/tls/utils/openssl_mutex_shared/README.md @@ -1,9 +1,9 @@ # OpenSSL Shared Mutex # **IMPORTANT: the workaround of using this preloaded shared library is no longer -needed starting with Kamailio v5.3.0-pre1. The code of this shared library -has been included in the core of Kamailio and the same behaviour is now -achieved by default.** +needed starting with Kamailio v5.3.0-pre1 (git master branch after September 14, 2019). +The code of this shared library has been included in the core of Kamailio and the +same behaviour is now achieved by default.** This is a shared library required as a short term workaround for using Kamailio with OpenSSL (libssl) v1.1. It has to be pre-loaded before starting Kamailio. ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:392a9abb: Merge pull request #2066 from kamailio/grumvalski/run_cb_on_dlg_load
Module: kamailio Branch: master Commit: 392a9abb79c1ff85e087540cc50f7f2a54d201df URL: https://github.com/kamailio/kamailio/commit/392a9abb79c1ff85e087540cc50f7f2a54d201df Author: Federico Cabiddu Committer: GitHub Date: 2019-09-17T14:35:10+02:00 Merge pull request #2066 from kamailio/grumvalski/run_cb_on_dlg_load dialog: run DLGCB_LOADED callbacks when loading dialog from db --- Modified: src/modules/dialog/dialog.c Modified: src/modules/dialog/dlg_cb.c Modified: src/modules/dialog/dlg_cb.h Modified: src/modules/dialog/dlg_db_handler.c --- Diff: https://github.com/kamailio/kamailio/commit/392a9abb79c1ff85e087540cc50f7f2a54d201df.diff Patch: https://github.com/kamailio/kamailio/commit/392a9abb79c1ff85e087540cc50f7f2a54d201df.patch --- diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c index 8f5a186e40..b849cfbb6c 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -714,7 +714,6 @@ static int mod_init(void) } } - destroy_dlg_callbacks( DLGCB_LOADED ); /* timer process to send keep alive requests */ if(dlg_ka_timer>0 && dlg_ka_interval>0) diff --git a/src/modules/dialog/dlg_cb.c b/src/modules/dialog/dlg_cb.c index 12946994ba..f3c70bc173 100644 --- a/src/modules/dialog/dlg_cb.c +++ b/src/modules/dialog/dlg_cb.c @@ -232,6 +232,23 @@ void run_create_callbacks(struct dlg_cell *dlg, struct sip_msg *msg) return; } +void run_dlg_load_callbacks(struct dlg_cell *dlg) +{ + struct dlg_callback *cb; + + if (load_cbs && load_cbs!=POINTER_CLOSED_MARKER) { + for ( cb=load_cbs->first; cb; cb=cb->next ) { + params.req = NULL; + params.rpl = NULL; + params.direction = DLG_DIR_NONE; + params.param = &cb->param; + + cb->callback( dlg, DLGCB_LOADED, ¶ms ); + } + } + return; +} + void run_dlg_callbacks( int type , struct dlg_cell *dlg, diff --git a/src/modules/dialog/dlg_cb.h b/src/modules/dialog/dlg_cb.h index 82afa05a82..bb0037c7f7 100644 --- a/src/modules/dialog/dlg_cb.h +++ b/src/modules/dialog/dlg_cb.h @@ -109,6 +109,7 @@ void run_dlg_callbacks( int type , void run_load_callbacks( void ); +void run_dlg_load_callbacks(struct dlg_cell *dlg); /*! * \brief Function that returns valid SIP message from given dialog callback parameter struct diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c index 56c7ef39a2..1325469675 100644 --- a/src/modules/dialog/dlg_db_handler.c +++ b/src/modules/dialog/dlg_db_handler.c @@ -40,6 +40,7 @@ #include "../../core/counters.h" #include "dlg_hash.h" #include "dlg_var.h" +#include "dlg_cb.h" #include "dlg_profile.h" #include "dlg_db_handler.h" @@ -493,6 +494,7 @@ int load_dialog_info_from_db(int dlg_hash_size, int fetch_num_rows, get_ticks()); dlg->dflags = 0; + if(mode!=0) { if(loaded_extrah_entry; @@ -502,6 +504,8 @@ int load_dialog_info_from_db(int dlg_hash_size, int fetch_num_rows, dlg->dflags |= DLG_FLAG_DB_LOAD_EXTRA; loaded_extra_more = 1; } + /* if loading at runtime run the callbacks for the loaded dialog */ + run_dlg_load_callbacks(dlg); } next_dialog: ; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:3709b235: Merge pull request #2068 from kamailio/xavp_serialize_fields
Module: kamailio Branch: master Commit: 3709b235a56b7c237bafc02ea87fd873e54b4b6d URL: https://github.com/kamailio/kamailio/commit/3709b235a56b7c237bafc02ea87fd873e54b4b6d Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-09-19T10:11:13+02:00 Merge pull request #2068 from kamailio/xavp_serialize_fields core: fix xavp_serialize_fields --- Modified: src/core/xavp.c --- Diff: https://github.com/kamailio/kamailio/commit/3709b235a56b7c237bafc02ea87fd873e54b4b6d.diff Patch: https://github.com/kamailio/kamailio/commit/3709b235a56b7c237bafc02ea87fd873e54b4b6d.patch --- diff --git a/src/core/xavp.c b/src/core/xavp.c index b3a2654764..e5e33f6e9d 100644 --- a/src/core/xavp.c +++ b/src/core/xavp.c @@ -1030,9 +1030,14 @@ int xavp_serialize_fields(str *rname, char *obuf, int olen) break; case SR_XTYPE_STR: LM_DBG(" XAVP str value: %s\n", avp->val.v.s.s); - ostr.len = snprintf(ostr.s, olen-rlen, "%.*s=%.*s;", + if(avp->val.v.s.len == 0) { + ostr.len = snprintf(ostr.s, olen-rlen, "%.*s;", + avp->name.len, avp->name.s); + } else { + ostr.len = snprintf(ostr.s, olen-rlen, "%.*s=%.*s;", avp->name.len, avp->name.s, avp->val.v.s.len, avp->val.v.s.s); + } if(ostr.len<=0 || ostr.len>=olen-rlen) { LM_ERR("failed to serialize int value (%d/%d\n", ostr.len, olen-rlen); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a37f3fe8: Merge pull request #2083 from amessina/master
Module: kamailio Branch: master Commit: a37f3fe8e2c93adcbeaa91ace8b3bff6abc29ff5 URL: https://github.com/kamailio/kamailio/commit/a37f3fe8e2c93adcbeaa91ace8b3bff6abc29ff5 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-09-30T08:36:40+02:00 Merge pull request #2083 from amessina/master kamctl: Update dbtextdb.py for Python3 --- Modified: utils/kamctl/dbtextdb/dbtextdb.py --- Diff: https://github.com/kamailio/kamailio/commit/a37f3fe8e2c93adcbeaa91ace8b3bff6abc29ff5.diff Patch: https://github.com/kamailio/kamailio/commit/a37f3fe8e2c93adcbeaa91ace8b3bff6abc29ff5.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:75226997: Merge pull request #2070 from kamailio/xavp_copy
Module: kamailio Branch: master Commit: 75226997422218a70acc121f4d9f65d9034de7ce URL: https://github.com/kamailio/kamailio/commit/75226997422218a70acc121f4d9f65d9034de7ce Author: Julien Chavanton Committer: GitHub Date: 2019-10-07T12:00:57-07:00 Merge pull request #2070 from kamailio/xavp_copy pv: adding xavp_copy --- Modified: src/core/xavp.c Modified: src/core/xavp.h Modified: src/modules/pv/doc/pv_admin.xml Modified: src/modules/pv/pv.c --- Diff: https://github.com/kamailio/kamailio/commit/75226997422218a70acc121f4d9f65d9034de7ce.diff Patch: https://github.com/kamailio/kamailio/commit/75226997422218a70acc121f4d9f65d9034de7ce.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:da163fbe: Merge pull request #2112 from kamailio/vhernando/kafka_module_branch2
Module: kamailio Branch: master Commit: da163fbe65ac6ffd2b31933d3d58c07c13167e2a URL: https://github.com/kamailio/kamailio/commit/da163fbe65ac6ffd2b31933d3d58c07c13167e2a Author: vhernando Committer: GitHub Date: 2019-11-04T18:01:36+01:00 Merge pull request #2112 from kamailio/vhernando/kafka_module_branch2 kafka: module to produce and send messages to a Kafka server --- Added: src/modules/kafka/Makefile Added: src/modules/kafka/doc/Makefile Added: src/modules/kafka/doc/kafka.xml Added: src/modules/kafka/doc/kafka_admin.xml Added: src/modules/kafka/kafka_mod.c Added: src/modules/kafka/kfk.c Added: src/modules/kafka/kfk.h --- Diff: https://github.com/kamailio/kamailio/commit/da163fbe65ac6ffd2b31933d3d58c07c13167e2a.diff Patch: https://github.com/kamailio/kamailio/commit/da163fbe65ac6ffd2b31933d3d58c07c13167e2a.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:ceece0a3: Merge pull request #2107 from lbalaceanu/cdr_json
Module: kamailio Branch: master Commit: ceece0a353aa4f88e838857da2e1d2843057c309 URL: https://github.com/kamailio/kamailio/commit/ceece0a353aa4f88e838857da2e1d2843057c309 Author: Lucian Balaceanu Committer: GitHub Date: 2019-11-18T12:13:47+02:00 Merge pull request #2107 from lbalaceanu/cdr_json Adding CDR as JSON functionality --- Modified: src/modules/acc/acc_api.h Modified: src/modules/acc/acc_cdr.c Modified: src/modules/acc/acc_cdr.h Modified: src/modules/acc/acc_logic.c Modified: src/modules/acc/acc_logic.h Modified: src/modules/acc/acc_mod.c Modified: src/modules/acc_json/acc_json_mod.c Modified: src/modules/acc_json/acc_json_mod.h Modified: src/modules/acc_json/doc/acc_json_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/ceece0a353aa4f88e838857da2e1d2843057c309.diff Patch: https://github.com/kamailio/kamailio/commit/ceece0a353aa4f88e838857da2e1d2843057c309.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6b1c266a: Merge pull request #2132 from kamailio/grumvalski/http2_replies_parsing
Module: kamailio Branch: master Commit: 6b1c266a62e6839765cdb1cb0e5383887c226e41 URL: https://github.com/kamailio/kamailio/commit/6b1c266a62e6839765cdb1cb0e5383887c226e41 Author: Federico Cabiddu Committer: GitHub Date: 2019-11-18T14:09:53+01:00 Merge pull request #2132 from kamailio/grumvalski/http2_replies_parsing core: add support for parsing http/2 replies parsing --- Modified: src/core/parser/msg_parser.h Modified: src/core/parser/parse_fline.c Modified: src/core/parser/parse_fline.h --- Diff: https://github.com/kamailio/kamailio/commit/6b1c266a62e6839765cdb1cb0e5383887c226e41.diff Patch: https://github.com/kamailio/kamailio/commit/6b1c266a62e6839765cdb1cb0e5383887c226e41.patch --- diff --git a/src/core/parser/msg_parser.h b/src/core/parser/msg_parser.h index 160a7eb21d..0b0f5044ed 100644 --- a/src/core/parser/msg_parser.h +++ b/src/core/parser/msg_parser.h @@ -146,9 +146,12 @@ if ( (*tmp==(firstchar) || *tmp==((firstchar) | 32)) && \ SIP_VERSION, SIP_VERSION_LEN)) #define IS_HTTP_REPLY(rpl)\ - ((rpl)->first_line.u.reply.version.len >= HTTP_VERSION_LEN && \ + (((rpl)->first_line.u.reply.version.len >= HTTP_VERSION_LEN && \ !strncasecmp((rpl)->first_line.u.reply.version.s, \ - HTTP_VERSION, HTTP_VERSION_LEN)) + HTTP_VERSION, HTTP_VERSION_LEN)) || \ + ((rpl)->first_line.u.reply.version.len >= HTTP2_VERSION_LEN && \ + !strncasecmp((rpl)->first_line.u.reply.version.s, \ + HTTP2_VERSION, HTTP2_VERSION_LEN))) #define IS_SIP_REPLY(rpl)\ ((rpl)->first_line.u.reply.version.len >= SIP_VERSION_LEN && \ diff --git a/src/core/parser/parse_fline.c b/src/core/parser/parse_fline.c index 6d46f2192a..c535b49a4c 100644 --- a/src/core/parser/parse_fline.c +++ b/src/core/parser/parse_fline.c @@ -96,21 +96,28 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start* fl) fl->flags|=FLINE_FLAG_PROTO_SIP; fl->u.reply.version.len=SIP_VERSION_LEN; tmp=buffer+SIP_VERSION_LEN; - } else if (http_reply_parse != 0 && - (*tmp=='H' || *tmp=='h') && + } else if (http_reply_parse != 0 && (*tmp=='H' || *tmp=='h')) { /* 'HTTP/1.' */ - strncasecmp( tmp+1, HTTP_VERSION+1, HTTP_VERSION_LEN-1)==0 && - /* [0|1] */ - ((*(tmp+HTTP_VERSION_LEN)=='0') || (*(tmp+HTTP_VERSION_LEN)=='1')) && - (*(tmp+HTTP_VERSION_LEN+1)==' ') ){ - /* ugly hack to be able to route http replies -* Note: - the http reply must have a via -* - the message is marked as SIP_REPLY (ugly) -*/ - fl->type=SIP_REPLY; - fl->flags|=FLINE_FLAG_PROTO_HTTP; - fl->u.reply.version.len=HTTP_VERSION_LEN+1 /*include last digit*/; - tmp=buffer+HTTP_VERSION_LEN+1 /* last digit */; + if (strncasecmp( tmp+1, HTTP_VERSION+1, HTTP_VERSION_LEN-1)==0 && + /* [0|1] */ + ((*(tmp+HTTP_VERSION_LEN)=='0') || (*(tmp+HTTP_VERSION_LEN)=='1')) && + (*(tmp+HTTP_VERSION_LEN+1)==' ') ){ + /* ugly hack to be able to route http replies + * Note: - the http reply must have a via + * - the message is marked as SIP_REPLY (ugly) + */ + fl->type=SIP_REPLY; + fl->flags|=FLINE_FLAG_PROTO_HTTP; + fl->u.reply.version.len=HTTP_VERSION_LEN+1 /*include last digit*/; + tmp=buffer+HTTP_VERSION_LEN+1 /* last digit */; + /* 'HTTP/2' */ + } else if (strncasecmp( tmp+1, HTTP2_VERSION+1, HTTP2_VERSION_LEN-1)==0 && + (*(tmp+HTTP2_VERSION_LEN)==' ')) { + fl->type=SIP_REPLY; + fl->flags|=FLINE_FLAG_PROTO_HTTP; + fl->u.reply.version.len=HTTP2_VERSION_LEN; + tmp=buffer+HTTP2_VERSION_LEN; + } } else IFISMETHOD( INVITE, 'I'
[sr-dev] git:master:a5cc190c: Merge pull request #2134 from mbodbg/master
Module: kamailio Branch: master Commit: a5cc190c1ffaab67129f96d966a39fe8db59a1eb URL: https://github.com/kamailio/kamailio/commit/a5cc190c1ffaab67129f96d966a39fe8db59a1eb Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-11-18T18:04:11+01:00 Merge pull request #2134 from mbodbg/master dispatcher: Fixed typo in dispatcher_admin.xml --- Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/a5cc190c1ffaab67129f96d966a39fe8db59a1eb.diff Patch: https://github.com/kamailio/kamailio/commit/a5cc190c1ffaab67129f96d966a39fe8db59a1eb.patch --- diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 79da1e8b07..87a7735b1d 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -344,7 +344,7 @@ modparam("dispatcher", "force_dst", 1) sock - the socket pointer. - socket - the socket string - it iadded only if xavp_dst_mode has bit 2 set + socket - the socket string - it is added only if xavp_dst_mode has bit 2 set (value 2). ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:7966f102: Merge pull request #2147 from kamailio/grumvalski/local_request_drop
Module: kamailio Branch: master Commit: 7966f10292cb3c0d0c1ccda20c8475822b4e0993 URL: https://github.com/kamailio/kamailio/commit/7966f10292cb3c0d0c1ccda20c8475822b4e0993 Author: Federico Cabiddu Committer: GitHub Date: 2019-11-25T19:29:21+01:00 Merge pull request #2147 from kamailio/grumvalski/local_request_drop tm: add support for dropping messages in local-request event route --- Modified: src/core/error.h Modified: src/modules/tm/uac.c --- Diff: https://github.com/kamailio/kamailio/commit/7966f10292cb3c0d0c1ccda20c8475822b4e0993.diff Patch: https://github.com/kamailio/kamailio/commit/7966f10292cb3c0d0c1ccda20c8475822b4e0993.patch --- diff --git a/src/core/error.h b/src/core/error.h index 829073e555..8ac763bf2d 100644 --- a/src/core/error.h +++ b/src/core/error.h @@ -48,6 +48,7 @@ #define E_Q_EMPTY -16 /* Empty q */ #define E_Q_TOO_BIG -17 /* q too big (> 1) */ #define E_Q_DEC_MISSING -18 /* Decimal part missing */ +#define E_DROP -19 /* Dropped in script */ diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c index 1478853d3d..1112d7758c 100644 --- a/src/modules/tm/uac.c +++ b/src/modules/tm/uac.c @@ -239,6 +239,8 @@ static inline int t_run_local_req( msg_ctx_id_t backup_ctxid; int refresh_shortcuts = 0; sr_kemi_eng_t *keng = NULL; + run_act_ctx_t ra_ctx; + run_act_ctx_t *bctx; str evname = str_init("tm:local-request"); LM_DBG("executing event_route[tm:local-request]\n"); @@ -271,18 +273,24 @@ static inline int t_run_local_req( tm_global_ctx_id.msgid=lreq.id; tm_global_ctx_id.pid=lreq.pid; set_t(new_cell, T_BR_UNDEFINED); + + init_run_actions_ctx(&ra_ctx); + if(goto_on_local_req>=0) { - run_top_route(event_rt.rlist[goto_on_local_req], &lreq, 0); + run_top_route(event_rt.rlist[goto_on_local_req], &lreq, &ra_ctx); } else { keng = sr_kemi_eng_get(); if(keng==NULL) { LM_WARN("event callback (%s) set, but no cfg engine\n", tm_event_callback.s); } else { + bctx = sr_kemi_act_ctx_get(); + sr_kemi_act_ctx_set(&ra_ctx); if(sr_kemi_route(keng, &lreq, EVENT_ROUTE, &tm_event_callback, &evname)<0) { LM_ERR("error running event route kemi callback\n"); } + sr_kemi_act_ctx_set(bctx); } } /* restore original environment */ @@ -296,6 +304,12 @@ static inline int t_run_local_req( tm_xdata_swap(new_cell, &backup_xd, 1); setsflagsval(sflag_bk); + if (unlikely(ra_ctx.run_flags&DROP_R_F)) { + LM_DBG("tm:local-request dropped msg. to %.*s\n", + lreq.dst_uri.len, lreq.dst_uri.s); + refresh_shortcuts = E_DROP; + goto clean; + } /* rebuild the new message content */ if(lreq.force_send_socket != uac_r->dialog->send_sock) { LM_DBG("Send socket updated to: %.*s", @@ -350,6 +364,7 @@ static inline int t_run_local_req( } } +clean: /* clean local msg structure */ if (unlikely(lreq.new_uri.s)) { @@ -514,6 +529,10 @@ static inline int t_uac_prepare(uac_req_t *uac_r, #ifdef WITH_EVENT_LOCAL_REQUEST if (unlikely(goto_on_local_req>=0 || tm_event_callback.len>0)) { refresh_shortcuts = t_run_local_req(&buf, &buf_len, uac_r, new_cell, request); + if (unlikely(refresh_shortcuts==E_DROP)) { + ret=E_DROP; + goto error1; + } } #endif @@ -605,6 +624,7 @@ static inline int t_uac_prepare(uac_req_t *uac_r, int prepare_req_within(uac_req_t *uac_r, struct retr_buf **dst_req) { + int ret = -1; if (!uac_r || !uac_r->method || !uac_r->dialog) { LM_ERR("Invalid parameter value\n"); goto err; @@ -619,13 +639,17 @@ int prepare_req_within(uac_req_t *uac_r, if ((uac_r->method->len == 6) && (!memcmp("CANCEL", uac_r->method->s, 6))) goto send; uac_r->dialog->loc_seq.value++; /* Increment CSeq */ send: - return t_uac_prepare(uac_r, dst_req, 0); + ret = t_uac_prepare(uac_r, dst_req, 0); + + if (unlikely(ret < 0 && ret == E_DROP)) { + ret = 0; + } err: /* if (cbp) shm_free(cbp); */ /* !! never free cbp here because if t_uac_prepare fails, cbp is not freed * and thus caller has no chance to
[sr-dev] git:master:0303415c: Merge pull request #2172 from korayvt/korayvt/dlg_reset_property
Module: kamailio Branch: master Commit: 0303415cce2acafe01cbbff0601259cd9162586a URL: https://github.com/kamailio/kamailio/commit/0303415cce2acafe01cbbff0601259cd9162586a Author: Daniel-Constantin Mierla Committer: GitHub Date: 2019-12-09T12:44:54+01:00 Merge pull request #2172 from korayvt/korayvt/dlg_reset_property dialog: add new dlg_reset_property function --- Modified: src/modules/dialog/dialog.c Modified: src/modules/dialog/doc/dialog_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/0303415cce2acafe01cbbff0601259cd9162586a.diff Patch: https://github.com/kamailio/kamailio/commit/0303415cce2acafe01cbbff0601259cd9162586a.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:873f0218: Merge pull request #2185 from sergey-safarov/doc-rtpproxy
Module: kamailio Branch: master Commit: 873f0218023a1b66921a1a407ffe4416ada92208 URL: https://github.com/kamailio/kamailio/commit/873f0218023a1b66921a1a407ffe4416ada92208 Author: Olle E. Johansson Committer: GitHub Date: 2020-01-02T16:10:44+01:00 Merge pull request #2185 from sergey-safarov/doc-rtpproxy src/modules/rtpproxy: Updated FAQ about MSRP support --- Modified: src/modules/rtpproxy/doc/rtpproxy_faq.xml --- Diff: https://github.com/kamailio/kamailio/commit/873f0218023a1b66921a1a407ffe4416ada92208.diff Patch: https://github.com/kamailio/kamailio/commit/873f0218023a1b66921a1a407ffe4416ada92208.patch --- diff --git a/src/modules/rtpproxy/doc/rtpproxy_faq.xml b/src/modules/rtpproxy/doc/rtpproxy_faq.xml index 7b7e2256bd..b9aefb0f7d 100644 --- a/src/modules/rtpproxy/doc/rtpproxy_faq.xml +++ b/src/modules/rtpproxy/doc/rtpproxy_faq.xml @@ -70,6 +70,16 @@ + + + Does rtpproxy support MSRP protocol? + + + + Module do not support message media of MSRP protocol. + + + ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c60e6aac: Merge pull request #2175 from nmreis/PR_replicate_socket_info
Module: kamailio Branch: master Commit: c60e6aacb99a8e03e954edbf148cabc5573f9082 URL: https://github.com/kamailio/kamailio/commit/c60e6aacb99a8e03e954edbf148cabc5573f9082 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-01-02T21:42:21+01:00 Merge pull request #2175 from nmreis/PR_replicate_socket_info dmq_usrloc: replicate_socket_info using dmq --- Modified: src/modules/dmq_usrloc/dmq_usrloc.c Modified: src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml Modified: src/modules/dmq_usrloc/usrloc_sync.c --- Diff: https://github.com/kamailio/kamailio/commit/c60e6aacb99a8e03e954edbf148cabc5573f9082.diff Patch: https://github.com/kamailio/kamailio/commit/c60e6aacb99a8e03e954edbf148cabc5573f9082.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:32529289: Merge pull request #2189 from kamailio/dmq_usrloc-fix-log-message
Module: kamailio Branch: master Commit: 325292897d5ecdbdd202608fbe84dceaec6cfdac URL: https://github.com/kamailio/kamailio/commit/325292897d5ecdbdd202608fbe84dceaec6cfdac Author: Emmanuel Schmidbauer Committer: GitHub Date: 2020-01-03T08:42:55-05:00 Merge pull request #2189 from kamailio/dmq_usrloc-fix-log-message dmq_usrloc: use DEBUG loglevel for message --- Modified: src/modules/dmq_usrloc/usrloc_sync.c --- Diff: https://github.com/kamailio/kamailio/commit/325292897d5ecdbdd202608fbe84dceaec6cfdac.diff Patch: https://github.com/kamailio/kamailio/commit/325292897d5ecdbdd202608fbe84dceaec6cfdac.patch --- diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c index 0d6e1b9563..e4ab00bdaf 100644 --- a/src/modules/dmq_usrloc/usrloc_sync.c +++ b/src/modules/dmq_usrloc/usrloc_sync.c @@ -145,7 +145,7 @@ static int delete_contact(str aor, ucontact_info_t* ci) /* it locks the udomain on success */ if (dmq_ul.get_urecord_by_ruid(_d, dmq_ul.get_aorhash(&aor), &ci->ruid, &r, &c) != 0) { - LM_WARN("AOR/Contact ['%.*s'] not found\n", aor.len, aor.s); + LM_DBG("AOR/Contact [%.*s] not found\n", aor.len, aor.s); return -1; } if (dmq_ul.delete_ucontact(r, c) != 0) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:4c8be66d: Merge pull request #2187 from pascomnet/mqtt_module
Module: kamailio Branch: master Commit: 4c8be66d6bc33bd09f58da13b40167273cb1c2f4 URL: https://github.com/kamailio/kamailio/commit/4c8be66d6bc33bd09f58da13b40167273cb1c2f4 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-01-06T13:28:58+01:00 Merge pull request #2187 from pascomnet/mqtt_module mqtt: module to support mqtt pubsub messaging --- Added: src/modules/mqtt/Makefile Added: src/modules/mqtt/README Added: src/modules/mqtt/doc/Makefile Added: src/modules/mqtt/doc/mqtt.xml Added: src/modules/mqtt/doc/mqtt_admin.xml Added: src/modules/mqtt/mqtt_dispatch.c Added: src/modules/mqtt/mqtt_dispatch.h Added: src/modules/mqtt/mqtt_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/4c8be66d6bc33bd09f58da13b40167273cb1c2f4.diff Patch: https://github.com/kamailio/kamailio/commit/4c8be66d6bc33bd09f58da13b40167273cb1c2f4.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:7a136428: Merge pull request #2177 from ycaner06/keepalive3
Module: kamailio Branch: master Commit: 7a136428c73be8409779a7d40b90cd71dd599a2a URL: https://github.com/kamailio/kamailio/commit/7a136428c73be8409779a7d40b90cd71dd599a2a Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-01-06T18:23:17+01:00 Merge pull request #2177 from ycaner06/keepalive3 keepalive: added add/del/get/flush rpc commands --- Modified: src/modules/keepalive/doc/keepalive_admin.xml Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/7a136428c73be8409779a7d40b90cd71dd599a2a.diff Patch: https://github.com/kamailio/kamailio/commit/7a136428c73be8409779a7d40b90cd71dd599a2a.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:754d57f9: Merge pull request #2192 from jamesaimonetti/emacs-compat
Module: kamailio Branch: master Commit: 754d57f9b3f57e7e27f5642fb9a22e368534b1dc URL: https://github.com/kamailio/kamailio/commit/754d57f9b3f57e7e27f5642fb9a22e368534b1dc Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-01-08T09:42:49+01:00 Merge pull request #2192 from jamesaimonetti/emacs-compat Makefile: include flag to generate Emacs-compatible TAGS file --- Modified: Makefile --- Diff: https://github.com/kamailio/kamailio/commit/754d57f9b3f57e7e27f5642fb9a22e368534b1dc.diff Patch: https://github.com/kamailio/kamailio/commit/754d57f9b3f57e7e27f5642fb9a22e368534b1dc.patch --- diff --git a/Makefile b/Makefile index 6d4abe6e90..ef319fa473 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,10 @@ endif endif MKTAGS?=ctags +EMACS_COMPAT= +ifneq (INSIDE_EMACS,) +EMACS_COMPAT=-e +endif # forward all named targets %: @@ -41,7 +45,7 @@ install: .PHONY: TAGS .PHONY: tags TAGS tags: - $(MKTAGS) --exclude="misc/*" --exclude="test/*" -R . + $(MKTAGS) $(EMACS_COMPAT) --exclude="misc/*" --exclude="test/*" -R . # clean everything generated - shortcut on maintainer-clean .PHONY: pure ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:74e6daa7: misc: examples: IMS PCSCF kamailio.cfg update
Module: kamailio Branch: master Commit: 74e6daa71bf7dde64b907b7a1b9b3ebf925fad2b URL: https://github.com/kamailio/kamailio/commit/74e6daa71bf7dde64b907b7a1b9b3ebf925fad2b Author: Nick Committer: GitHub Date: 2020-01-25T11:34:39+11:00 misc: examples: IMS PCSCF kamailio.cfg update Minor changes to make the example functional in the current stable release and higher. - removed modparam("ims_usrloc_pcscf", "hashing_type", 2) This parameter was removed under a466c7bf1f1908461b8ab9dbf10ab4c90b65e52a https://github.com/kamailio/kamailio/commit/a466c7bf1f1908461b8ab9dbf10ab4c90b65e52a#diff-bd9d5dd4265257881c8e19ea24ab533f - Dispatcher parameters only loaded if #!WITH_SBC defined - Load IPsec IMS Module by default (IPsec module is required for IMS Usrloc to load) --- Modified: misc/examples/ims/pcscf/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/74e6daa71bf7dde64b907b7a1b9b3ebf925fad2b.diff Patch: https://github.com/kamailio/kamailio/commit/74e6daa71bf7dde64b907b7a1b9b3ebf925fad2b.patch --- diff --git a/misc/examples/ims/pcscf/kamailio.cfg b/misc/examples/ims/pcscf/kamailio.cfg index 3ffa779eaf..b2660f134b 100644 --- a/misc/examples/ims/pcscf/kamailio.cfg +++ b/misc/examples/ims/pcscf/kamailio.cfg @@ -161,10 +161,11 @@ loadmodule "statistics" loadmodule "ims_dialog" loadmodule "ims_usrloc_pcscf" -loadmodule "ims_registrar_pcscf" #!ifdef WITH_IPSEC loadmodule "ims_ipsec_pcscf" #!endif +loadmodule "ims_registrar_pcscf" + #!ifdef WITH_XMLRPC loadmodule "xmlrpc" @@ -329,6 +330,7 @@ modparam("ctl", "binrpc", "unix:/run/kamailio_pcscf/kamailio_ctl") # - Settings for Dispatcher --- modparam("dispatcher", "list_file", "/etc/kamailio_pcscf/dispatcher.list") +#!ifdef WITH_SBC # Dispatcher: Enable Failover-Support modparam("dispatcher", "flags", 2) # Dispatcher: Overwrite Destination address, if required. @@ -343,6 +345,7 @@ modparam("dispatcher", "sock_avp", "$avp(DISPATCHER_SOCK_AVP)") modparam("dispatcher", "ds_ping_interval", 15) # Actively query the gateways: modparam("dispatcher", "ds_probing_mode", 1) +#!endif # -- usrloc params -- #!ifdef DB_URL @@ -353,7 +356,6 @@ modparam("ims_usrloc_pcscf", "db_url", DB_URL) #!endif modparam("ims_usrloc_pcscf", "db_mode", 1) #!endif -modparam("ims_usrloc_pcscf", "hashing_type", 2) modparam("ims_usrloc_pcscf", "enable_debug_file", 0) modparam("ims_usrloc_pcscf", "match_contact_host_port", 1) modparam("ims_registrar_pcscf", "is_registered_fallback2ip", 1) ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:d74157a3: Merge pull request #2203 from nickvsnetworking/IMS_examples_refresh
Module: kamailio Branch: master Commit: d74157a3a2d97a50dc5de98a0e5fc1c8aa75c09b URL: https://github.com/kamailio/kamailio/commit/d74157a3a2d97a50dc5de98a0e5fc1c8aa75c09b Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-02-05T18:00:20+01:00 Merge pull request #2203 from nickvsnetworking/IMS_examples_refresh misc: examples; ims: Update kamailio.cfg example to function out of the box on current releases --- Modified: misc/examples/ims/pcscf/kamailio.cfg Modified: misc/examples/ims/pcscf/pcscf.cfg.sample --- Diff: https://github.com/kamailio/kamailio/commit/d74157a3a2d97a50dc5de98a0e5fc1c8aa75c09b.diff Patch: https://github.com/kamailio/kamailio/commit/d74157a3a2d97a50dc5de98a0e5fc1c8aa75c09b.patch --- diff --git a/misc/examples/ims/pcscf/kamailio.cfg b/misc/examples/ims/pcscf/kamailio.cfg index 3ffa779eaf..b2660f134b 100644 --- a/misc/examples/ims/pcscf/kamailio.cfg +++ b/misc/examples/ims/pcscf/kamailio.cfg @@ -161,10 +161,11 @@ loadmodule "statistics" loadmodule "ims_dialog" loadmodule "ims_usrloc_pcscf" -loadmodule "ims_registrar_pcscf" #!ifdef WITH_IPSEC loadmodule "ims_ipsec_pcscf" #!endif +loadmodule "ims_registrar_pcscf" + #!ifdef WITH_XMLRPC loadmodule "xmlrpc" @@ -329,6 +330,7 @@ modparam("ctl", "binrpc", "unix:/run/kamailio_pcscf/kamailio_ctl") # - Settings for Dispatcher --- modparam("dispatcher", "list_file", "/etc/kamailio_pcscf/dispatcher.list") +#!ifdef WITH_SBC # Dispatcher: Enable Failover-Support modparam("dispatcher", "flags", 2) # Dispatcher: Overwrite Destination address, if required. @@ -343,6 +345,7 @@ modparam("dispatcher", "sock_avp", "$avp(DISPATCHER_SOCK_AVP)") modparam("dispatcher", "ds_ping_interval", 15) # Actively query the gateways: modparam("dispatcher", "ds_probing_mode", 1) +#!endif # -- usrloc params -- #!ifdef DB_URL @@ -353,7 +356,6 @@ modparam("ims_usrloc_pcscf", "db_url", DB_URL) #!endif modparam("ims_usrloc_pcscf", "db_mode", 1) #!endif -modparam("ims_usrloc_pcscf", "hashing_type", 2) modparam("ims_usrloc_pcscf", "enable_debug_file", 0) modparam("ims_usrloc_pcscf", "match_contact_host_port", 1) modparam("ims_registrar_pcscf", "is_registered_fallback2ip", 1) diff --git a/misc/examples/ims/pcscf/pcscf.cfg.sample b/misc/examples/ims/pcscf/pcscf.cfg.sample index 6b7a7231ca..4d26357764 100644 --- a/misc/examples/ims/pcscf/pcscf.cfg.sample +++ b/misc/examples/ims/pcscf/pcscf.cfg.sample @@ -1,14 +1,14 @@ # IP-Adress for incoming SIP-Traffic, in the following format: # SIP / UDP -listen=udp:11.22.33.44:5060 +listen=udp:0.0.0.0:5060 # SIP / TCP -#listen=tcp:11.22.33.44:5060 +#listen=tcp:0.0.0.0:5060 # SIP / TCP/TLS -#listen=tls:11.22.33.44:5061 +#listen=tls:0.0.0.0:5061 # IPSEC / UDP -#!define IPSEC_LISTEN_ADDR "11.22.33.44" +#!define IPSEC_LISTEN_ADDR "0.0.0.0" #!define IPSEC_CLIENT_PORT 5062 #!define IPSEC_SERVER_PORT 5063 @@ -33,7 +33,7 @@ alias=pcscf.mnc001.mcc001.3gppnetwork.org ##!define XMLRPC_WHITELIST_3 "127.0.0.1" # Databases: -#!define DB_URL "con1=>mysql://pcscf:heslo@127.0.0.1/pcscf" +#!define DB_URL "mysql://pcscf:heslo@127.0.0.1/pcscf" ##!define DB_URL2 "con2=>mysql://pcscf:heslo@127.0.0.1/pcscf" #!define SQLOPS_DBURL "pcscf=>mysql://pcscf:heslo@127.0.0.1/pcscf" @@ -109,4 +109,4 @@ alias=pcscf.mnc001.mcc001.3gppnetwork.org ##!define WITH_REGINFO ##!define WITH_RTPPING ##!define WITH_WEBSOCKET -##!define WITH_IPSEC +#!define WITH_IPSEC ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:decd1848: misc: examples: IMS PCSCF pcscf.cfg update
Module: kamailio Branch: master Commit: decd1848e8c3c8a68553dba48abb4147195b5bf5 URL: https://github.com/kamailio/kamailio/commit/decd1848e8c3c8a68553dba48abb4147195b5bf5 Author: Nick Committer: GitHub Date: 2020-01-25T11:38:19+11:00 misc: examples: IMS PCSCF pcscf.cfg update Minor changes to make the example functional in the current stable release and higher. - Load WITH_IPSEC by default (IPsec module is required for IMS Usrloc to load) - Bind to any IP in example - Removed con=> prefix on MySQL Connection (not used in single instance / if not clustered) --- Modified: misc/examples/ims/pcscf/pcscf.cfg.sample --- Diff: https://github.com/kamailio/kamailio/commit/decd1848e8c3c8a68553dba48abb4147195b5bf5.diff Patch: https://github.com/kamailio/kamailio/commit/decd1848e8c3c8a68553dba48abb4147195b5bf5.patch --- diff --git a/misc/examples/ims/pcscf/pcscf.cfg.sample b/misc/examples/ims/pcscf/pcscf.cfg.sample index 6b7a7231ca..4d26357764 100644 --- a/misc/examples/ims/pcscf/pcscf.cfg.sample +++ b/misc/examples/ims/pcscf/pcscf.cfg.sample @@ -1,14 +1,14 @@ # IP-Adress for incoming SIP-Traffic, in the following format: # SIP / UDP -listen=udp:11.22.33.44:5060 +listen=udp:0.0.0.0:5060 # SIP / TCP -#listen=tcp:11.22.33.44:5060 +#listen=tcp:0.0.0.0:5060 # SIP / TCP/TLS -#listen=tls:11.22.33.44:5061 +#listen=tls:0.0.0.0:5061 # IPSEC / UDP -#!define IPSEC_LISTEN_ADDR "11.22.33.44" +#!define IPSEC_LISTEN_ADDR "0.0.0.0" #!define IPSEC_CLIENT_PORT 5062 #!define IPSEC_SERVER_PORT 5063 @@ -33,7 +33,7 @@ alias=pcscf.mnc001.mcc001.3gppnetwork.org ##!define XMLRPC_WHITELIST_3 "127.0.0.1" # Databases: -#!define DB_URL "con1=>mysql://pcscf:heslo@127.0.0.1/pcscf" +#!define DB_URL "mysql://pcscf:heslo@127.0.0.1/pcscf" ##!define DB_URL2 "con2=>mysql://pcscf:heslo@127.0.0.1/pcscf" #!define SQLOPS_DBURL "pcscf=>mysql://pcscf:heslo@127.0.0.1/pcscf" @@ -109,4 +109,4 @@ alias=pcscf.mnc001.mcc001.3gppnetwork.org ##!define WITH_REGINFO ##!define WITH_RTPPING ##!define WITH_WEBSOCKET -##!define WITH_IPSEC +#!define WITH_IPSEC ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8d5ea6fb: Merge pull request #2238 from btriller/doc-fixes
Module: kamailio Branch: master Commit: 8d5ea6fbbc1d213c2f284720977dc67b8bb89b49 URL: https://github.com/kamailio/kamailio/commit/8d5ea6fbbc1d213c2f284720977dc67b8bb89b49 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-03-04T10:42:29+01:00 Merge pull request #2238 from btriller/doc-fixes Doc fixes --- Modified: src/modules/acc_json/doc/acc_json_admin.xml Modified: src/modules/tm/doc/params.xml Modified: src/modules/usrloc/doc/usrloc_admin.xml Modified: src/modules/websocket/doc/websocket_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/8d5ea6fbbc1d213c2f284720977dc67b8bb89b49.diff Patch: https://github.com/kamailio/kamailio/commit/8d5ea6fbbc1d213c2f284720977dc67b8bb89b49.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c9ff5ef7: Merge pull request #2234 from smititelu/master
Module: kamailio Branch: master Commit: c9ff5ef72c0562748eff9e2055eba3181be5b8c2 URL: https://github.com/kamailio/kamailio/commit/c9ff5ef72c0562748eff9e2055eba3181be5b8c2 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-03-09T20:30:25+01:00 Merge pull request #2234 from smititelu/master registrar: add use_expired_contacts config param --- Modified: src/modules/registrar/config.c Modified: src/modules/registrar/config.h Modified: src/modules/registrar/doc/registrar_admin.xml Modified: src/modules/registrar/lookup.c Modified: src/modules/registrar/registrar.c --- Diff: https://github.com/kamailio/kamailio/commit/c9ff5ef72c0562748eff9e2055eba3181be5b8c2.diff Patch: https://github.com/kamailio/kamailio/commit/c9ff5ef72c0562748eff9e2055eba3181be5b8c2.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:315be997: Merge pull request #1067 from mslehto/filter_server_id
Module: kamailio Branch: master Commit: 315be997e8e6d3466d5d1d89b155566dab6168d5 URL: https://github.com/kamailio/kamailio/commit/315be997e8e6d3466d5d1d89b155566dab6168d5 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2017-04-11T17:34:48+02:00 Merge pull request #1067 from mslehto/filter_server_id modules/nathelper: add undocumented filter_server_id --- Modified: src/modules/nathelper/doc/nathelper_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/315be997e8e6d3466d5d1d89b155566dab6168d5.diff Patch: https://github.com/kamailio/kamailio/commit/315be997e8e6d3466d5d1d89b155566dab6168d5.patch --- diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml index fa5ca7b..d08f80c 100644 --- a/src/modules/nathelper/doc/nathelper_admin.xml +++ b/src/modules/nathelper/doc/nathelper_admin.xml @@ -439,6 +439,28 @@ modparam("nathelper", "append_sdp_oldmediaip", 1) + + + filter_server_id (int) + + Filter contacts by server_id core parameter. + Use this parameter to limit pinging. When set to 1, + only proxy instances which send packets are those where core server_id + matches server_id saved in usrloc. + + Default value is 0 (disabled). + + + + Set filter_server_id parameter + +... +modparam("nathelper", "filter_server_id", 1) +... + + + + ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:00523675: Merge pull request #1073 from btriller/fix-hep3-capture-id
Module: kamailio Branch: master Commit: 0052367550d02927ce844da3b8e27039faac6beb URL: https://github.com/kamailio/kamailio/commit/0052367550d02927ce844da3b8e27039faac6beb Author: Alexandr Dubovikov Committer: GitHub Date: 2017-04-16T18:49:38+02:00 Merge pull request #1073 from btriller/fix-hep3-capture-id sipcapture: fix HEP3 capture-id >= 2^16 --- Modified: src/modules/sipcapture/sipcapture.c --- Diff: https://github.com/kamailio/kamailio/commit/0052367550d02927ce844da3b8e27039faac6beb.diff Patch: https://github.com/kamailio/kamailio/commit/0052367550d02927ce844da3b8e27039faac6beb.patch --- diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c index c398c72..10f15a6 100644 --- a/src/modules/sipcapture/sipcapture.c +++ b/src/modules/sipcapture/sipcapture.c @@ -271,7 +271,7 @@ enum hash_source source = hs_error; //unsigned int rr_idx = 0; -struct hep_timehdr* heptime; +struct hep_timeinfo* heptime; /*! \brief * Exported functions @@ -1150,7 +1150,7 @@ static int child_init(int rank) } - heptime = (struct hep_timehdr*)pkg_malloc(sizeof(struct hep_timehdr)); + heptime = (struct hep_timeinfo*)pkg_malloc(sizeof(struct hep_timeinfo)); if(heptime==NULL) { LM_ERR("no more pkg memory left\n"); return -1; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a6525eaf: Merge pull request #1068 from tmh1999/master
Module: kamailio Branch: master Commit: a6525eaf495a529484cf938d802632603310c497 URL: https://github.com/kamailio/kamailio/commit/a6525eaf495a529484cf938d802632603310c497 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2017-04-18T14:23:30+02:00 Merge pull request #1068 from tmh1999/master modules/{acc,cdp}: allows big endian build --- Modified: src/modules/acc/diam_message.h Modified: src/modules/cdp/diameter.h --- Diff: https://github.com/kamailio/kamailio/commit/a6525eaf495a529484cf938d802632603310c497.diff Patch: https://github.com/kamailio/kamailio/commit/a6525eaf495a529484cf938d802632603310c497.patch --- diff --git a/src/modules/acc/diam_message.h b/src/modules/acc/diam_message.h index 35ad2d9..e4faaf0 100644 --- a/src/modules/acc/diam_message.h +++ b/src/modules/acc/diam_message.h @@ -74,7 +74,6 @@ #define ST_MSG_CODE 0x1301 #define MASK_MSG_CODE0xff00 #else - #error BIG endian detected!! #define AS_MSG_CODE 0x0112 #define AC_MSG_CODE 0x010f #define CE_MSG_CODE 0x0101 diff --git a/src/modules/cdp/diameter.h b/src/modules/cdp/diameter.h index 38115a9..2be2525 100644 --- a/src/modules/cdp/diameter.h +++ b/src/modules/cdp/diameter.h @@ -115,7 +115,6 @@ #define ST_MSG_CODE 0x1301 #define MASK_MSG_CODE0xff00 #else - #error BIG endian detected!! #define AS_MSG_CODE 0x0112 #define AC_MSG_CODE 0x010f #define CE_MSG_CODE 0x0101 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:531627c8: Merge pull request #1063 from grumvalski/t_continue_crash
Module: kamailio Branch: master Commit: 531627c8c8f07e38577478b88689a24542a50d38 URL: https://github.com/kamailio/kamailio/commit/531627c8c8f07e38577478b88689a24542a50d38 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2017-04-18T18:48:01+02:00 Merge pull request #1063 from grumvalski/t_continue_crash tm: don't reset uac reply if in a continue route --- Modified: src/modules/tm/t_reply.c --- Diff: https://github.com/kamailio/kamailio/commit/531627c8c8f07e38577478b88689a24542a50d38.diff Patch: https://github.com/kamailio/kamailio/commit/531627c8c8f07e38577478b88689a24542a50d38.patch --- diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index 6163240..38f5d03 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -1279,7 +1279,10 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code, picked_branch = branch; run_branch_failure_handlers( Trans, Trans->uac[branch].reply, new_code, extra_flags); - Trans->uac[branch].reply = 0; + /* Don't do reset the reply if we are in a resume route, +* we need to free it at the end of the continue processing */ + if (!(Trans->flags&T_ASYNC_CONTINUE)) + Trans->uac[branch].reply = 0; } @@ -1362,8 +1365,11 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code, /* now reset it; after the failure logic, the reply may * not be stored any more and we don't want to keep into -* transaction some broken reference */ - Trans->uac[branch].reply = 0; +* transaction some broken reference. Don't do it if we +* are in a resume route, we need to free it at the end +* of the continue processing */ + if (!(Trans->flags&T_ASYNC_CONTINUE)) + Trans->uac[branch].reply = 0; /* look if the callback perhaps replied transaction; it also * covers the case in which a transaction is replied localy ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c13ffc88: Merge pull request #1076 from mslehto/deadcode
Module: kamailio Branch: master Commit: c13ffc886f4686fcc21ccc7825ef355e0fec6d90 URL: https://github.com/kamailio/kamailio/commit/c13ffc886f4686fcc21ccc7825ef355e0fec6d90 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2017-04-19T08:07:30+02:00 Merge pull request #1076 from mslehto/deadcode core: dead code and ser string removal --- Modified: src/core/config.h Modified: src/core/globals.h Modified: src/core/route.c Modified: src/main.c Modified: src/modules/tm/h_table.h Removed: src/core/types.h --- Diff: https://github.com/kamailio/kamailio/commit/c13ffc886f4686fcc21ccc7825ef355e0fec6d90.diff Patch: https://github.com/kamailio/kamailio/commit/c13ffc886f4686fcc21ccc7825ef355e0fec6d90.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6728fa97: Merge pull request #2256 from gdt/master
Module: kamailio Branch: master Commit: 6728fa974723be3e79e7fd9750cd4fdc26fcb013 URL: https://github.com/kamailio/kamailio/commit/6728fa974723be3e79e7fd9750cd4fdc26fcb013 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-03-19T07:21:26+01:00 Merge pull request #2256 from gdt/master Small portability fixes (NetBSD) --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/6728fa974723be3e79e7fd9750cd4fdc26fcb013.diff Patch: https://github.com/kamailio/kamailio/commit/6728fa974723be3e79e7fd9750cd4fdc26fcb013.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index a89a3a6099..f6f39e3a01 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -210,9 +210,18 @@ endif endif +# dlopen requires -ldl on some systems, but not others. Until there +# is clarity on which require -ldl, add just enough ifeq to fix +# systems known not to use it. +ifeq ($(OS), netbsd) +LIBDL="" +else +LIBDL="-ldl" +endif + ifeq ($(LIBSSL_SET_MUTEX_SHARED), 1) CC_PMUTEX_OPTS = -pthread -DKSR_PTHREAD_MUTEX_SHARED -LD_PMUTEX_OPTS = -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions +LD_PMUTEX_OPTS = -pthread -rdynamic $(LIBDL) -Wl,-Bsymbolic-functions else CC_PMUTEX_OPTS = LD_PMUTEX_OPTS = @@ -2056,7 +2065,7 @@ ifeq ($(OS), netbsd) C_DEFS+=-DHAVE_SELECT endif YACC=yacc - LIBS= + LIBS=-lm endif # OS X support, same as freebsd ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c5bac154: Merge pull request #2264 from armenb/core_strutils_urlencode_urldecode
Module: kamailio Branch: master Commit: c5bac15472ad7db452e35f000a3236a839f14cf8 URL: https://github.com/kamailio/kamailio/commit/c5bac15472ad7db452e35f000a3236a839f14cf8 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-03-28T08:30:16+01:00 Merge pull request #2264 from armenb/core_strutils_urlencode_urldecode core: strutils - add urlencode and urldecode functions --- Modified: src/core/strutils.c Modified: src/core/strutils.h --- Diff: https://github.com/kamailio/kamailio/commit/c5bac15472ad7db452e35f000a3236a839f14cf8.diff Patch: https://github.com/kamailio/kamailio/commit/c5bac15472ad7db452e35f000a3236a839f14cf8.patch --- diff --git a/src/core/strutils.c b/src/core/strutils.c index b06fa44175..7df31727cb 100644 --- a/src/core/strutils.c +++ b/src/core/strutils.c @@ -701,3 +701,76 @@ int reg_replace(char *pattern, char *replacement, char *string, str *result) return replace(&pmatch[0], string, replacement, result); } + +/* Converts a hex character to its integer value */ +char hex_to_char(char hex_code) +{ + return isdigit(hex_code) ? hex_code - '0' : tolower(hex_code) - 'a' + 10; +} + +/* Converts an integer value to its hex character */ +char char_to_hex(char char_code) +{ + static char hex[] = "0123456789abcdef"; + return hex[char_code & 15]; +} + +/*! \brief + * URL Encodes a string + */ +int urlencode(str *sin, str *sout) +{ + char *at, *p; + + if (sin==NULL || sout==NULL || sin->s==NULL || sout->s==NULL || + sin->len<0 || sout->len < 3*sin->len+1) + return -1; + + at = sout->s; + p = sin->s; + + while (p < sin->s+sin->len) { + if (isalnum(*p) || *p == '-' || *p == '_' || *p == '.' || *p == '~') + *at++ = *p; + else + *at++ = '%', *at++ = char_to_hex(*p >> 4), *at++ = char_to_hex(*p & 15); + p++; + } + + *at = 0; + sout->len = at - sout->s; + LM_DBG("urlencoded string is <%s>\n", sout->s); + + return 0; +} + +/*! \brief + * URL Decodes a string + */ +int urldecode(str *sin, str *sout) +{ + char *at, *p; + + at = sout->s; + p = sin->s; + + while (p < sin->s+sin->len) { + if (*p == '%') { + if (p[1] && p[2]) { + *at++ = hex_to_char(p[1]) << 4 | hex_to_char(p[2]); + p += 2; + } + } else if (*p == '+') { + *at++ = ' '; + } else { + *at++ = *p; + } + p++; + } + + *at = 0; + sout->len = at - sout->s; + + LM_DBG("urldecoded string is <%s>\n", sout->s); + return 0; +} diff --git a/src/core/strutils.h b/src/core/strutils.h index 37152dd18d..8b20f72e44 100644 --- a/src/core/strutils.h +++ b/src/core/strutils.h @@ -61,4 +61,8 @@ int escape_param(str *sin, str *sout); int unescape_param(str *sin, str *sout); int escape_csv(str *sin, str *sout); +char hex_to_char(char hex_code); +char char_to_hex(char char_code); +int urlencode(str *sin, str *sout); +int urldecode(str *sin, str *sout); #endif ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:7883a5e4: Merge pull request #2265 from armenb/pv_remove_urlencode_urldecode
Module: kamailio Branch: master Commit: 7883a5e417d10e88d187c7d88f61e28506483b7d URL: https://github.com/kamailio/kamailio/commit/7883a5e417d10e88d187c7d88f61e28506483b7d Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-03-28T08:31:03+01:00 Merge pull request #2265 from armenb/pv_remove_urlencode_urldecode pv: remove urlencode/urldecode functions (moved to core/strutils) --- Modified: src/modules/pv/pv_trans.c --- Diff: https://github.com/kamailio/kamailio/commit/7883a5e417d10e88d187c7d88f61e28506483b7d.diff Patch: https://github.com/kamailio/kamailio/commit/7883a5e417d10e88d187c7d88f61e28506483b7d.patch --- diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c index 36dbcf24b5..826fa9c2ef 100644 --- a/src/modules/pv/pv_trans.c +++ b/src/modules/pv/pv_trans.c @@ -107,78 +107,6 @@ char *tr_set_crt_buffer(void) /* -- helper functions */ -/* Converts a hex character to its integer value */ -static char pv_from_hex(char ch) -{ - return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10; -} - -/* Converts an integer value to its hex character */ -static char pv_to_hex(char code) -{ - static char hex[] = "0123456789abcdef"; - return hex[code & 15]; -} - -/*! \brief - * URL Encodes a string for use in a HTTP query - */ -static int urlencode_param(str *sin, str *sout) -{ - char *at, *p; - - if (sin==NULL || sout==NULL || sin->s==NULL || sout->s==NULL || - sin->len<0 || sout->len < 3*sin->len+1) - return -1; - - at = sout->s; - p = sin->s; - - while (p < sin->s+sin->len) { - if (isalnum(*p) || *p == '-' || *p == '_' || *p == '.' || *p == '~') - *at++ = *p; - else if (*p == ' ') - *at++ = '+'; - else - *at++ = '%', *at++ = pv_to_hex(*p >> 4), *at++ = pv_to_hex(*p & 15); - p++; - } - - *at = 0; - sout->len = at - sout->s; - LM_DBG("urlencoded string is <%s>\n", sout->s); - - return 0; -} - -/* URL Decode a string */ -static int urldecode_param(str *sin, str *sout) { - char *at, *p; - - at = sout->s; - p = sin->s; - - while (p < sin->s+sin->len) { - if (*p == '%') { - if (p[1] && p[2]) { - *at++ = pv_from_hex(p[1]) << 4 | pv_from_hex(p[2]); - p += 2; - } - } else if (*p == '+') { - *at++ = ' '; - } else { - *at++ = *p; - } - p++; - } - - *at = 0; - sout->len = at - sout->s; - - LM_DBG("urldecoded string is <%s>\n", sout->s); - return 0; -} - /* Encode 7BIT PDU */ static int pdu_7bit_encode(str sin) { int i, j; @@ -215,8 +143,8 @@ static int pdu_7bit_decode(str sin) { unsigned char oldfill = 0; j = 0; for(i = 0; i < sin.len; i += 2) { - _tr_buffer[j] = (unsigned char)pv_from_hex(sin.s[i]) << 4; - _tr_buffer[j] |= (unsigned char)pv_from_hex(sin.s[i+1]); + _tr_buffer[j] = (unsigned char)hex_to_char(sin.s[i]) << 4; + _tr_buffer[j] |= (unsigned char)hex_to_char(sin.s[i+1]); fill = (unsigned char)_tr_buffer[j]; fill >>= (8 - nleft); _tr_buffer[j] <<= (nleft -1 ); @@ -1246,7 +1174,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype, return -1; st.s = _tr_buffer; st.len = TR_BUFFER_SIZE; - if (urlencode_param(&val->rs, &st) < 0) + if (urlencode(&val->rs, &st) < 0) return -1; memset(val, 0, sizeof(pv_value_t)); val->flags = PV_VAL_STR; @@ -1260,7 +1188,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype, return -1; st.s = _tr_buffer; st.len = TR_BUFFER_SIZE; - if (urldecode_param(&val->rs, &st) < 0) + if (urldecode(&val->rs, &st) < 0) return -1; memset(val, 0, sizeof(pv_value_t)); val->flags = PV_VAL_STR; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:5966b55b: Merge pull request #2270 from goharahmed/master
Module: kamailio Branch: master Commit: 5966b55bdfd87025bd4459007ffe9eb0558bc16f URL: https://github.com/kamailio/kamailio/commit/5966b55bdfd87025bd4459007ffe9eb0558bc16f Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-04-04T19:50:40+02:00 Merge pull request #2270 from goharahmed/master kex: added process description for rpc command pkg.stats --- Modified: src/modules/kex/pkg_stats.c --- Diff: https://github.com/kamailio/kamailio/commit/5966b55bdfd87025bd4459007ffe9eb0558bc16f.diff Patch: https://github.com/kamailio/kamailio/commit/5966b55bdfd87025bd4459007ffe9eb0558bc16f.patch --- diff --git a/src/modules/kex/pkg_stats.c b/src/modules/kex/pkg_stats.c index d44f465410..9a2f4a2d37 100644 --- a/src/modules/kex/pkg_stats.c +++ b/src/modules/kex/pkg_stats.c @@ -240,7 +240,7 @@ static void rpc_pkg_stats(rpc_t* rpc, void* ctx) _pkg_proc_stats_list[i].total_size = _pkg_proc_stats_list[0].total_size; _pkg_proc_stats_list[i].rank = PROC_NOCHLDINIT; } - if(rpc->struct_add(th, "", + if(rpc->struct_add(th, "s", "entry", i, "pid", _pkg_proc_stats_list[i].pid, "rank", _pkg_proc_stats_list[i].rank, @@ -248,7 +248,8 @@ static void rpc_pkg_stats(rpc_t* rpc, void* ctx) "free", _pkg_proc_stats_list[i].available, "real_used", _pkg_proc_stats_list[i].real_used, "total_size", _pkg_proc_stats_list[i].total_size, - "total_frags", _pkg_proc_stats_list[i].total_frags + "total_frags", _pkg_proc_stats_list[i].total_frags, + "desc",pt[i].desc )<0) { rpc->fault(ctx, 500, "Internal error creating rpc"); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:90346a28: Merge pull request #2268 from armenb/tls_escaped_ssl_cert
Module: kamailio Branch: master Commit: 90346a287165ac58d2ff5f295b92c5298878e035 URL: https://github.com/kamailio/kamailio/commit/90346a287165ac58d2ff5f295b92c5298878e035 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-04-05T09:56:55+02:00 Merge pull request #2268 from armenb/tls_escaped_ssl_cert tls: add support for escaped cert PVs and select --- Modified: src/modules/tls/tls_select.c --- Diff: https://github.com/kamailio/kamailio/commit/90346a287165ac58d2ff5f295b92c5298878e035.diff Patch: https://github.com/kamailio/kamailio/commit/90346a287165ac58d2ff5f295b92c5298878e035.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8c186405: Merge pull request #2273 from kamailio/grumvalski/siptrace_flag_fixes
Module: kamailio Branch: master Commit: 8c18640583d7d057b6a9535e93f56a581a28aff8 URL: https://github.com/kamailio/kamailio/commit/8c18640583d7d057b6a9535e93f56a581a28aff8 Author: Federico Cabiddu Committer: GitHub Date: 2020-04-06T16:19:06+02:00 Merge pull request #2273 from kamailio/grumvalski/siptrace_flag_fixes siptrace flag fixes --- Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/8c18640583d7d057b6a9535e93f56a581a28aff8.diff Patch: https://github.com/kamailio/kamailio/commit/8c18640583d7d057b6a9535e93f56a581a28aff8.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:776f2f65: Merge pull request #2272 from kamailio/jchavanton/dlg_dump
Module: kamailio Branch: master Commit: 776f2f65e28028e5a67da30a8f10d2917b806108 URL: https://github.com/kamailio/kamailio/commit/776f2f65e28028e5a67da30a8f10d2917b806108 Author: Julien Chavanton Committer: GitHub Date: 2020-04-07T19:06:40-07:00 Merge pull request #2272 from kamailio/jchavanton/dlg_dump dialog: adding dlg.dump --- Modified: src/modules/dialog/dialog.c Modified: src/modules/dialog/doc/dialog_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/776f2f65e28028e5a67da30a8f10d2917b806108.diff Patch: https://github.com/kamailio/kamailio/commit/776f2f65e28028e5a67da30a8f10d2917b806108.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:0b3a669c: Merge pull request #2278 from kamailio/grumvalski/siptrace_ack_fix
Module: kamailio Branch: master Commit: 0b3a669ca5d151dee4a825a24c8c5705af4ef34c URL: https://github.com/kamailio/kamailio/commit/0b3a669ca5d151dee4a825a24c8c5705af4ef34c Author: Federico Cabiddu Committer: GitHub Date: 2020-04-09T05:11:06+02:00 Merge pull request #2278 from kamailio/grumvalski/siptrace_ack_fix siptrace: safety check for transaction when checking ACK --- Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/0b3a669ca5d151dee4a825a24c8c5705af4ef34c.diff Patch: https://github.com/kamailio/kamailio/commit/0b3a669ca5d151dee4a825a24c8c5705af4ef34c.patch --- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 5a8d153687..dd508372d4 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -885,16 +885,18 @@ static int sip_trace_helper(sip_msg_t *msg, dest_info_t *dst, str *duri, orig_t = tmb.t_gett(); if(tmb.t_lookup_request(msg,0,&canceled)) { t_invite = tmb.t_gett(); - if (t_invite->uas.request->msg_flags & FL_SIPTRACE) { - LM_DBG("Transaction is already been traced, skipping.\n"); - ret = 1; + if (t_invite!=T_NULL_CELL) { + if (t_invite->uas.request->msg_flags & FL_SIPTRACE) { + LM_DBG("Transaction is already been traced, skipping.\n"); + ret = 1; + } + tmb.t_release_transaction( t_invite ); + tmb.t_unref(msg); } - tmb.t_release_transaction( t_invite ); - tmb.t_unref(msg); - tmb.t_sett(orig_t, T_BR_UNDEFINED); - if (ret) - return 1; } + tmb.t_sett(orig_t, T_BR_UNDEFINED); + if (ret) + return 1; } if (trace_type == SIPTRACE_DIALOG && dlgb.get_dlg == NULL) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:541d1bdf: Merge pull request #2275 from kamailio/grumvalski/ds_outbound_proxy
Module: kamailio Branch: master Commit: 541d1bdfaf0bf28114f556be61eb434597ed894a URL: https://github.com/kamailio/kamailio/commit/541d1bdfaf0bf28114f556be61eb434597ed894a Author: Federico Cabiddu Committer: GitHub Date: 2020-04-09T05:12:58+02:00 Merge pull request #2275 from kamailio/grumvalski/ds_outbound_proxy Grumvalski/ds outbound proxy --- Modified: src/modules/dispatcher/dispatch.c Modified: src/modules/dispatcher/dispatch.h Modified: src/modules/dispatcher/dispatcher.c Modified: src/modules/dispatcher/doc/dispatcher.xml Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/541d1bdfaf0bf28114f556be61eb434597ed894a.diff Patch: https://github.com/kamailio/kamailio/commit/541d1bdfaf0bf28114f556be61eb434597ed894a.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:84a4d8d2: Merge pull request #2279 from kamailio/grumvalski/dlg_briefing_ext
Module: kamailio Branch: master Commit: 84a4d8d266d7642e588f39fa1632fa46e6b47b42 URL: https://github.com/kamailio/kamailio/commit/84a4d8d266d7642e588f39fa1632fa46e6b47b42 Author: Federico Cabiddu Committer: GitHub Date: 2020-04-09T05:14:47+02:00 Merge pull request #2279 from kamailio/grumvalski/dlg_briefing_ext dialog: add dialog init, start end end timestamps to the output of dl⦠--- Modified: src/modules/dialog/dialog.c --- Diff: https://github.com/kamailio/kamailio/commit/84a4d8d266d7642e588f39fa1632fa46e6b47b42.diff Patch: https://github.com/kamailio/kamailio/commit/84a4d8d266d7642e588f39fa1632fa46e6b47b42.patch --- diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c index 5dd941e7d0..962fceeb52 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -3075,7 +3075,7 @@ static void rpc_dlg_briefing(rpc_t *rpc, void *c) rpc->fault(c, 500, "Failed to create the structure"); return; } - if(rpc->struct_add(h, "ddSd", + if(rpc->struct_add(h, "ddS", "h_entry", dlg->h_entry, "h_id", dlg->h_id, "from_uri", &dlg->from_uri, @@ -3083,6 +3083,9 @@ static void rpc_dlg_briefing(rpc_t *rpc, void *c) "call-id", &dlg->callid, "from_tag", &dlg->tag[DLG_CALLER_LEG], "to_tag", &dlg->tag[DLG_CALLER_LEG], + "init_ts", dlg->init_ts, + "start_ts", dlg->start_ts, + "end_ts", dlg->end_ts, "state", dlg->state) < 0) { rpc->fault(c, 500, "Failed to add fields"); return; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:35251dfb: Merge pull request #2282 from micmac1/py3-detect
Module: kamailio Branch: master Commit: 35251dfbd17d27478063be56f7f96ca62c8d480b URL: https://github.com/kamailio/kamailio/commit/35251dfbd17d27478063be56f7f96ca62c8d480b Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-04-12T11:56:40+02:00 Merge pull request #2282 from micmac1/py3-detect app_python3: update Python3 detection mechanism --- Modified: src/modules/app_python3/Makefile --- Diff: https://github.com/kamailio/kamailio/commit/35251dfbd17d27478063be56f7f96ca62c8d480b.diff Patch: https://github.com/kamailio/kamailio/commit/35251dfbd17d27478063be56f7f96ca62c8d480b.patch --- diff --git a/src/modules/app_python3/Makefile b/src/modules/app_python3/Makefile index 1c9ff1c6b6..d31cd6ab10 100644 --- a/src/modules/app_python3/Makefile +++ b/src/modules/app_python3/Makefile @@ -11,18 +11,16 @@ NAME=app_python3.so # but no testing has been done with that. PYTHON3?=python3 -PYTHON3_VERSION=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils.sysconfig.get_config_var('VERSION'))"} -PYTHON3_LIBDIR=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils.sysconfig.get_config_var('LIBDIR'))"} -PYTHON3_LDFLAGS=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils.sysconfig.get_config_var('LINKFORSHARED'))"} -PYTHON3_INCDIR=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_inc())"} - -LIBS=${shell ${PYTHON3}-config --ldflags} +LIBS=${shell \ + tmp_py3_libs=$$(${PYTHON3}-config --ldflags --embed) || \ + tmp_py3_libs=$$(${PYTHON3}-config --ldflags); \ + echo $$tmp_py3_libs} ifeq ($(OS), freebsd) LIBS+=-pthread endif -DEFS+=-I${PYTHON3_INCDIR} +DEFS+=${shell ${PYTHON3}-config --includes} include ../../Makefile.modules ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6b731cb0: Merge pull request #2283 from fredposner/master
Module: kamailio Branch: master Commit: 6b731cb07ba96675c9a61dd156bee0cdccfe60a4 URL: https://github.com/kamailio/kamailio/commit/6b731cb07ba96675c9a61dd156bee0cdccfe60a4 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-04-13T19:49:46+02:00 Merge pull request #2283 from fredposner/master tls: fix typo in documentation --- Modified: src/modules/tls/doc/params.xml --- Diff: https://github.com/kamailio/kamailio/commit/6b731cb07ba96675c9a61dd156bee0cdccfe60a4.diff Patch: https://github.com/kamailio/kamailio/commit/6b731cb07ba96675c9a61dd156bee0cdccfe60a4.patch --- diff --git a/src/modules/tls/doc/params.xml b/src/modules/tls/doc/params.xml index a04827b44b..eb78ac31b6 100644 --- a/src/modules/tls/doc/params.xml +++ b/src/modules/tls/doc/params.xml @@ -160,7 +160,7 @@ modparam("tls", "certificate", "/usr/local/etc/kamailio/my_certificate.pem") Set private_key parameter ... -modparam("tls", "private", "/usr/local/etc/kamailio/my_pkey.pem") +modparam("tls", "private_key", "/usr/local/etc/kamailio/my_pkey.pem") ... ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:94942eb7: tls: add sel for tls verified cert chain (requires OpenSSL 1.1+) (#2289)
Module: kamailio Branch: master Commit: 94942eb788872f00c2d77e7373fbb416af667a2b URL: https://github.com/kamailio/kamailio/commit/94942eb788872f00c2d77e7373fbb416af667a2b Author: Armen Babikyan Committer: GitHub Date: 2020-04-20T09:51:26+02:00 tls: add sel for tls verified cert chain (requires OpenSSL 1.1+) (#2289) * tls: add sel for tls verified cert chain (requires OpenSSL 1.1+) * remove extra tcpconn_put() call Co-authored-by: Armen Babikyan --- Modified: src/modules/tls/tls_select.c --- Diff: https://github.com/kamailio/kamailio/commit/94942eb788872f00c2d77e7373fbb416af667a2b.diff Patch: https://github.com/kamailio/kamailio/commit/94942eb788872f00c2d77e7373fbb416af667a2b.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:058edd77: Merge pull request #2246 from alexyosifov/ims_registrar_scscf_notify_fix
Module: kamailio Branch: master Commit: 058edd7730436c0e7aa3cea7f0b9ec5bd47cff5b URL: https://github.com/kamailio/kamailio/commit/058edd7730436c0e7aa3cea7f0b9ec5bd47cff5b Author: ng-voice GmbH Committer: GitHub Date: 2020-04-21T11:52:27+02:00 Merge pull request #2246 from alexyosifov/ims_registrar_scscf_notify_fix ims_registrar_scscf: fix multiple contacts in NOTIFY --- Modified: src/modules/ims_registrar_scscf/registrar_notify.c Modified: src/modules/ims_registrar_scscf/registrar_notify.h --- Diff: https://github.com/kamailio/kamailio/commit/058edd7730436c0e7aa3cea7f0b9ec5bd47cff5b.diff Patch: https://github.com/kamailio/kamailio/commit/058edd7730436c0e7aa3cea7f0b9ec5bd47cff5b.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:673f25e0: Merge pull request #2295 from kamailio/grumvalski/siptrace_memleak_fix
Module: kamailio Branch: master Commit: 673f25e0961cc49ad1804bb524b8e371adc39ff2 URL: https://github.com/kamailio/kamailio/commit/673f25e0961cc49ad1804bb524b8e371adc39ff2 Author: Federico Cabiddu Committer: GitHub Date: 2020-04-22T14:05:26+02:00 Merge pull request #2295 from kamailio/grumvalski/siptrace_memleak_fix siptrace: siptrace: fix memory leak in fake replies tracing --- Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/673f25e0961cc49ad1804bb524b8e371adc39ff2.diff Patch: https://github.com/kamailio/kamailio/commit/673f25e0961cc49ad1804bb524b8e371adc39ff2.patch --- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 3bd1f5a98c..5b4c064bec 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -1383,7 +1383,7 @@ static void trace_onreq_out(struct cell *t, int type, struct tmcb_params *ps) } if(sip_trace_msg_attrs(msg, &sto) < 0) { - return; + return; } if(ps->send_buf.len > 0) { @@ -1569,6 +1569,7 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps) siptrace_data_t sto; siptrace_info_t* info; int faked = 0; + int parsed_f = 0; struct sip_msg *msg; struct sip_msg *req; struct ip_addr to_ip; @@ -1607,10 +1608,15 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps) if(msg == NULL || msg == FAKED_REPLY) { msg = t->uas.request; faked = 1; + /* check if from header has been already parsed. +* If not we have to parse it in pkg memory and free it at the end. +*/ + if (msg->from && msg->from->parsed == NULL) + parsed_f = 1; } if(sip_trace_msg_attrs(msg, &sto) < 0) { - return; + goto end; } if(faked == 0) { @@ -1656,7 +1662,7 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps) sto.status.s = int2strbuf(ps->code, statusbuf, INT2STR_MAX_LEN, &sto.status.len); if(sto.status.s == 0) { LM_ERR("failure to get the status string\n"); - return; + goto end; } memset(&to_ip, 0, sizeof(struct ip_addr)); @@ -1686,10 +1692,16 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps) if (info->uriState == STRACE_RAW_URI) { LM_BUG("uriState must be either UNUSED or PARSED here! must be a bug! Message won't be traced!\n"); - return; + goto end; } sip_trace_store(&sto, info->uriState == STRACE_PARSED_URI ? &info->u.dest_info : NULL, NULL); + +end: + if (faked && parsed_f) { + free_from(msg->from->parsed); + msg->from->parsed = NULL; + } } static void trace_tm_neg_ack_in(struct cell *t, int type, struct tmcb_params *ps) ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:70929caa: Merge pull request #2305 from dsciarra/do-not-use-tcp-id-for-lookup
Module: kamailio Branch: master Commit: 70929caac33583ae1026234ca999cc90afcb6f4c URL: https://github.com/kamailio/kamailio/commit/70929caac33583ae1026234ca999cc90afcb6f4c Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-04-28T15:57:29+02:00 Merge pull request #2305 from dsciarra/do-not-use-tcp-id-for-lookup core: do not use tcp id for lookup if not needed --- Modified: src/core/tcp_main.c --- Diff: https://github.com/kamailio/kamailio/commit/70929caac33583ae1026234ca999cc90afcb6f4c.diff Patch: https://github.com/kamailio/kamailio/commit/70929caac33583ae1026234ca999cc90afcb6f4c.patch --- diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c index e57a29d99e..89e3b56b7c 100644 --- a/src/core/tcp_main.c +++ b/src/core/tcp_main.c @@ -1967,7 +1967,7 @@ int tcp_send(struct dest_info* dst, union sockaddr_union* from, if (likely(port)){ /* try again w/o id */ if(tcp_connection_match==TCPCONN_MATCH_STRICT) { - c=tcpconn_lookup(dst->id, &ip, port, from, try_local_port, con_lifetime); + c=tcpconn_lookup(0, &ip, port, from, try_local_port, con_lifetime); } else { c=tcpconn_get(0, &ip, port, from, con_lifetime); } ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:4e881304: Merge pull request #2306 from NGSegovia/ngsegovia/keepalive_disable_delete_counter
Module: kamailio Branch: master Commit: 4e881304d33356a5fd3b93c15c0a9e06060049f7 URL: https://github.com/kamailio/kamailio/commit/4e881304d33356a5fd3b93c15c0a9e06060049f7 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-04-28T16:03:18+02:00 Merge pull request #2306 from NGSegovia/ngsegovia/keepalive_disable_delete_counter keepalive: ignore delete_counter if it is set to 0 --- Modified: src/modules/keepalive/doc/keepalive_admin.xml Modified: src/modules/keepalive/keepalive_core.c --- Diff: https://github.com/kamailio/kamailio/commit/4e881304d33356a5fd3b93c15c0a9e06060049f7.diff Patch: https://github.com/kamailio/kamailio/commit/4e881304d33356a5fd3b93c15c0a9e06060049f7.patch --- diff --git a/src/modules/keepalive/doc/keepalive_admin.xml b/src/modules/keepalive/doc/keepalive_admin.xml index 5db99eee4a..98e55222ea 100644 --- a/src/modules/keepalive/doc/keepalive_admin.xml +++ b/src/modules/keepalive/doc/keepalive_admin.xml @@ -96,7 +96,7 @@ modparam("keepalive", "destination", "sip.provider.com") delete_counter(int) - Unsuccesful attemps increase delete_counter . After passing it , keepalive module doesn't try to send options requests. + Unsuccesful attemps increase delete_counter. After passing it, keepalive module doesn't try to send options requests. Ignored if it's set to 0. diff --git a/src/modules/keepalive/keepalive_core.c b/src/modules/keepalive/keepalive_core.c index ff0bed3e8e..f641aceb1f 100644 --- a/src/modules/keepalive/keepalive_core.c +++ b/src/modules/keepalive/keepalive_core.c @@ -67,15 +67,14 @@ void ka_check_timer(unsigned int ticks, void *param) ka_dest = ka_dest->next) { LM_DBG("ka_check_timer dest:%.*s\n", ka_dest->uri.len, ka_dest->uri.s); + if(ka_counter_del > 0 && ka_dest->counter > ka_counter_del) { + continue; + } + /* Send ping using TM-Module. * int request(str* m, str* ruri, str* to, str* from, str* h, * str* b, str *oburi, * transaction_cb cb, void* cbp); */ - - if(ka_dest->counter>ka_counter_del){ - continue; - } - set_uac_req(&uac_r, &ka_ping_method, 0, 0, 0, TMCB_LOCAL_COMPLETED, ka_options_callback, (void *)ka_dest); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:f6c68817: Merge pull request #2304 from kamailio/grumvalski/usrloc_stats
Module: kamailio Branch: master Commit: f6c688178902138dff8115cdabd72e8631a635dc URL: https://github.com/kamailio/kamailio/commit/f6c688178902138dff8115cdabd72e8631a635dc Author: Federico Cabiddu Committer: GitHub Date: 2020-05-02T16:22:06+02:00 Merge pull request #2304 from kamailio/grumvalski/usrloc_stats usrloc: change "-" for "_" in stats name to be prometheus compliant --- Modified: src/core/cfg.lex Modified: src/core/cfg.y Modified: src/core/counters.c Modified: src/core/counters.h Modified: src/core/globals.h Modified: src/modules/ims_usrloc_pcscf/udomain.c Modified: src/modules/p_usrloc/udomain.c Modified: src/modules/usrloc/udomain.c --- Diff: https://github.com/kamailio/kamailio/commit/f6c688178902138dff8115cdabd72e8631a635dc.diff Patch: https://github.com/kamailio/kamailio/commit/f6c688178902138dff8115cdabd72e8631a635dc.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:10fd9fb2: Merge pull request #2313 from NGSegovia/keepalive/custom_ping_interval
Module: kamailio Branch: master Commit: 10fd9fb2d8785fe9670a96b8e699135cbde3f28e URL: https://github.com/kamailio/kamailio/commit/10fd9fb2d8785fe9670a96b8e699135cbde3f28e Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-07T13:08:51+02:00 Merge pull request #2313 from NGSegovia/keepalive/custom_ping_interval keepalive: custom pinging interval per destination --- Modified: src/modules/drouting/drouting.c Modified: src/modules/keepalive/api.h Modified: src/modules/keepalive/doc/keepalive.xml Modified: src/modules/keepalive/doc/keepalive_devel.xml Modified: src/modules/keepalive/keepalive.h Modified: src/modules/keepalive/keepalive_api.c Modified: src/modules/keepalive/keepalive_core.c Modified: src/modules/keepalive/keepalive_mod.c Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/10fd9fb2d8785fe9670a96b8e699135cbde3f28e.diff Patch: https://github.com/kamailio/kamailio/commit/10fd9fb2d8785fe9670a96b8e699135cbde3f28e.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:465211bc: Merge pull request #2292 from alexyosifov/ims_registrar_scscf_lookup_fix
Module: kamailio Branch: master Commit: 465211bc18152c9a4c5b60341a9d02f82971afb0 URL: https://github.com/kamailio/kamailio/commit/465211bc18152c9a4c5b60341a9d02f82971afb0 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-07T13:14:53+02:00 Merge pull request #2292 from alexyosifov/ims_registrar_scscf_lookup_fix ims_registrar_scscf: fix aor generation in lookup() --- Modified: src/modules/ims_registrar_scscf/lookup.c --- Diff: https://github.com/kamailio/kamailio/commit/465211bc18152c9a4c5b60341a9d02f82971afb0.diff Patch: https://github.com/kamailio/kamailio/commit/465211bc18152c9a4c5b60341a9d02f82971afb0.patch --- diff --git a/src/modules/ims_registrar_scscf/lookup.c b/src/modules/ims_registrar_scscf/lookup.c index 0e7b06cf60..640dbb9707 100644 --- a/src/modules/ims_registrar_scscf/lookup.c +++ b/src/modules/ims_registrar_scscf/lookup.c @@ -61,13 +61,12 @@ */ int lookup(struct sip_msg* _m, udomain_t* _d, char* ue_type_c) { impurecord_t* r; -str aor; +str aor, tmp_aor; ucontact_t* ptr = 0; int res; int ret; str path_dst; flag_t old_bflags; -int i = 0; int ue_type;/*0=any, 1=3gpp, 2=sip */ impu_contact_t *impucontact; @@ -91,29 +90,35 @@ int lookup(struct sip_msg* _m, udomain_t* _d, char* ue_type_c) { ue_type=0; } -if (_m->new_uri.s) { - aor.s = pkg_malloc(_m->new_uri.len); - if (aor.s == NULL) { - LM_ERR("memory allocation failure\n"); - return -1; - } - memcpy(aor.s, _m->new_uri.s, _m->new_uri.len); - aor.len = _m->new_uri.len; - } else { - aor.s = pkg_malloc(_m->first_line.u.request.uri.len); - if (aor.s == NULL) { - LM_ERR("memory allocation failure\n"); - return -1; - } - memcpy(aor.s, _m->first_line.u.request.uri.s, _m->first_line.u.request.uri.len); - aor.len = _m->first_line.u.request.uri.len; - } - -for (i = 4; i < aor.len; i++) -if (aor.s[i] == ':' || aor.s[i] == ';' || aor.s[i] == '?') { -aor.len = i; -break; -} + if (parse_sip_msg_uri(_m) < 0) { + LM_ERR("Error while parsing the Request-URI\n"); + return -1; + } + + if (_m->new_uri.s) { + tmp_aor = _m->new_uri; + } else { + tmp_aor = _m->first_line.u.request.uri; + } + + aor.s = pkg_malloc(tmp_aor.len); + if (aor.s == NULL) { + LM_ERR("memory allocation failure\n"); + return -1; + } + + // build aor + // add 'sip:' or 'tel:' + memcpy(aor.s, tmp_aor.s, 4); + aor.len = 4; + // add user part + memcpy(aor.s + aor.len, _m->parsed_uri.user.s, _m->parsed_uri.user.len); + aor.len += _m->parsed_uri.user.len; + // add '@' + aor.s[aor.len++] = '@'; + // add host part + memcpy(aor.s + aor.len, _m->parsed_uri.host.s, _m->parsed_uri.host.len); + aor.len += _m->parsed_uri.host.len; LM_DBG("Looking for <%.*s>\n", aor.len, aor.s); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:d35e9768: Merge pull request #2296 from alexyosifov/ims_registrar_scscf_event_reg
Module: kamailio Branch: master Commit: d35e97684ae3dcefa2351172cc477bb11927305d URL: https://github.com/kamailio/kamailio/commit/d35e97684ae3dcefa2351172cc477bb11927305d Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-07T13:16:09+02:00 Merge pull request #2296 from alexyosifov/ims_registrar_scscf_event_reg ims_registrar_scscf: pass event type as parameter --- Modified: src/modules/ims_registrar_scscf/cxdx_callbacks.c Modified: src/modules/ims_registrar_scscf/reg_rpc.c Modified: src/modules/ims_registrar_scscf/registrar_notify.c Modified: src/modules/ims_registrar_scscf/registrar_notify.h Modified: src/modules/ims_registrar_scscf/save.c --- Diff: https://github.com/kamailio/kamailio/commit/d35e97684ae3dcefa2351172cc477bb11927305d.diff Patch: https://github.com/kamailio/kamailio/commit/d35e97684ae3dcefa2351172cc477bb11927305d.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:2373495a: Merge pull request #2318 from NGSegovia/keepalive/response_callback
Module: kamailio Branch: master Commit: 2373495a3f79509a2f79830da0105d02bf1b649e URL: https://github.com/kamailio/kamailio/commit/2373495a3f79509a2f79830da0105d02bf1b649e Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-12T14:02:18+02:00 Merge pull request #2318 from NGSegovia/keepalive/response_callback Keepalive/response callback --- Modified: src/modules/drouting/drouting.c Modified: src/modules/keepalive/api.h Modified: src/modules/keepalive/doc/keepalive.xml Modified: src/modules/keepalive/doc/keepalive_devel.xml Modified: src/modules/keepalive/keepalive.h Modified: src/modules/keepalive/keepalive_api.c Modified: src/modules/keepalive/keepalive_core.c Modified: src/modules/keepalive/keepalive_mod.c Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/2373495a3f79509a2f79830da0105d02bf1b649e.diff Patch: https://github.com/kamailio/kamailio/commit/2373495a3f79509a2f79830da0105d02bf1b649e.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:62e51095: Merge pull request #2319 from cruzccl/redis-sentinel-reconnection
Module: kamailio Branch: master Commit: 62e510957c28e8b8419f7f65b6a866c1a9d0de5b URL: https://github.com/kamailio/kamailio/commit/62e510957c28e8b8419f7f65b6a866c1a9d0de5b Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-12T14:04:21+02:00 Merge pull request #2319 from cruzccl/redis-sentinel-reconnection ndb_redis: add sentinel support to reconnection logic --- Modified: src/modules/ndb_redis/redis_client.c --- Diff: https://github.com/kamailio/kamailio/commit/62e510957c28e8b8419f7f65b6a866c1a9d0de5b.diff Patch: https://github.com/kamailio/kamailio/commit/62e510957c28e8b8419f7f65b6a866c1a9d0de5b.patch --- diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c index 44460aa2fd..5ad063f89a 100644 --- a/src/modules/ndb_redis/redis_client.c +++ b/src/modules/ndb_redis/redis_client.c @@ -408,8 +408,11 @@ redisc_server_t *redisc_get_server(str *name) */ int redisc_reconnect_server(redisc_server_t *rsrv) { - char addr[256], pass[256], unix_sock_path[256]; - unsigned int port, db, sock = 0, haspass = 0; + char addr[256], pass[256], unix_sock_path[256], sentinel_group[256]; + unsigned int port, db, sock = 0, haspass = 0, sentinel_master = 1; + char sentinels[MAXIMUM_SENTINELS][256]; + uint8_t sentinels_count = 0; + int i, row; param_t *pit = NULL; struct timeval tv_conn; struct timeval tv_cmd; @@ -442,6 +445,84 @@ int redisc_reconnect_server(redisc_server_t *rsrv) } else if(pit->name.len==4 && strncmp(pit->name.s, "pass", 4)==0) { snprintf(pass, sizeof(pass)-1, "%.*s", pit->body.len, pit->body.s); haspass = 1; + } else if(pit->name.len==14 && strncmp(pit->name.s, + "sentinel_group", 14)==0) { + snprintf(sentinel_group, sizeof(sentinel_group)-1, "%.*s", + pit->body.len, pit->body.s); + } else if(pit->name.len==15 && strncmp(pit->name.s, + "sentinel_master", 15)==0) { + if(str2int(&pit->body, &sentinel_master) < 0) + sentinel_master = 1; + } else if(pit->name.len==8 && strncmp(pit->name.s, + "sentinel", 8)==0) { + if( sentinels_count < MAXIMUM_SENTINELS ){ + snprintf(sentinels[sentinels_count], + sizeof(sentinels[sentinels_count])-1, "%.*s", + pit->body.len, pit->body.s); + sentinels_count++; + } + else { + LM_ERR("too many sentinels, maximum %d supported.\n", + MAXIMUM_SENTINELS); + return -1; + } + } + } + + // if sentinels are provided, we need to connect to them and retrieve the redis server + // address / port + if(sentinels_count > 0) { + for(i= 0; i< sentinels_count; i++) { + char *sentinelAddr = sentinels[i]; + char *pos; + redisContext *redis; + redisReply *res, *res2; + + port = 6379; + if( (pos = strchr(sentinelAddr, ':')) != NULL ) { + port = atoi(pos+1); + pos[i] = '\0'; + } + + redis = redisConnectWithTimeout(sentinelAddr, port, tv_conn); + if( redis ) { + if(sentinel_master != 0) { + res = redisCommand(redis, + "SENTINEL get-master-addr-by-name %s", + sentinel_group); + if( res && (res->type == REDIS_REPLY_ARRAY) + && (res->elements == 2) ) { + strncpy(addr, res->element[0]->str, + res->element[0]->len + 1); + port = atoi(res->element[1]->str); + LM_DBG("sentinel replied: %s:%d\n", addr, port); + } + } +
[sr-dev] git:master:2372dc93: Merge pull request #2323 from voiceip/keepalive-rpc-change
Module: kamailio Branch: master Commit: 2372dc933926611dad22812e0d550ae736249a06 URL: https://github.com/kamailio/kamailio/commit/2372dc933926611dad22812e0d550ae736249a06 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-12T14:05:27+02:00 Merge pull request #2323 from voiceip/keepalive-rpc-change keepalive: update rpc response to include current state --- Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/2372dc933926611dad22812e0d550ae736249a06.diff Patch: https://github.com/kamailio/kamailio/commit/2372dc933926611dad22812e0d550ae736249a06.patch --- diff --git a/src/modules/keepalive/keepalive_rpc.c b/src/modules/keepalive/keepalive_rpc.c index 8d9a84a428..3a72b31474 100644 --- a/src/modules/keepalive/keepalive_rpc.c +++ b/src/modules/keepalive/keepalive_rpc.c @@ -96,6 +96,7 @@ static void keepalive_rpc_list(rpc_t *rpc, void *ctx) _dtime = ctime(&dest->last_down); _dtime[strlen(_dtime) - 1] = '\0'; rpc->struct_add(sub, "s", "last down", _dtime); + rpc->struct_add(sub, "d", "state", (int) dest->state); } return; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:b26951c0: Merge pull request #2326 from NGSegovia/keepalive/first_check_on_start
Module: kamailio Branch: master Commit: b26951c06483a0e9720b65689179541b29c938c5 URL: https://github.com/kamailio/kamailio/commit/b26951c06483a0e9720b65689179541b29c938c5 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-05-19T12:56:58+02:00 Merge pull request #2326 from NGSegovia/keepalive/first_check_on_start keepalive: early start of OPTIONS checking --- Modified: src/modules/keepalive/keepalive.h Modified: src/modules/keepalive/keepalive_api.c Modified: src/modules/keepalive/keepalive_core.c --- Diff: https://github.com/kamailio/kamailio/commit/b26951c06483a0e9720b65689179541b29c938c5.diff Patch: https://github.com/kamailio/kamailio/commit/b26951c06483a0e9720b65689179541b29c938c5.patch --- diff --git a/src/modules/keepalive/keepalive.h b/src/modules/keepalive/keepalive.h index a8da607db8..41e8eab00a 100644 --- a/src/modules/keepalive/keepalive.h +++ b/src/modules/keepalive/keepalive.h @@ -48,6 +48,8 @@ extern int ka_ping_interval; #define KA_PROBE_INACTIVE 2 #define KA_PROBE_ONLYFLAGGED 3 +#define KA_FIRST_TRY_DELAY 500 /* First OPTIONS send is done 500 millis after adding the destination */ + typedef void (*ka_statechanged_f)(str *uri, int state, void *user_attr); typedef void (*ka_response_f)( str *uri, struct tmcb_params *ps, void *user_attr); @@ -62,6 +64,7 @@ typedef struct _ka_dest int state; time_t last_checked, last_up, last_down; int counter;// counts unreachable attemps + ticks_t ping_interval; /*!< Actual interval between OPTIONS */ void *user_attr; ka_statechanged_f statechanged_clb; @@ -70,7 +73,7 @@ typedef struct _ka_dest struct ip_addr ip_address; /*!< IP-Address of the entry */ unsigned short int port; /*!< Port of the URI */ unsigned short int proto; /*!< Protocol of the URI */ - struct timer_ln *timer; + struct timer_ln *timer;/*!< Timer firing the OPTIONS test */ struct _ka_dest *next; } ka_dest_t; diff --git a/src/modules/keepalive/keepalive_api.c b/src/modules/keepalive/keepalive_api.c index 18336084af..19339c4ba6 100644 --- a/src/modules/keepalive/keepalive_api.c +++ b/src/modules/keepalive/keepalive_api.c @@ -107,6 +107,7 @@ int ka_add_dest(str *uri, str *owner, int flags, int ping_interval, dest->statechanged_clb = statechanged_clb; dest->response_clb = response_clb; dest->user_attr = user_attr; + dest->ping_interval = MS_TO_TICKS((ping_interval == 0 ? ka_ping_interval : ping_interval) * 1000) ; dest->timer = timer_alloc(); if (dest->timer == NULL) { @@ -116,8 +117,7 @@ int ka_add_dest(str *uri, str *owner, int flags, int ping_interval, timer_init(dest->timer, ka_check_timer, dest, 0); -int actual_ping_interval = ping_interval == 0 ? ka_ping_interval : ping_interval; - if(timer_add(dest->timer, MS_TO_TICKS(actual_ping_interval * 1000)) < 0){ + if(timer_add(dest->timer, MS_TO_TICKS(KA_FIRST_TRY_DELAY)) < 0){ LM_ERR("failed to start timer\n"); goto err; } diff --git a/src/modules/keepalive/keepalive_core.c b/src/modules/keepalive/keepalive_core.c index 04b520a62b..4daa57908d 100644 --- a/src/modules/keepalive/keepalive_core.c +++ b/src/modules/keepalive/keepalive_core.c @@ -82,7 +82,7 @@ ticks_t ka_check_timer(ticks_t ticks, struct timer_ln* tl, void* param) ka_dest->last_checked = time(NULL); - return (ticks_t)(-1); /* periodical */ + return ka_dest->ping_interval; /* periodical, but based on dest->ping_interval, not on initial_timeout */ } /*! \brief ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:1d391e22: Merge pull request #2336 from kamailio/ds_add_attrs
Module: kamailio Branch: master Commit: 1d391e22dc88b64f8f18f52005dc610f009a96e0 URL: https://github.com/kamailio/kamailio/commit/1d391e22dc88b64f8f18f52005dc610f009a96e0 Author: Federico Cabiddu Committer: GitHub Date: 2020-05-28T07:14:56+02:00 Merge pull request #2336 from kamailio/ds_add_attrs dispatcher: add attrs param to rpc 'add' call --- Modified: src/modules/dispatcher/dispatch.c Modified: src/modules/dispatcher/dispatch.h Modified: src/modules/dispatcher/dispatcher.c Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/1d391e22dc88b64f8f18f52005dc610f009a96e0.diff Patch: https://github.com/kamailio/kamailio/commit/1d391e22dc88b64f8f18f52005dc610f009a96e0.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index b5d56d405a..8cff6cdb56 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -2419,15 +2419,16 @@ void ds_add_dest_cb(ds_set_t *node, int i, void *arg) } /* add dispatcher entry to in-memory dispatcher list */ -int ds_add_dst(int group, str *address, int flags) +int ds_add_dst(int group, str *address, int flags, str *attrs) { int setn, priority; - str attrs; setn = _ds_list_nr; priority = 0; - attrs.s = 0; - attrs.len = 0; + + if (attrs->len == 0) { + attrs->s = 0; + } *next_idx = (*crt_idx + 1) % 2; ds_avl_destroy(&ds_lists[*next_idx]); @@ -2436,7 +2437,7 @@ int ds_add_dst(int group, str *address, int flags) ds_iter_set(_ds_list, &ds_add_dest_cb, NULL); // add new destination - if(add_dest2list(group, *address, flags, priority, &attrs, + if(add_dest2list(group, *address, flags, priority, attrs, *next_idx, &setn) != 0) { LM_WARN("unable to add destination %.*s to set %d", address->len, address->s, group); if(ds_load_mode==1) { diff --git a/src/modules/dispatcher/dispatch.h b/src/modules/dispatcher/dispatch.h index ee4ea0b760..2bd63dc64b 100644 --- a/src/modules/dispatcher/dispatch.h +++ b/src/modules/dispatcher/dispatch.h @@ -140,7 +140,7 @@ int ds_select_dst_limit(sip_msg_t *msg, int set, int alg, uint32_t limit, int mode); int ds_select_dst(struct sip_msg *msg, int set, int alg, int mode); int ds_update_dst(struct sip_msg *msg, int upos, int mode); -int ds_add_dst(int group, str *address, int flags); +int ds_add_dst(int group, str *address, int flags, str *attrs); int ds_remove_dst(int group, str *address); int ds_update_state(sip_msg_t *msg, int group, str *address, int state, ds_rctx_t *rctx); diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c index 2a566ab730..b2693a2947 100644 --- a/src/modules/dispatcher/dispatcher.c +++ b/src/modules/dispatcher/dispatcher.c @@ -1800,15 +1800,16 @@ static void dispatcher_rpc_add(rpc_t *rpc, void *ctx) { int group, flags; str dest; + str attrs; flags = 0; - if(rpc->scan(ctx, "dS*d", &group, &dest, &flags) < 2) { + if(rpc->scan(ctx, "dS*d", &group, &dest, &flags, &attrs) < 3) { rpc->fault(ctx, 500, "Invalid Parameters"); return; } - if(ds_add_dst(group, &dest, flags) != 0) { + if(ds_add_dst(group, &dest, flags, &attrs) != 0) { rpc->fault(ctx, 500, "Adding dispatcher dst failed"); return; } diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index b872adc156..984b53258d 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1938,15 +1938,19 @@ DEST: { _flags_ (optional): as described in the list file format, default 0 + _attrs_ (optional): as described in the list file format, + default "" + Example: ... -# prototype: &sercmd; dispatcher.add _group_ _address_ _flags_ +# prototype: &sercmd; dispatcher.add _group_ _address_ _flags_ _attrs_ &sercmd; dispatcher.add 2 sip:127.0.0.1:5080 &sercmd; dispatcher.add 3 sip:127.0.0.1:5075 8 +&sercmd; dispatcher.add 3 sip:127.0.0.1:5075 0 duid=abc;socket=udp:127.0.0.1:5060 ... ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8e2c2e39: Merge pull request #2342 from kamailio/grumvalski/ds_load_table
Module: kamailio Branch: master Commit: 8e2c2e391eb90f53b0fdc3e108bb84dab4e11593 URL: https://github.com/kamailio/kamailio/commit/8e2c2e391eb90f53b0fdc3e108bb84dab4e11593 Author: Federico Cabiddu Committer: GitHub Date: 2020-06-05T13:28:33+02:00 Merge pull request #2342 from kamailio/grumvalski/ds_load_table dispatcher: don't reset load table when adding/removing a destination⦠--- Modified: src/modules/dispatcher/dispatch.c --- Diff: https://github.com/kamailio/kamailio/commit/8e2c2e391eb90f53b0fdc3e108bb84dab4e11593.diff Patch: https://github.com/kamailio/kamailio/commit/8e2c2e391eb90f53b0fdc3e108bb84dab4e11593.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index d859dc3907..f481cb4d61 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -878,7 +878,7 @@ int ds_load_list(char *lfile) /* Update list - should it be sync'ed? */ _ds_list_nr = setn; *crt_idx = *next_idx; - ds_ht_clear_slots(_dsht_load); + ds_log_sets(); return 0; @@ -1126,7 +1126,6 @@ int ds_load_db(void) /* update data - should it be sync'ed? */ _ds_list_nr = setn; *crt_idx = *next_idx; - ds_ht_clear_slots(_dsht_load); ds_log_sets(); @@ -1617,22 +1616,24 @@ int ds_load_replace(struct sip_msg *msg, str *duid) break; } } + /* old destination has not been found: has been removed meanwhile? */ if(olddst == -1) { - ds_unlock_cell(_dsht_load, &msg->callid->body); - LM_ERR("old destination address not found for [%d, %.*s]\n", set, + LM_WARN("old destination address not found for [%d, %.*s]\n", set, it->duid.len, it->duid.s); - return -1; - } + } if(newdst == -1) { + /* new destination has not been found: has been removed meanwhile? */ ds_unlock_cell(_dsht_load, &msg->callid->body); LM_ERR("new destination address not found for [%d, %.*s]\n", set, duid->len, duid->s); - return -1; + return -2; } ds_unlock_cell(_dsht_load, &msg->callid->body); ds_del_cell(_dsht_load, &msg->callid->body); - DS_LOAD_DEC(idx, olddst); + + if(olddst != -1) + DS_LOAD_DEC(idx, olddst); if(ds_load_add(msg, idx, set, newdst) < 0) { LM_ERR("unable to replace destination load [%.*s / %.*s]\n", duid->len, @@ -2336,6 +2337,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate) int ds_update_dst(struct sip_msg *msg, int upos, int mode) { + int ret; socket_info_t *sock = NULL; sr_xavp_t *rxavp = NULL; sr_xavp_t *lxavp = NULL; @@ -2348,6 +2350,7 @@ int ds_update_dst(struct sip_msg *msg, int upos, int mode) } } +next_dst: rxavp = xavp_get(&ds_xavp_dst, NULL); if(rxavp == NULL || rxavp->val.type != SR_XTYPE_XAVP) { LM_DBG("no xavp with previous destination record\n"); @@ -2395,12 +2398,18 @@ int ds_update_dst(struct sip_msg *msg, int upos, int mode) return 1; } if(upos == DS_USE_NEXT) { - if(ds_load_replace(msg, &lxavp->val.v.s) < 0) { - LM_ERR("cannot update load distribution\n"); - return -1; + ret = ds_load_replace(msg, &lxavp->val.v.s); + switch(ret) { + case 0: + break; + case -2: + LM_ERR("cannot update load with %.*s, skipping dst.\n", lxavp->val.v.s.len, lxavp->val.v.s.s); + goto next_dst; + default: + LM_ERR("cannot update load distribution\n"); + return -1; } } - return 1; } @@ -2448,7 +2457,7 @@ int ds_add_dst(int group, str *address, int flags, str *attrs) _ds_list_nr = setn; *crt_idx = *next_idx; - ds_ht_clear_slots(_dsht_load); + ds_log_sets(); return 0; @@ -2503,7 +2512,7 @@ int ds_remove_dst(int group, str *address) _ds_list_nr = setn; *crt_idx = *next_idx; - ds_ht_clear_slots(_dsht_load); + ds_log_sets(); return 0; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:f748835d: Merge pull request #2352 from kamailio/feature/keepalive-new-state-log-feedback
Module: kamailio Branch: master Commit: f748835d507c9f2a7f231efa10ce65f42d77831d URL: https://github.com/kamailio/kamailio/commit/f748835d507c9f2a7f231efa10ce65f42d77831d Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-11T21:15:59+02:00 Merge pull request #2352 from kamailio/feature/keepalive-new-state-log-feedback keepalive: logging state of dest just if changed --- Modified: src/modules/keepalive/keepalive_core.c --- Diff: https://github.com/kamailio/kamailio/commit/f748835d507c9f2a7f231efa10ce65f42d77831d.diff Patch: https://github.com/kamailio/kamailio/commit/f748835d507c9f2a7f231efa10ce65f42d77831d.patch --- diff --git a/src/modules/keepalive/keepalive_core.c b/src/modules/keepalive/keepalive_core.c index 4daa57908d..36cf81aef1 100644 --- a/src/modules/keepalive/keepalive_core.c +++ b/src/modules/keepalive/keepalive_core.c @@ -119,7 +119,6 @@ static void ka_options_callback( ka_dest->counter++; } - LM_DBG("new state is: %d\n", state); if(state != ka_dest->state) { ka_run_route(msg, &uri, state_routes[state]); @@ -127,6 +126,7 @@ static void ka_options_callback( ka_dest->statechanged_clb(&ka_dest->uri, state, ka_dest->user_attr); } + LM_DBG("new state is: %d\n", state); ka_dest->state = state; } if(ka_dest->response_clb != NULL) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:0dac4a75: Merge pull request #2353 from kamailio/grumvalski/ds_keep_load
Module: kamailio Branch: master Commit: 0dac4a759b841450a757f0ecdbf6d431d62bff87 URL: https://github.com/kamailio/kamailio/commit/0dac4a759b841450a757f0ecdbf6d431d62bff87 Author: Federico Cabiddu Committer: GitHub Date: 2020-06-12T07:50:46+02:00 Merge pull request #2353 from kamailio/grumvalski/ds_keep_load dispatcher: keep current destinations' load when adding/removing --- Modified: src/modules/dispatcher/dispatch.c --- Diff: https://github.com/kamailio/kamailio/commit/0dac4a759b841450a757f0ecdbf6d431d62bff87.diff Patch: https://github.com/kamailio/kamailio/commit/0dac4a759b841450a757f0ecdbf6d431d62bff87.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index f481cb4d61..66b35742e5 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -353,7 +353,7 @@ int ds_set_attrs(ds_dest_t *dest, str *vattrs) /** * */ -ds_dest_t *pack_dest(str iuri, int flags, int priority, str *attrs) +ds_dest_t *pack_dest(str iuri, int flags, int priority, str *attrs, int dload) { ds_dest_t *dp = NULL; /* For DNS-Lookups */ @@ -419,6 +419,7 @@ ds_dest_t *pack_dest(str iuri, int flags, int priority, str *attrs) dp->flags = flags; dp->priority = priority; + dp->dload = dload; if(ds_set_attrs(dp, attrs) < 0) { LM_ERR("cannot set attributes!\n"); @@ -498,14 +499,14 @@ ds_dest_t *pack_dest(str iuri, int flags, int priority, str *attrs) * */ int add_dest2list(int id, str uri, int flags, int priority, str *attrs, - int list_idx, int *setn) + int list_idx, int *setn, int dload) { ds_dest_t *dp = NULL; ds_set_t *sp = NULL; ds_dest_t *dp0 = NULL; ds_dest_t *dp1 = NULL; - dp = pack_dest(uri, flags, priority, attrs); + dp = pack_dest(uri, flags, priority, attrs, dload); if(!dp) goto err; @@ -854,7 +855,7 @@ int ds_load_list(char *lfile) attrs.len = p - attrs.s; add_destination: - if(add_dest2list(id, uri, flags, priority, &attrs, *next_idx, &setn) + if(add_dest2list(id, uri, flags, priority, &attrs, *next_idx, &setn, 0) != 0) { LM_WARN("unable to add destination %.*s to set %d -- skipping\n", uri.len, uri.s, id); @@ -1104,7 +1105,7 @@ int ds_load_db(void) } } LM_DBG("attributes string: [%.*s]\n", attrs.len, (attrs.s)?attrs.s:""); - if(add_dest2list(id, uri, flags, priority, &attrs, *next_idx, &setn) + if(add_dest2list(id, uri, flags, priority, &attrs, *next_idx, &setn, 0) != 0) { dest_errs++; LM_WARN("unable to add destination %.*s to set %d -- skipping\n", @@ -2420,7 +2421,7 @@ void ds_add_dest_cb(ds_set_t *node, int i, void *arg) if(add_dest2list(node->id, node->dlist[i].uri, node->dlist[i].flags, node->dlist[i].priority, &node->dlist[i].attrs.body, *next_idx, - &setn) != 0) { + &setn, node->dlist[i].dload) != 0) { LM_WARN("failed to add destination in group %d - %.*s\n", node->id, node->dlist[i].uri.len, node->dlist[i].uri.s); } @@ -2443,7 +2444,7 @@ int ds_add_dst(int group, str *address, int flags, str *attrs) // add new destination if(add_dest2list(group, *address, flags, priority, attrs, - *next_idx, &setn) != 0) { + *next_idx, &setn, 0) != 0) { LM_WARN("unable to add destination %.*s to set %d", address->len, address->s, group); if(ds_load_mode==1) { goto error; @@ -2478,7 +2479,7 @@ void ds_filter_dest_cb(ds_set_t *node, int i, void *arg) if(add_dest2list(node->id, node->dlist[i].uri, node->dlist[i].flags, node->dlist[i].priority, &node->dlist[i].attrs.body, *next_idx, - filter_arg->setn) != 0) { + filter_arg->setn, node->dlist[i].dload) != 0) { LM_WARN("failed to add destination in group %d - %.*s\n", node->id, node->dlist[i].uri.len, node->dlist[i].uri.s); } @@ -2494,7 +2495,7 @@ int ds_remove_dst(int group, str *address) setn = 0; - dp = pack_dest(*address, 0, 0, NULL); + dp = pack_dest(*address, 0, 0, NULL, 0); filter_arg.setid = group; filter_arg.dest = dp; filter_arg.setn = &setn; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:86f4943b: Merge pull request #2358 from kamailio/dmq_usrloc-usrloc_delete
Module: kamailio Branch: master Commit: 86f4943b61eb4672d6b18caead75724d8ad78504 URL: https://github.com/kamailio/kamailio/commit/86f4943b61eb4672d6b18caead75724d8ad78504 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-16T10:32:58+02:00 Merge pull request #2358 from kamailio/dmq_usrloc-usrloc_delete dmq_usrloc: add new parameter `usrloc_delete` to disable synchronizing delete actions --- Modified: src/modules/dmq_usrloc/dmq_usrloc.c Modified: src/modules/dmq_usrloc/doc/dmq_usrloc.xml Modified: src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml Modified: src/modules/dmq_usrloc/usrloc_sync.c --- Diff: https://github.com/kamailio/kamailio/commit/86f4943b61eb4672d6b18caead75724d8ad78504.diff Patch: https://github.com/kamailio/kamailio/commit/86f4943b61eb4672d6b18caead75724d8ad78504.patch --- diff --git a/src/modules/dmq_usrloc/dmq_usrloc.c b/src/modules/dmq_usrloc/dmq_usrloc.c index 62d8ba75d3..b7fbed9406 100644 --- a/src/modules/dmq_usrloc/dmq_usrloc.c +++ b/src/modules/dmq_usrloc/dmq_usrloc.c @@ -42,6 +42,7 @@ int _dmq_usrloc_batch_msg_contacts = 1; int _dmq_usrloc_batch_msg_size = 6; int _dmq_usrloc_batch_usleep = 0; str _dmq_usrloc_domain = str_init("location"); +int _dmq_usrloc_delete = 1; usrloc_api_t dmq_ul; @@ -56,6 +57,7 @@ static param_export_t params[] = { {"batch_size", INT_PARAM, &_dmq_usrloc_batch_size}, {"batch_usleep", INT_PARAM, &_dmq_usrloc_batch_usleep}, {"usrloc_domain", PARAM_STR, &_dmq_usrloc_domain}, + {"usrloc_delete", INT_PARAM, &_dmq_usrloc_delete}, {0, 0, 0} }; diff --git a/src/modules/dmq_usrloc/doc/dmq_usrloc.xml b/src/modules/dmq_usrloc/doc/dmq_usrloc.xml index 8391296cf8..61e594b40b 100644 --- a/src/modules/dmq_usrloc/doc/dmq_usrloc.xml +++ b/src/modules/dmq_usrloc/doc/dmq_usrloc.xml @@ -55,6 +55,22 @@ 2017 + + + Emmanuel + Schmidbauer + TextNow Inc. + emmanuel.schmidba...@textnow.com + + + + + + + + + 2020 + diff --git a/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml b/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml index 52620f2b13..2bd0756c85 100644 --- a/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml +++ b/src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml @@ -282,7 +282,25 @@ modparam("dmq_usrloc", "replicate_socket_info", 0) + + usrloc_delete (int) + + Enable (1) or disable (0) synchronizing usrloc delete actions. Disabling delete actions can be useful when user location data is ephemeral. + + + + Default value is 1. + + + + Set usrloc_domain parameter + +... +modparam("dmq_usrloc", "usrloc_delete", 0) +... + + + - diff --git a/src/modules/dmq_usrloc/usrloc_sync.c b/src/modules/dmq_usrloc/usrloc_sync.c index 2c5b93292d..d52ddd4932 100644 --- a/src/modules/dmq_usrloc/usrloc_sync.c +++ b/src/modules/dmq_usrloc/usrloc_sync.c @@ -58,6 +58,7 @@ extern int _dmq_usrloc_batch_msg_size; extern int _dmq_usrloc_batch_size; extern int _dmq_usrloc_batch_usleep; extern str _dmq_usrloc_domain; +extern int _dmq_usrloc_delete; static int add_contact(str aor, ucontact_info_t* ci) { @@ -815,7 +816,9 @@ void dmq_ul_cb_contact(ucontact_t* ptr, int type, void* param) usrloc_dmq_send_contact(ptr, aor, DMQ_UPDATE, 0); break; case UL_CONTACT_DELETE: - usrloc_dmq_send_contact(ptr, aor, DMQ_RM, 0); + if (_dmq_usrloc_delete >= 1) { + usrloc_dmq_send_contact(ptr, aor, DMQ_RM, 0); + } break; case UL_CONTACT_EXPIRE: //usrloc_dmq_send_contact(ptr, aor, DMQ_UPDATE); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:95992d29: Merge pull request #2365 from khoegh/423-expires-range
Module: kamailio Branch: master Commit: 95992d29c4ab2b8863f1301f0259f295468c5301 URL: https://github.com/kamailio/kamailio/commit/95992d29c4ab2b8863f1301f0259f295468c5301 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-19T13:12:32+02:00 Merge pull request #2365 from khoegh/423-expires-range registrar: expires_range should not make expires < min_expires --- Modified: src/modules/registrar/sip_msg.c --- Diff: https://github.com/kamailio/kamailio/commit/95992d29c4ab2b8863f1301f0259f295468c5301.diff Patch: https://github.com/kamailio/kamailio/commit/95992d29c4ab2b8863f1301f0259f295468c5301.patch --- diff --git a/src/modules/registrar/sip_msg.c b/src/modules/registrar/sip_msg.c index d2dfba0aee..802435865f 100644 --- a/src/modules/registrar/sip_msg.c +++ b/src/modules/registrar/sip_msg.c @@ -277,10 +277,6 @@ void calc_contact_expires(struct sip_msg* _m, param_t* _ep, int* _e, int novaria if ( *_e != 0 ) { - if (!novariation) { - *_e = randomize_expires( *_e, range ); - } - if (*_e < cfg_get(registrar, registrar_cfg, min_expires)) { if(reg_min_expires_mode) { rerrno = R_LOW_EXP; @@ -290,6 +286,13 @@ void calc_contact_expires(struct sip_msg* _m, param_t* _ep, int* _e, int novaria } } + if (!novariation) { + *_e = randomize_expires( *_e, range ); + if (*_e < cfg_get(registrar, registrar_cfg, min_expires)) { + *_e = cfg_get(registrar, registrar_cfg, min_expires); + } + } + if (cfg_get(registrar, registrar_cfg, max_expires) && (*_e > cfg_get(registrar, registrar_cfg, max_expires))) { *_e = cfg_get(registrar, registrar_cfg, max_expires); } ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:92ef21d7: Merge pull request #2367 from kamailio/dialog-improve-warning-msg
Module: kamailio Branch: master Commit: 92ef21d77d9ded1f1fda7dd83934e073e557dfb8 URL: https://github.com/kamailio/kamailio/commit/92ef21d77d9ded1f1fda7dd83934e073e557dfb8 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-24T08:26:29+02:00 Merge pull request #2367 from kamailio/dialog-improve-warning-msg dialog: improve warning message to help better identify dialog lookup failures --- Modified: src/modules/dialog/dlg_handlers.c --- Diff: https://github.com/kamailio/kamailio/commit/92ef21d77d9ded1f1fda7dd83934e073e557dfb8.diff Patch: https://github.com/kamailio/kamailio/commit/92ef21d77d9ded1f1fda7dd83934e073e557dfb8.patch --- diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c index 43e01eece7..4c19e98417 100644 --- a/src/modules/dialog/dlg_handlers.c +++ b/src/modules/dialog/dlg_handlers.c @@ -1320,10 +1320,12 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param) dlg = dlg_lookup(h_entry, h_id); if (dlg==0) { LM_WARN("unable to find dialog for %.*s " - "with route param '%.*s' [%u:%u]\n", + "with route param '%.*s' [%u:%u] " + "and call-id '%.*s'\n", req->first_line.u.request.method.len, req->first_line.u.request.method.s, - val.len,val.s, h_entry, h_id); + val.len,val.s, h_entry, h_id, + req->callid->body.len, req->callid->body.s); if (seq_match_mode==SEQ_MATCH_STRICT_ID ) return; } else { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:12b3cfe6: Merge pull request #2373 from kamailio/mohqueue-issue-2370
Module: kamailio Branch: master Commit: 12b3cfe6fb6c48de28a9aee0420328c6ae863663 URL: https://github.com/kamailio/kamailio/commit/12b3cfe6fb6c48de28a9aee0420328c6ae863663 Author: Emmanuel Schmidbauer Committer: GitHub Date: 2020-06-24T14:59:45-04:00 Merge pull request #2373 from kamailio/mohqueue-issue-2370 mohqueue: use t_newtran() if transaction does not exist --- Modified: src/modules/mohqueue/mohq_funcs.c --- Diff: https://github.com/kamailio/kamailio/commit/12b3cfe6fb6c48de28a9aee0420328c6ae863663.diff Patch: https://github.com/kamailio/kamailio/commit/12b3cfe6fb6c48de28a9aee0420328c6ae863663.patch --- diff --git a/src/modules/mohqueue/mohq_funcs.c b/src/modules/mohqueue/mohq_funcs.c index 384be185d3..54ee87486c 100644 --- a/src/modules/mohqueue/mohq_funcs.c +++ b/src/modules/mohqueue/mohq_funcs.c @@ -185,6 +185,7 @@ void ack_msg (sip_msg_t *pmsg, call_lst *pcall) char *pfncname = "ack_msg: "; struct cell *ptrans; tm_api_t *ptm = pmod_data->ptm; +tm_cell_t *t = 0; if (pcall->call_state != CLSTA_INVITED) { /** @@ -215,7 +216,22 @@ if (ptm->t_lookup_ident (&ptrans, pcall->call_hash, pcall->call_label) < 0) } else { - if (ptm->t_release (pcall->call_pmsg) < 0) + t = ptm->t_gett(); + if (t==NULL || t==T_UNDEFINED) +{ + if (ptm->t_newtran(pmsg)<0) +{ + LM_ERR("cannot create the transaction\n"); + return; +} + t = ptm->t_gett(); + if (t==NULL || t==T_UNDEFINED) +{ + LM_ERR("cannot lookup the transaction\n"); + return; +} +} + if (ptm->t_release_transaction(t) < 0) { LM_ERR ("%sRelease transaction failed for call (%s)!\n", pfncname, pcall->call_from); @@ -2945,4 +2961,4 @@ if (pmod_data->ptm->t_relay (pmsg, 0, 0) < 0) return -1; } return 1; -} \ No newline at end of file +} ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6e3a8aea: Merge pull request #2372 from danielmartinezruiz/keepalive_config_ka_ping_from_value_cut_off
Module: kamailio Branch: master Commit: 6e3a8aea7f9f6dde462c86dfd8cd3027c2751e98 URL: https://github.com/kamailio/kamailio/commit/6e3a8aea7f9f6dde462c86dfd8cd3027c2751e98 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-24T21:00:11+02:00 Merge pull request #2372 from danielmartinezruiz/keepalive_config_ka_ping_from_value_cut_off keepalive: manage the `ping_from` config value as str. --- Modified: src/modules/keepalive/keepalive_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/6e3a8aea7f9f6dde462c86dfd8cd3027c2751e98.diff Patch: https://github.com/kamailio/kamailio/commit/6e3a8aea7f9f6dde462c86dfd8cd3027c2751e98.patch --- diff --git a/src/modules/keepalive/keepalive_mod.c b/src/modules/keepalive/keepalive_mod.c index e1da2e9db2..bcf021d461 100644 --- a/src/modules/keepalive/keepalive_mod.c +++ b/src/modules/keepalive/keepalive_mod.c @@ -83,8 +83,8 @@ static param_export_t params[] = { {"ping_interval", PARAM_INT, &ka_ping_interval}, {"destination", PARAM_STRING | USE_FUNC_PARAM, (void *)ka_mod_add_destination}, - {"ping_from", PARAM_STRING, &ka_ping_from}, - {"delete_counter", PARAM_INT, &ka_counter_del}, + {"ping_from", PARAM_STR, &ka_ping_from}, + {"delete_counter", PARAM_INT, &ka_counter_del}, {0, 0, 0} }; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:9adccda3: pua: docs - fixed missing comma in example
Module: kamailio Branch: master Commit: 9adccda325d258fe539b54ec67d4389d3a2fc72c URL: https://github.com/kamailio/kamailio/commit/9adccda325d258fe539b54ec67d4389d3a2fc72c Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-24T21:05:56+02:00 pua: docs - fixed missing comma in example - picked from #2371 --- Modified: src/modules/pua/doc/pua_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/9adccda325d258fe539b54ec67d4389d3a2fc72c.diff Patch: https://github.com/kamailio/kamailio/commit/9adccda325d258fe539b54ec67d4389d3a2fc72c.patch --- diff --git a/src/modules/pua/doc/pua_admin.xml b/src/modules/pua/doc/pua_admin.xml index 51d0fa3794..c4d6ab7c29 100644 --- a/src/modules/pua/doc/pua_admin.xml +++ b/src/modules/pua/doc/pua_admin.xml @@ -112,7 +112,7 @@ modparam("pua", "hash_size", 11) Set db_url parameter ... -modparam("pua", "db_url" "&exampledb;") +modparam("pua", "db_url", "&exampledb;") ... ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:ae828e8c: Merge pull request #2375 from sergey-safarov/dipatcher-frmating
Module: kamailio Branch: master Commit: ae828e8c671206f15afd913492833f994ca73435 URL: https://github.com/kamailio/kamailio/commit/ae828e8c671206f15afd913492833f994ca73435 Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-06-29T07:48:13+02:00 Merge pull request #2375 from sergey-safarov/dipatcher-frmating dipatcher: dockbook and config formatting --- Modified: src/modules/dispatcher/doc/dispatcher.cfg Modified: src/modules/dispatcher/doc/dispatcher.xml Modified: src/modules/dispatcher/doc/dispatcher_admin.xml Modified: src/modules/dispatcher/doc/dispatcher_faq.xml --- Diff: https://github.com/kamailio/kamailio/commit/ae828e8c671206f15afd913492833f994ca73435.diff Patch: https://github.com/kamailio/kamailio/commit/ae828e8c671206f15afd913492833f994ca73435.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:dd52d1ce: Merge pull request #2359 from kamailio/jchavanton/mqueue_db_persistent
Module: kamailio Branch: master Commit: dd52d1ce91a1e6a4907161cc7d8294b4ba5d13aa URL: https://github.com/kamailio/kamailio/commit/dd52d1ce91a1e6a4907161cc7d8294b4ba5d13aa Author: Julien Chavanton Committer: GitHub Date: 2020-07-02T10:03:56-07:00 Merge pull request #2359 from kamailio/jchavanton/mqueue_db_persistent mqueue: add support for db persistency --- Added: src/modules/mqueue/mqueue_db.c Added: src/modules/mqueue/mqueue_db.h Modified: src/modules/mqueue/Makefile Modified: src/modules/mqueue/doc/mqueue.xml Modified: src/modules/mqueue/doc/mqueue_admin.xml Modified: src/modules/mqueue/mqueue_api.c Modified: src/modules/mqueue/mqueue_api.h Modified: src/modules/mqueue/mqueue_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/dd52d1ce91a1e6a4907161cc7d8294b4ba5d13aa.diff Patch: https://github.com/kamailio/kamailio/commit/dd52d1ce91a1e6a4907161cc7d8294b4ba5d13aa.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:fbb4312f: Merge pull request #2386 from kvrban/master
Module: kamailio Branch: master Commit: fbb4312f1b2ebf6793408241d56bfc2dca6543ec URL: https://github.com/kamailio/kamailio/commit/fbb4312f1b2ebf6793408241d56bfc2dca6543ec Author: Daniel-Constantin Mierla Committer: GitHub Date: 2020-07-03T09:40:12+02:00 Merge pull request #2386 from kvrban/master tcpops: target variable passed on tcp_get_conid function was empty --- Modified: src/modules/tcpops/tcpops_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/fbb4312f1b2ebf6793408241d56bfc2dca6543ec.diff Patch: https://github.com/kamailio/kamailio/commit/fbb4312f1b2ebf6793408241d56bfc2dca6543ec.patch --- diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c index ee2404a9ac..82d9889355 100644 --- a/src/modules/tcpops/tcpops_mod.c +++ b/src/modules/tcpops/tcpops_mod.c @@ -592,7 +592,7 @@ static int ki_tcp_get_conid_helper(sip_msg_t* msg, str *saddr, pv_spec_t *pvs) setvalue: memset(&val, 0, sizeof(pv_value_t)); val.ri = conid; - val.flags = PV_VAL_INT; + val.flags = PV_VAL_INT|PV_TYPE_INT; if(pvs->setf(msg, &pvs->pvp, (int)EQ_T, &val)<0) { LM_ERR("failed to set the output var\n"); return -1; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev