Hello,
2021 is almost over, time ran fast somehow this year, with a major
release in the middle, which delayed the development discussion for the
next one, so it's time for it!
As usual, the aim is to sketch the roadmap to next major release so the
developers and community members can syncronize and plan what should be
done till Kamailio v5.6 will be out as well as discuss about current
state of the project, look for new ideas to improve collaboration within
the community, a.s.o.
The meeting will be done on a matrix chat room. More details are in the
wiki page of the event, available at:
 * https://www.kamailio.org/wiki/devel/irc-meetings/2021a
Feel free to add there topics that you want to be discussed.
The proposed date is next Wednesday, December 15, 2021, at 15:00UTC
(15:00 London/Dublin, 16:00 most of West Europe, 10:00 New York), but
other dates can be proposed if they suit for more participants.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
<!-- 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)
- [ ] 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)
- [ ] 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Adding an optional forth parameter to jwt module to add headers.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2971
-- Commit Summary --
* jwt: possibility to add headers when generating jwt
-- File Changes --
M src/modules/jwt/doc/jwt_admin.xml (11)
M src/modules/jwt/jwt_mod.c (85)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2971.patchhttps://github.com/kamailio/kamailio/pull/2971.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2971
Module: kamailio
Branch: master
Commit: 8df3752c2d7ea37b4acadf76283287744a56005a
URL: https://github.com/kamailio/kamailio/commit/8df3752c2d7ea37b4acadf762832877…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-12-14T14:16:31+01:00
modules: readme files regenerated - tls ... [skip ci]
---
Modified: src/modules/tls/README
---
Diff: https://github.com/kamailio/kamailio/commit/8df3752c2d7ea37b4acadf762832877…
Patch: https://github.com/kamailio/kamailio/commit/8df3752c2d7ea37b4acadf762832877…
---
diff --git a/src/modules/tls/README b/src/modules/tls/README
index 127cfa7601..94c8cfc069 100644
--- a/src/modules/tls/README
+++ b/src/modules/tls/README
@@ -234,6 +234,14 @@ Chapter 1. Admin Guide
module that uses libssl (OpenSSL library). A safe option is to have the
tls module loaded first (be in the first "loadmodule" in Kamailio.cfg).
+ IMPORTANT: using this module compiled with newer versions of libssl
+ (e.g., v1.1+) may require Kamailio to be started with --atexit=no
+ command line parameters to avoid calling C atexit callbacks inside the
+ process ending during daemonize procedure as well as during shut down,
+ which can lead to crashes because it destroys and then accesses shared
+ memory. For example, such case has been reported for Ubuntu 20.04 or
+ RedHat 8.
+
2. Quick Start
The default kamailio.cfg file has basic tls support included, it has to
Module: kamailio
Branch: master
Commit: 8dc18cab5bc32c1d34a9113242d230b7458d4075
URL: https://github.com/kamailio/kamailio/commit/8dc18cab5bc32c1d34a9113242d230b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-14T14:02:41+01:00
tls: docs - added note about --atexit=no cli param for newer libssl versions
---
Modified: src/modules/tls/doc/tls.xml
---
Diff: https://github.com/kamailio/kamailio/commit/8dc18cab5bc32c1d34a9113242d230b…
Patch: https://github.com/kamailio/kamailio/commit/8dc18cab5bc32c1d34a9113242d230b…
---
diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml
index b5ea415ae79..e356d5bff7c 100644
--- a/src/modules/tls/doc/tls.xml
+++ b/src/modules/tls/doc/tls.xml
@@ -64,6 +64,15 @@
that uses libssl (OpenSSL library). A safe option is to have the tls module
loaded first (be in the first "loadmodule" in &kamailio;.cfg).
</para>
+ <para>
+ IMPORTANT: using this module compiled with newer versions of libssl
+ (e.g., v1.1+) may require &kamailio; to be started with
+ <emphasis>--atexit=no</emphasis> command line parameters to avoid
+ calling C atexit callbacks inside the process ending during
+ daemonize procedure as well as during shut down, which can lead
+ to crashes because it destroys and then accesses shared memory. For
+ example, such case has been reported for Ubuntu 20.04 or RedHat 8.
+ </para>
</section>
<section id="tls.quick_start">
<title>Quick Start</title>
### Description
Hi,
I have been doing some load testing on kamailio 5.4.7 running in podman.
Kamailio is using dmq to share dialogs and htable with a backup Kamailio also running 5.4.7.
I tested with 100 CPS and during the first minutes all calls are being processed correctly but then all the messages start to be retransmitted.
Kamailio is not processing any sip messages anymore but still replies to HTTP requests, is still possible to run kamctl/kamcmd commands on it but for example, if running the command "kamcmd dlg.list" nothing happens.
Also, I did a load test with the backup Kamailio turn off so that there is no replication between them, and in that case, I can run the 100 CPS without any issue.
In kamcmd trap file I can see a lot of "<error: Cannot access memory" errors.
In order for Kamailio to start processing again sip, I need to restart it.
Any extra logs that I can try to collect when the problem happens?
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
[trap.txt](https://github.com/kamailio/kamailio/files/7705076/trap.txt)
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.7 (x86_64/linux) a19fe1
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: a19fe1
compiled on 14:06:57 Dec 13 2021 with gcc 10.2.1
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2974
<!-- 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 -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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)
- [ ] 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2973
-- Commit Summary --
* dialog: fix missing else
-- File Changes --
M src/modules/dialog/dialog.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2973.patchhttps://github.com/kamailio/kamailio/pull/2973.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2973
```
flex -o core/lex.yy.c core/cfg.lex
CC (gcc) [kamailio] core/lex.yy.o
LD (gcc) [kamailio] kamailio
core/ut.o: In function `ksr_clock_gettime':
/root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src/core/ut.c:175: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[1]: *** [kamailio] Error 1
make[1]: Leaving directory `/root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src'
make: *** [default] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.RFyzKs (%build)
```
Should we continue support CentOS 6?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2921
### Description
Currently, an undefined environmental variable with `#!defenv` results in Kamailio failing to start. The proposal here that if the environmental variable is not defined, then the macro value would be undefined as well. For example:
```
!#KAMAILIO
loadmodule "xlog"
loadmodule "pv"
#!defenv FOO
request_route {
#!ifdef FOO
xlog("L_INFO","Environmental variable $$FOO is set\n");
#!else
xlog("L_WARN","Environmental variable $$FOO is NOT set\n");
#!endif
forward();
}
```
Currently this configuration will fail to load if environmental variable is not set. My proposal is to either allow `#!envdef` to accept an undefined environmental variable and have the preprocessor macro undefined, or to add a new keyword (`#!envdefn` perhaps?) to allow this behavior.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2967
#### 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
- [ ] 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
- [ x] Related to issue #2920
#### Description
allows to filter out non local dialogs from stats using a new argument
fix #2920
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2935
-- Commit Summary --
* dialog: add local_only paramter to RPC dlg.stats_active
-- File Changes --
M src/modules/dialog/dialog.c (5)
M src/modules/dialog/doc/dialog_admin.xml (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2935.patchhttps://github.com/kamailio/kamailio/pull/2935.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2935
Module: kamailio
Branch: master
Commit: f639dfb5f5b74d77026bec7b8bb493b40ce6d47c
URL: https://github.com/kamailio/kamailio/commit/f639dfb5f5b74d77026bec7b8bb493b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-13T09:22:39+01:00
dialog: docs - typo and clarification about local socket bind address
---
Modified: src/modules/dialog/doc/dialog_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f639dfb5f5b74d77026bec7b8bb493b…
Patch: https://github.com/kamailio/kamailio/commit/f639dfb5f5b74d77026bec7b8bb493b…
---
diff --git a/src/modules/dialog/doc/dialog_admin.xml b/src/modules/dialog/doc/dialog_admin.xml
index 745efb51f0..d456d545ef 100644
--- a/src/modules/dialog/doc/dialog_admin.xml
+++ b/src/modules/dialog/doc/dialog_admin.xml
@@ -2805,7 +2805,8 @@ dlg_reset_property("timeout-noreset");
<itemizedlist>
<listitem><para>
<emphasis>local_only</emphasis> (optional) - if not 0 then filter out
- non local dialogues. No bind_addr info in memory.
+ non local dialogs (the receiving socket is not found locally,
+ from C code point of view, the bind_addr info is not set).
</para></listitem>
</itemizedlist>
<para>Returned fields</para>
Capability to skip realm in NOTIFY's Message body reginfo tag.
Added realm(string) and skip_realm(int) parameters.
<!-- 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
- [ ] 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 #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2951
-- Commit Summary --
* ims_usrloc_scscf: Add capability to skip a specific realm
-- File Changes --
M src/modules/ims_usrloc_scscf/doc/ims_usrloc_scscf_admin.xml (28)
M src/modules/ims_usrloc_scscf/ims_usrloc_scscf_mod.c (5)
M src/modules/ims_usrloc_scscf/udomain.c (59)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2951.patchhttps://github.com/kamailio/kamailio/pull/2951.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2951
<!-- 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 -->
- [X] 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2972
-- Commit Summary --
* ims_charging: fix charging reply route with kemi
-- File Changes --
M src/modules/ims_charging/ims_charging_mod.c (30)
M src/modules/ims_charging/ims_ro.c (35)
M src/modules/ims_charging/ims_ro.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2972.patchhttps://github.com/kamailio/kamailio/pull/2972.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2972
KEEPALIVE_MECHANISM_CONCHECK was added but can't be enabled
<!-- 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 -->
- [X] 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 -->
add case for KEEPALIVE_MECHANISM_CONCHECK in mod_init validation of ws_keepalive_mechanism
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2966
-- Commit Summary --
* websockets: enable KEEPALIVE_MECHANISM_CONCHECK
-- File Changes --
M src/modules/websocket/websocket.c (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2966.patchhttps://github.com/kamailio/kamailio/pull/2966.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2966
<!-- Kamailio Pull Request Template -->
#### 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] New feature (non-breaking change which adds new 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
- [X] Related to issue #2967
#### Description
Add new preprocessor keywords `trydefenv` and `trydefenvs` that work like `defenv` and `defenvs` respectively, with the difference that if the environmental variable is not defined, then the value in Kamailio will not be defined.
For example:
```
#!KAMAILIO
loadmodule "xlog"
loadmodule "pv"
#!trydefenv EXTRALOG
request_route {
#!ifdef EXTRALOG
xlog("L_I", "Some Extra Logging here\n");
#!endif
forward ();
}
```
If the environmental variable `$EXTRALOG` is defined, the log line will be written. If the environmental variable is not set, then in Kamailio `EXTRALOG` will not be defined and the `#!ifdef` section will not be loaded.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2969
-- Commit Summary --
* core: cfg.lex support for undefned env vars
-- File Changes --
M src/core/cfg.lex (56)
M src/core/ppcfg.h (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2969.patchhttps://github.com/kamailio/kamailio/pull/2969.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2969