[sr-dev] git:master:97ba5dff: db_redis: change logs on delete
Module: kamailio Branch: master Commit: 97ba5dff468fc309acc9245108a0d7645fe45361 URL: https://github.com/kamailio/kamailio/commit/97ba5dff468fc309acc9245108a0d7645fe45361 Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2024-07-03T18:27:03+03:00 db_redis: change logs on delete --- Modified: src/modules/db_redis/redis_dbase.c --- Diff: https://github.com/kamailio/kamailio/commit/97ba5dff468fc309acc9245108a0d7645fe45361.diff Patch: https://github.com/kamailio/kamailio/commit/97ba5dff468fc309acc9245108a0d7645fe45361.patch --- diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c index 84c0c3a9459..b3624975cf4 100644 --- a/src/modules/db_redis/redis_dbase.c +++ b/src/modules/db_redis/redis_dbase.c @@ -1827,13 +1827,13 @@ static int db_redis_perform_delete(const db1_con_t *_h, km_redis_con_t *con, "performing delete\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s); else - LM_WARN("performing table scan on table '%.*s' while performing " - "delete using match key " - "'%.*s' at offset %llx\n", + LM_DBG("performing table scan on table '%.*s' while performing " + "delete using match key " + "'%.*s' at offset %llx\n", CON_TABLE(_h)->len, CON_TABLE(_h)->s, ts_scan_key->len, ts_scan_key->s, (unsigned long long)ts_scan_start); for(i = 0; i < _n; ++i) { - LM_WARN(" scan key %d is '%.*s'\n", i, _k[i]->len, _k[i]->s); + LM_DBG(" scan key %d is '%.*s'\n", i, _k[i]->len, _k[i]->s); } if(db_redis_scan_query_keys(con, CON_TABLE(_h), _n, keys, keys_count, manual_keys, manual_keys_count, ts_scan_start, ts_scan_key, ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
Merged #3892 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3892#event-13382597550 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
Thanks for reviews. Merging this. Actually if one designs the 'keys' right for a db_redis table, should get *no* full table scans (I think, at least from my tests so far). So then will get no warnings after this merge. Full table scans are actually dangerous because consume alot of kamailio PKG memory. So if one's db_redis table is big, and full scans are performed => kamailio processes won;t be able to load it in the first palce. So the WARNING for performing full table scan is still there, because of this. Tip: For location table in db_redis i got no full table scans anymore (e.g. when contact expires or when user contacts is queried) when using this key definition: ``` modparam("db_redis", "keys", "location=entry:ruid:username,domain:expires") ``` ... because index info is added in redis for 'user@domain' or for user's contact 'expires' so only those ones need to be scanned and iterated => no full scans needed -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3892#issuecomment-2206549864 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
I never get clang formatting right, unless using the clang-format tool :D -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3892#issuecomment-2188700713 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
@smititelu pushed 1 commit. fa202d1112c9df29358c261e670b6bbfff9fc856 db_redis: change logs on delete -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3892/files/34b15758bd4ec9b1f09174e981af0675b9068c7d..fa202d1112c9df29358c261e670b6bbfff9fc856 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
@smititelu pushed 1 commit. 34b15758bd4ec9b1f09174e981af0675b9068c7d db_redis: change logs on delete -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3892/files/85c244e6a55a8391c744624b5d3678d550481d1a..34b15758bd4ec9b1f09174e981af0675b9068c7d You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
@smititelu pushed 1 commit. 85c244e6a55a8391c744624b5d3678d550481d1a db_redis: change logs on delete -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3892/files/06aac1608f6bf87c2eb760c1402566760a6380a7..85c244e6a55a8391c744624b5d3678d550481d1a You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] db_redis: change logs on delete (PR #3892)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [X] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- Issue: when using usrloc with db_redis, I get constant WARNING logs for delete via usrloc timer. The real WARNING, in my opinion, is when doing full table scans(which is already logged as so). Make logs less important when performing table scans using a match key. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3892 -- Commit Summary -- * db_redis: change logs on delete -- File Changes -- M src/modules/db_redis/redis_dbase.c (4) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3892.patch https://github.com/kamailio/kamailio/pull/3892.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3892 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:8b6b3881: p_usrloc: Add update/delete based on uniq
Module: kamailio Branch: master Commit: 8b6b3881594b4f2ac1b50b9c83cd0e1dac3ec321 URL: https://github.com/kamailio/kamailio/commit/8b6b3881594b4f2ac1b50b9c83cd0e1dac3ec321 Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2024-06-06T12:34:14+03:00 p_usrloc: Add update/delete based on uniq --- Modified: src/modules/p_usrloc/doc/p_usrloc_admin.xml Modified: src/modules/p_usrloc/ucontact.c --- Diff: https://github.com/kamailio/kamailio/commit/8b6b3881594b4f2ac1b50b9c83cd0e1dac3ec321.diff Patch: https://github.com/kamailio/kamailio/commit/8b6b3881594b4f2ac1b50b9c83cd0e1dac3ec321.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] p_usrloc: Add update/delete based on uniq (PR #3865)
Merged #3865 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3865#event-13063826828 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] p_usrloc: Add update/delete based on uniq (PR #3865)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- Add a new update/delete function based on contacts uniq uniq. Some devices may use same uniq for multiple contacts, so I needed to restrain it further based on ruid value. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3865 -- Commit Summary -- * p_usrloc: Add update/delete based on uniq -- File Changes -- M src/modules/p_usrloc/doc/p_usrloc_admin.xml (5) M src/modules/p_usrloc/ucontact.c (307) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3865.patch https://github.com/kamailio/kamailio/pull/3865.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3865 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pdb: make 'timeout' runtime configurable (PR #3850)
Hi, thanks for the feedback. I've updated the PR accordingly. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3850#issuecomment-2114247068 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] pdb: make 'timeout' runtime configurable (PR #3850)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- Make timeout modparam runtime configurable. Also update timout execeded logs from NOTICE to ERR and add more info to them. Also update utils/pdbt.c query tool to allow 0 carrier id. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3850 -- Commit Summary -- * pdb: make timeout runtime configurable -- File Changes -- A src/modules/pdb/config.c (42) A src/modules/pdb/config.h (37) M src/modules/pdb/pdb.c (40) M utils/pdbt/pdbt.c (2) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3850.patch https://github.com/kamailio/kamailio/pull/3850.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3850 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pdb: Return negative carrierid for failures (PR #3775)
Merged #3775 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3775#event-12148054471 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:8cf5892c: pdb server: Return negative carrierid for failures. Clang format
Module: kamailio Branch: master Commit: 8cf5892cb34248cea2deea606a0f7d46d574404b URL: https://github.com/kamailio/kamailio/commit/8cf5892cb34248cea2deea606a0f7d46d574404b Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2024-03-18T10:55:24+02:00 pdb server: Return negative carrierid for failures. Clang format --- Modified: utils/pdbt/pdb_server.c Modified: utils/pdbt/pdb_server_backend.c --- Diff: https://github.com/kamailio/kamailio/commit/8cf5892cb34248cea2deea606a0f7d46d574404b.diff Patch: https://github.com/kamailio/kamailio/commit/8cf5892cb34248cea2deea606a0f7d46d574404b.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pdb: Return negative carrierid for failures (PR #3775)
Thanks! -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3775#issuecomment-2003233414 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:0fd1516b: pdb: Return negative carrierid for failures
Module: kamailio Branch: master Commit: 0fd1516b9519f84a0f24b3c9a2c643e74f1dc527 URL: https://github.com/kamailio/kamailio/commit/0fd1516b9519f84a0f24b3c9a2c643e74f1dc527 Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2024-03-18T10:55:24+02:00 pdb: Return negative carrierid for failures --- Modified: src/modules/pdb/pdb.c --- Diff: https://github.com/kamailio/kamailio/commit/0fd1516b9519f84a0f24b3c9a2c643e74f1dc527.diff Patch: https://github.com/kamailio/kamailio/commit/0fd1516b9519f84a0f24b3c9a2c643e74f1dc527.patch --- diff --git a/src/modules/pdb/pdb.c b/src/modules/pdb/pdb.c index 6889e63b915..1398f7574f8 100644 --- a/src/modules/pdb/pdb.c +++ b/src/modules/pdb/pdb.c @@ -393,20 +393,20 @@ static int pdb_query(struct sip_msg *_msg, struct multiparam_t *_number, goto found; } break; - case PDB_CODE_NOT_NUMBER: - LM_NOTICE("Number %s has letters in it\n", - number.s); - carrierid = 0; - goto found; case PDB_CODE_NOT_FOUND: LM_NOTICE("Number %s pdb_id not found\n", number.s); - carrierid = 0; + carrierid = -1; + goto found; + case PDB_CODE_NOT_NUMBER: + LM_NOTICE("Number %s has letters in it\n", + number.s); + carrierid = -2; goto found; default: LM_NOTICE("Invalid code %d received\n", msg.hdr.code); - carrierid = 0; + carrierid = -3; goto found; } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pdb: Return negative carrierid for failures (PR #3775)
@smititelu pushed 1 commit. 88b698e0f62c39ed60af9f0a4fb3ca2dc6867d8f pdb server: Return negative carrierid for failures. Clang format -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3775/files/bf78b619ae28924361fb2c757a4d09eb1a39f5cd..88b698e0f62c39ed60af9f0a4fb3ca2dc6867d8f You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pdb: Return negative carrierid for failures (PR #3775)
@smititelu pushed 1 commit. bf78b619ae28924361fb2c757a4d09eb1a39f5cd pdb: Return negative carrierid for failures -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3775/files/ed87fe7ab480a40d7b433b43aeae383a5f85da13..bf78b619ae28924361fb2c757a4d09eb1a39f5cd You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pdb: Return negative carrierid for failures (PR #3775)
@smititelu pushed 1 commit. ed87fe7ab480a40d7b433b43aeae383a5f85da13 pdb: Return negative carrierid for failures -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3775/files/d1be1776c46f3e88bf5a28e7e60c2eb5607ab66d..ed87fe7ab480a40d7b433b43aeae383a5f85da13 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] pdb: Return negative carrierid for failures (PR #3775)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [X] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- Carrier id 0 might be a valid carrier number(e.g. for Germany D000-D999 are valid). Return negative carrier id in case of failures. If all ok, Id like to backport this to 5.8, 5.7 and 5.6 You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3775 -- Commit Summary -- * pdb: Return negative carrierid for failures -- File Changes -- M src/modules/pdb/pdb.c (14) M utils/pdbt/pdb_server.c (2) M utils/pdbt/pdb_server_backend.c (4) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3775.patch https://github.com/kamailio/kamailio/pull/3775.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3775 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:e506b60c: xlog: add kemi xlog_facility function
Module: kamailio Branch: master Commit: e506b60c1045cfbd4485434165305fbc2fb57aa9 URL: https://github.com/kamailio/kamailio/commit/e506b60c1045cfbd4485434165305fbc2fb57aa9 Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2024-01-19T15:34:37+02:00 xlog: add kemi xlog_facility function --- Modified: src/modules/xlog/xlog.c --- Diff: https://github.com/kamailio/kamailio/commit/e506b60c1045cfbd4485434165305fbc2fb57aa9.diff Patch: https://github.com/kamailio/kamailio/commit/e506b60c1045cfbd4485434165305fbc2fb57aa9.patch --- diff --git a/src/modules/xlog/xlog.c b/src/modules/xlog/xlog.c index 03063bbfb1f..c7d239ea299 100644 --- a/src/modules/xlog/xlog.c +++ b/src/modules/xlog/xlog.c @@ -878,8 +878,9 @@ static int xlog_log_colors_param(modparam_t type, void *val) /** * write message after evaluation of lmsg for pseudo-variables */ -int ki_xlog_ex(sip_msg_t *msg, int llevel, str *lmsg) +int ki_xlog_ex(sip_msg_t *msg, str *lfacility, int llevel, str *lmsg) { + int lf = xlog_facility; pv_elem_t *xmodel = NULL; str txt = {0, 0}; @@ -896,13 +897,23 @@ int ki_xlog_ex(sip_msg_t *msg, int llevel, str *lmsg) pv_elem_free_all(xmodel); return -1; } - LOG_FN(xlog_facility, llevel, _xlog_prefix, "%.*s", txt.len, txt.s); + + if(lfacility != NULL) { + lfacility->s[lfacility->len] = '\0'; + lf = str2facility(lfacility->s); + if(lf == -1) { + LM_WARN("invalid syslog facility %.*s, using default\n", + lfacility->len, lfacility->s); + lf = xlog_facility; + } + } + LOG_FN(lf, llevel, _xlog_prefix, "%.*s", txt.len, txt.s); ; pv_elem_free_all(xmodel); return 1; } -int ki_xlog(sip_msg_t *msg, str *slevel, str *lmsg) +int ki_xlog_get_level(str *slevel) { int llevel; @@ -927,42 +938,55 @@ int ki_xlog(sip_msg_t *msg, str *slevel, str *lmsg) } else { llevel = L_ERR; } - return ki_xlog_ex(msg, llevel, lmsg); + + return llevel; +} + +int ki_xlog_facility(sip_msg_t *msg, str *lfacility, str *slevel, str *lmsg) +{ + int llevel = ki_xlog_get_level(slevel); + return ki_xlog_ex(msg, lfacility, llevel, lmsg); +} + +int ki_xlog(sip_msg_t *msg, str *slevel, str *lmsg) +{ + int llevel = ki_xlog_get_level(slevel); + return ki_xlog_ex(msg, NULL, llevel, lmsg); } int ki_xdbg(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_DBG, lmsg); + return ki_xlog_ex(msg, NULL, L_DBG, lmsg); } int ki_xerr(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_ERR, lmsg); + return ki_xlog_ex(msg, NULL, L_ERR, lmsg); } int ki_xinfo(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_INFO, lmsg); + return ki_xlog_ex(msg, NULL, L_INFO, lmsg); } int ki_xnotice(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_NOTICE, lmsg); + return ki_xlog_ex(msg, NULL, L_NOTICE, lmsg); } int ki_xwarn(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_WARN, lmsg); + return ki_xlog_ex(msg, NULL, L_WARN, lmsg); } int ki_xalert(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_ALERT, lmsg); + return ki_xlog_ex(msg, NULL, L_ALERT, lmsg); } int ki_xcrit(sip_msg_t *msg, str *lmsg) { - return ki_xlog_ex(msg, L_CRIT, lmsg); + return ki_xlog_ex(msg, NULL, L_CRIT, lmsg); } /** @@ -1010,6 +1034,11 @@ static sr_kemi_t sr_kemi_xlog_exports[] = { { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, + { str_init("xlog"), str_init("xlog_facility"), + SR_KEMIP_INT, ki_xlog_facility, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + 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 To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] xlog: add kemi xlog_facility function (PR #3708)
Merged #3708 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3708#event-11537698335 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] xlog: add kemi xlog_facility function (PR #3708)
Thanks! -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3708#issuecomment-1900438189 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] xlog: add kemi xlog_facility function (PR #3708)
@smititelu pushed 1 commit. 51bc40de2bebf4ca224b7eb61153837e5e221f6e xlog: add kemi xlog_facility function -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3708/files/1a8e3a6ab722f44583b7872d6266efd6d075592d..51bc40de2bebf4ca224b7eb61153837e5e221f6e You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] xlog: add kemi xlog_facility function (PR #3708)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [X] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- Add kemi xlog function to be able to log in other facilities other than the default one. Can this be backported to 5.6 and 5.7? You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3708 -- Commit Summary -- * xlog: add kemi xlog_facility function -- File Changes -- M src/modules/xlog/xlog.c (51) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3708.patch https://github.com/kamailio/kamailio/pull/3708.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3708 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] tm: Update doc for t_check_trans() (PR #3673)
Closed #3673. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3673#event-11234107838 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] tm: Update doc for t_check_trans() (PR #3673)
Closing this PR as not an issue. After checking more, noticed t_check_trans() was always returning -1. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3673#issuecomment-1853658419 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] tm: Update doc for t_check_trans() (PR #3673)
Hi, t_check_trans() via native config, return_mode default, kamailio 5.6 -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3673#issuecomment-1851889702 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] tm: Update doc for t_check_trans() (PR #3673)
E.g. function does not automatically exits config when transaction is found, but one might check against return code "0" in config and exit logic there. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3673#issuecomment-1851707674 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] tm: Update doc for t_check_trans() (PR #3673)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [X] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- I was looking in code at how t_check_trans() works and updated doc. Please let me know if I understood correctly how it behaves for non-acks and non-cancel, when transaction is found. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3673 -- Commit Summary -- * tm: Update doc for t_check_trans() -- File Changes -- M src/modules/tm/doc/functions.xml (18) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3673.patch https://github.com/kamailio/kamailio/pull/3673.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3673 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ims_qos: Add suspend_transaction parameter (PR #3581)
Merged #3581 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3581#event-10499665427 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ims_qos: Add suspend_transaction parameter (PR #3581)
Ok, will push a new commit to rename the C var, directly on master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3581#issuecomment-1739202919 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:d0262f82: ims_qos: Add suspend_transaction parameter
Module: kamailio Branch: master Commit: d0262f82fd9cee8670ac01e4f06eb35626b34714 URL: https://github.com/kamailio/kamailio/commit/d0262f82fd9cee8670ac01e4f06eb35626b34714 Author: Stefan-Cristian Mititelu Committer: Stefan Mititelu Date: 2023-09-28T16:35:52+03:00 ims_qos: Add suspend_transaction parameter --- Modified: src/modules/ims_qos/doc/ims_qos_admin.xml Modified: src/modules/ims_qos/ims_qos_mod.c Modified: src/modules/ims_qos/rx_aar.c --- Diff: https://github.com/kamailio/kamailio/commit/d0262f82fd9cee8670ac01e4f06eb35626b34714.diff Patch: https://github.com/kamailio/kamailio/commit/d0262f82fd9cee8670ac01e4f06eb35626b34714.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org