Hello,
it was discussed a couple of times during the past Kamailio development
meetings and several days ago the works started to convert the Kamailio
Wiki content to markdown format and host the files on Kamailio
github.com organisation.
The Dokuwiki engine has served us very well during more than a decade
and a half, but open editing had to be disabled many years ago due to
bad actors pushing inappropriate content. The contributors had to make a
dedicated account on our portal only for Wiki editing. More recently we
had add another layer of protection requiring to grant manually edit
permissions to newly created wiki accounts because bots started to work
around CAPTCHA and other security extensions, posting again
inappropriate content.
All these added to operational overhead, but also made it difficult for
new people to contribute, specially for small editing to fix typos or
add usage examples.
Thanks to Kenneth Stowe, who undertook the first big effort of
converting the Dowkuwiki files to markdown format, we are now in the
position of moving further with the plans of using github for hosting
the content of the wiki and enable easier contributions via pull
requests. The history of changes done via Dokuwiki show up now as git
commits.
The github repository for the wiki content is available at:
* https://github.com/kamailio/kamailio-wiki
It is still work in progress, therefore we ask for the help of community
to speed up the conversion, among the tasks that need to be done:
* convert relative links between wiki pages – the conversion tools
used relative paths without file extensions, like:
[Install Kamailio v4.4.x From GIT](/install/4.4.x/git)
They have to be converted to relative path with .md extension in order
to be able to browse directly :n the github.com portal — practically the
leading / has to be removed and .md added at the end, like:
[Install Kamailio v4.4.x From GIT](install/4.4.x/git.md)
* some section heading markers were not detected/converted, onee may
notice many equal signs (=) around a section name, it has to be replaced
with the appropriate markdown format based on hash signs (#). For example:
======= Install And Maintain Kamailio v4.4.x From GIT =======
Should be converted to:
# Install And Maintain Kamailio v4.4.x From GIT
* some Dokuwiki paragraphs used special formatting based on plugins,
for example the notes, warnings, … had special colors. The common
markdown format does not specify a syntax to color the text, the propose
solution is to use emoji at the start of the paragraph to signal its
special purpose. For example, the Dokuwiki content:
<color blue>//IMPORTANT: Content for older releases than 3.2.0 is
available at the **Old Wiki Site**://</color>
Has to be transformed to:
:fire:*IMPORTANT: Content for older releases than 3.2.0 is available at
the **Old Wiki Site**:*
You are welcome to propose a better syntax for this kind of transformation.
* review config examples and evaluate what improvements can be done
(e.g., in terms of formatting and syntax highlighting)
Any of these changes do not require any C programming knowledge, nor
much Kamailio config knowledge. Can be your first contribution to the
project and it will be very appreciated. It can also help you learn more
about Kamailio, because you may discover documentation that you were not
aware of.
A very important decision is how to present the wiki markdown content on
kamailio.org website. Besides being able to see it on github repository,
we want to process the markdown pages somehow and make them available in
html format on kamailio.org website for easier navigation and better
indexing (e.g., with tables of content for large pages). If you are
aware of a suitable cli or web app that can convert markdown to html and
generate table of content, let us know.
Any questions and suggestions should be addressed to
sr-users(a)lists.kamailio.org mailing list. Looking forward to your
contributions on this community effort!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Module: kamailio
Branch: master
Commit: 4780d46976a7a392f23af0d89f05855d473bcb30
URL: https://github.com/kamailio/kamailio/commit/4780d46976a7a392f23af0d89f05855…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-09T09:05:18+02:00
usrloc: connect to db for main process in PROC_POSTCHILDINIT child init
---
Modified: src/modules/usrloc/usrloc_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/4780d46976a7a392f23af0d89f05855…
Patch: https://github.com/kamailio/kamailio/commit/4780d46976a7a392f23af0d89f05855…
---
diff --git a/src/modules/usrloc/usrloc_mod.c b/src/modules/usrloc/usrloc_mod.c
index d60162ed3e..797c252b85 100644
--- a/src/modules/usrloc/usrloc_mod.c
+++ b/src/modules/usrloc/usrloc_mod.c
@@ -358,6 +358,16 @@ static int mod_init(void)
}
/* Shall we use database ? */
+ switch (ul_db_mode) {
+ case DB_ONLY:
+ case WRITE_THROUGH:
+ case WRITE_BACK:
+ /*
+ * register the need to be called post-fork of all children
+ * with the special rank PROC_POSTCHILDINIT
+ */
+ ksr_module_set_flag(KSRMOD_FLAG_POSTCHILDINIT);
+ }
if (ul_db_mode != NO_DB) { /* Yes */
if (db_bind_mod(&ul_db_url, &ul_dbf) < 0) { /* Find database module */
LM_ERR("failed to bind database module\n");
@@ -452,14 +462,14 @@ static int child_init(int _rank)
case WRITE_THROUGH:
/* connect to db only from SIP workers, TIMER and MAIN processes,
* and RPC processes */
- if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN
+ if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_POSTCHILDINIT
&& _rank!=PROC_RPC)
return 0;
break;
case WRITE_BACK:
/* connect to db only from TIMER (for flush), from MAIN (for
* final flush() and from child 1 for preload */
- if (_rank!=PROC_TIMER && _rank!=PROC_MAIN && _rank!=PROC_SIPINIT)
+ if (_rank!=PROC_TIMER && _rank!=PROC_POSTCHILDINIT && _rank!=PROC_SIPINIT)
return 0;
break;
case DB_READONLY:
Module: kamailio
Branch: master
Commit: a21c929a389c6e5f85e9166d01adb0d474c6ebaf
URL: https://github.com/kamailio/kamailio/commit/a21c929a389c6e5f85e9166d01adb0d…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-05-08T15:33:56Z
userblocklist: fix function comment, related to gh #3102
---
Modified: src/modules/userblocklist/db_userblocklist.c
---
Diff: https://github.com/kamailio/kamailio/commit/a21c929a389c6e5f85e9166d01adb0d…
Patch: https://github.com/kamailio/kamailio/commit/a21c929a389c6e5f85e9166d01adb0d…
---
diff --git a/src/modules/userblocklist/db_userblocklist.c b/src/modules/userblocklist/db_userblocklist.c
index e857178f25..0377761ab3 100644
--- a/src/modules/userblocklist/db_userblocklist.c
+++ b/src/modules/userblocklist/db_userblocklist.c
@@ -61,7 +61,7 @@ void userblocklist_db_close(void) {
/*!
- * Initialises the DB API, check the table version and closes the connection.
+ * Initialises the DB API and check the table version.
* This should be called from the mod_init function.
*
* \return 0 means ok, -1 means an error occurred.
<!-- 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 you're unsure about any of these, don't 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 #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Spotted this ERRORs on kamailio restart:
```
ERROR: <core> [db.c:481]: db_use_table(): invalid connection parameter
ERROR: userblocklist [db.c:123]: db_reload_source(): cannot use db table 'globalblocklist'
ERROR: userblocklist [userblocklist.c:425]: load_source(): cannot load source from 'globalblocklist
```
Debugging it further, seen that the above ERRORs appear on ```check_allowlist()``` function fixup. This was happening because db connection is closed in mod_init and re-done in child_init. But the fixups happen before child_init and they need db connection.
Decided to not close the db connection after mod_init because they are later, first closed and then re-opened, in each child. Figured out this fix after checked where each function of db_userblocklist.c is used.
ERRORs no longer appear on restart.
Thank you,
Stefan
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3102
-- Commit Summary --
* userblocklist: fix restart errors
-- File Changes --
M src/modules/userblocklist/db_userblocklist.c (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3102.patchhttps://github.com/kamailio/kamailio/pull/3102.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3102
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3102(a)github.com>
Module: kamailio
Branch: master
Commit: 97efd6a64380025f3b4ef45372180f7e61448c1c
URL: https://github.com/kamailio/kamailio/commit/97efd6a64380025f3b4ef45372180f7…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-05-08T17:31:17+02:00
modules: readme files regenerated - acc ... [skip ci]
---
Modified: src/modules/acc/README
Modified: src/modules/ldap/README
---
Diff: https://github.com/kamailio/kamailio/commit/97efd6a64380025f3b4ef45372180f7…
Patch: https://github.com/kamailio/kamailio/commit/97efd6a64380025f3b4ef45372180f7…
---
diff --git a/src/modules/acc/README b/src/modules/acc/README
index 7c31188ac7..878623d24f 100644
--- a/src/modules/acc/README
+++ b/src/modules/acc/README
@@ -1129,7 +1129,7 @@ modparam("acc", "cdr_start_on_confirmed", 1)
6.34. cdr_facility (integer)
Log facility to which CDR messages are issued to syslog. This allows to
- easily seperate CDR-specific logging from the other log messages.
+ easily separate CDR-specific logging from the other log messages.
Default value is LOG_DAEMON.
diff --git a/src/modules/ldap/README b/src/modules/ldap/README
index c7555ca3c6..921f45822f 100644
--- a/src/modules/ldap/README
+++ b/src/modules/ldap/README
@@ -533,7 +533,7 @@ ldap_result("telephoneNumber/$avp(s:tel_number)");
AVP. It can be either str for string, or int for integer. If avp_type
is specified as int then ldap_result tries to convert the LDAP
attribute values to integer. In this case, the values are only stored
- as AVP if the conversion to integer is succesfull.
+ as AVP if the conversion to integer is successful.
Function Parameters: