<!-- 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, ...)
- [ ] 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)
- [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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
ims_auth: option to generate authentication vector locally, without needed CDP and HSS.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4054
-- Commit Summary --
* ims_auth: added Milenage, AES-128 (Rijndael) and auth_vector local generation
* ims_auth: new av_mode parameter
* ims_auth: synced functions with number of parameters
* ims_auth: function to set ims auth data
* ims_auth: reworked the local AV API
* ims_auth: generate local auth vector when none is found for challenge
* ims_auth: fixed compilation and moved back auth_vector to authorize.h
* ims_auth: integrated local resync
* ims_auth: dropped all old vectors on local resync
* ims_auth: docs for av_mode parameter
* ims_auth: relocated aes128.{c,h} to gcrypt module
* gcrypt: exported api for aes128 functions
* gcrypt: include file for binding module exports
* ims_auth: use gcrypt api for aes128 functions
* ims_auth: don't bind or use cdp when av_mode is 1
* ims_auth: docs updated with gcrypt dependency
-- File Changes --
A src/modules/gcrypt/api.h (66)
A src/modules/gcrypt/gcrypt_aes128.c (109)
A src/modules/gcrypt/gcrypt_aes128.h (33)
M src/modules/gcrypt/gcrypt_mod.c (21)
A src/modules/ims_auth/auth_vector.c (144)
A src/modules/ims_auth/auth_vector.h (36)
M src/modules/ims_auth/authorize.c (357)
M src/modules/ims_auth/authorize.h (24)
M src/modules/ims_auth/cxdx_mar.h (2)
M src/modules/ims_auth/doc/ims_auth_admin.xml (22)
M src/modules/ims_auth/ims_auth_mod.c (73)
A src/modules/ims_auth/milenage.c (290)
A src/modules/ims_auth/milenage.h (37)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4054.patchhttps://github.com/kamailio/kamailio/pull/4054.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4054
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4054(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
It seems that the fixup_free_* functions are not getting called when used with:
```
static cmd_export_t cmds[] = {
{"acc_log_request", (cmd_function)w_acc_log_request, 1,
acc_fixup, free_acc_fixup,
ANY_ROUTE},
// ...
{0, 0, 0, 0, 0, 0}
};
static int free_acc_fixup(void **param, int param_no)
{
LM_CRIT("acc free fixup = %d\n", param_no);
if(*param) {
pkg_free(*param);
*param = 0;
}
return 0;
}
```
Nothing is getting logged from the function. Is this expected not to print in free_fixup due to the destruction of kamailio and the logging is not reliable?
I also used gdb and added some breakpoints in `fixup` and `free_fixup` functions in some other modules (file_out) and the breakpoint was only found in `fixup` but not in `free_fixup`.
When is the `free_fixup` supposed to be called, at kamailio destruction or after fixing it and before the main loop starts?
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
Use any module that has a custom (maybe also provided from core) `free_fixup` function, and monitor if `free_fixup` is called using debug mode.
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
Apr 15 15:52:03 app01 kamailio[812169]: INFO: <core> [core/mem/q_malloc.c:402]: qm_malloc(): qm_malloc(0x7fcdcab18010, 56) called from file_out: file_out.c: fo_fixup_str_index(287)
Apr 15 15:52:03 app01 kamailio[812169]: INFO: <core> [core/mem/q_malloc.c:449]: qm_malloc(): qm_malloc(0x7fcdcab18010, 64) returns address 0x7fcdcacc4280 frag. 0x7fcdcacc4240 (size=64) on 1 -th hit```
`0x7fcdcacc4240` fragment is not found anywhere in the logs reported that it was freed unlike other malloced resources.
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.9.0-dev0 (x86_64/linux) 8bc64a
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_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: 8bc64a
compiled on 15:32:09 Apr 15 2024 with gcc 10.5.0
```
* **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`)
-->
```
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
5.4.0-176-generic #196-Ubuntu SMP Fri Mar 22 16:46:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3814
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3814(a)github.com>
### Description
Upon interfacing with a specific carrier’s cloud relay service, upon the termination of the call by the called party after the phone rings, the tag value within the To header of the 408 response from the cloud relay side is altered. When Kamailio relays this 408 response to FreeSwitch, the sofia-sip protocol stack employed by FreeSwitch perceives it as a distinct dialog and does not promptly conclude the call. Given that the carrier’s personnel may lack the capability or the inclination to effect changes, we are looking to accommodate this scenario on the Kamailio side. Upon receipt of the 408 response from the carrier, we will determine if there has been a modification to the tag value in the To header. If such a change is detected, prior to forwarding the 408 response to FreeSwitch, we will rectify the tag value in the To header of the 408 response to correspond with the tag value from the 18x signaling messages.
Our system :
OS: Rocky Linux release 9.3 (Blue Onyx)
Kamailo vesion 5.7.3
### Troubleshooting
#### Reproduction
In the kamailio.cfg, invoke a Python script within the onreply_route[MANAGE_REPLY] block
The following two scenarios both result in content-related errors: 1. First, the ‘To’ header field is removed using msg.call_function(‘remove_hf’, ‘To’), and then the modified ‘To’ header field is added using msg.call_function(‘append_hf’, sip_to). 2. The tag value in the ‘To’ header field is changed back to the original value using msg.call_function(‘replace_hdrs’, toTag, originalToTag).
#### Log Messages
Dec 4 13:45:00 sipp102 ./kamailio[391888]: INFO: {2 92091734 INVITE a18e6868-2ca5-123e-a394-00163e347028} app_python3 [mod_Logger.c:172]: logger_LM_INFO(): recv 408, sip_to_field_val = <sip:130679333xx@39.106.31.1xx:5060>;tag=3b47-eb967d112cba8f7d5eb856259e056294 toUri = <sip:130679333xx@39.106.31.1xx:5060> toTag = tag=3b47-eb967d112cba8f7d5eb856259e056294 originalToTag = tag=as73409c31
Dec 4 13:45:00 sipp102 ./kamailio[391888]: CRITICAL: {2 92091734 INVITE a18e6868-2ca5-123e-a394-00163e347028} <core> [core/mem/q_malloc.c:515]: qm_free(): BUG: bad pointer 0x7f60c10a88a0 (out of memory block!) called from app_python3: python_msgobj.c: msg_call_function(258) - ignoring
#### SIP Traffic
Received 408:
Forwarded 408:

--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4050
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4050(a)github.com>
Hello all,
As you may have noticed, we have added CMake building support to kamailio. You can check the PR https://github.com/kamailio/kamailio/pull/4043 for details and https://github.com/kamailio/kamailio-wiki/blob/main/docs/tutorials/cmake/in… for docs on how to use it.
Currently all of the modules have their corresponding CMakeLists.txt and should compile successfully (apart from the tls_wolfss).
I say should as i have only being able to test them on my machine with the following:
Ubuntu 20.04.6 LTS
Linux 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
cmake version 3.29.4 (min is 3.10, as defined in CMakelist.txt, found available in Ubuntu 18.04)
i will also add support for more OSes but for the time being there is support for Linux-based, DragonFly (for some reason) and Darwin (MacOS).
You can also introduce the files needed to in https://github.com/kamailio/kamailio/tree/master/cmake/os-specific, if you are willing to help and submit a PR.
Some modules i could not compile because of missing dependencies available on the distribution or require specific OS (db_oracle) are:
1.
db_oracle
2.
dnssec
3.
jwt
4.
microhttpd
5.
nats
6.
nsq
7.
ruxc
8.
secsipid_proc
9.
stirshaken
10.
tls_wolfssl (compilation error, need some more time to see why)
Any help on verifying whether the above modules (and of course all the rest), compile and run successfully will be awesome.
Any bug fixes and PRs are obviously welcome and appreciated.
Reporting issues is can be done of course on kamailio github page.
Cheers,
Xenofon
Hello,
thanks to a significant effort/contribution done by Xenofon Karamanos,
with some help from Alexandr Dubovikov during Kamailio Devel Meeting in
Dusseldorf, support for using CMake (https://cmake.org/) for building
Kamailio has been recently merged to git repository:
-
https://lists.kamailio.org/mailman3/hyperkitty/list/sr-dev@lists.kamailio.o…
The old build system based on manually crafted Makefiles got quite
complex during the past 20 years, discovering and managing dependencies
becoming harder and harder.
Right now, both old Makefiles and the new CMake-based build system are
available in order to help discovering what is missing in CMake files
from what people use with the old Makefiles.
However, the plan is to REMOVE the old Makefiles before freezing the
development for v6.0.x (like 12 days or so). The testing phase for
v6.0.x will be also used for tuning what is missing in the CMake files.
Of course, it not going to end up to be 100% same set of build commands,
but the goal is to have the commonly used ones. Besides that, CMake
should facilitate easier automate testing and packaging.
Therefore it is important that you upgrade your Kamailio build/packaging
process to use CMake and report if there is something that you cannot
achieve with it. Docs are available in the wiki at:
- https://www.kamailio.org/wikidocs/tutorials/cmake/default/
- https://www.kamailio.org/wikidocs/tutorials/cmake/custom/
You are encouraged to make pull requests to the above tutorials if you
find something missing or useful to be known by the others.
Another impact of the new CMake build system is to supported operating
systems. CMake is widely available, however the developers have access
to limited set of machines and they are also not very familiar with
every OS out there. Old Makefiles (tried to) have support for very old
OSes (from late 1990's early 2000's, like vax vms, sunos, ...), I
haven't seen any activity related to them in the community for many
years, therefore unless someone still uses such OS and contributes
support for them, they will be lost by the cmake build system.
Anyhow, in short, test on your favourite OS and report if something is
not working.
Cheers,
Daniel
--
Daniel-Constantin Mierla
| https://www.asipto.com
| SIP/Kamailio Consultancy, Training & Development Services
| Berlin - Germany
#### 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:
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Just a minor typo fix in a README.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4051
-- Commit Summary --
* misc: examples/ims/scscf/README - fix typo in .sql filename [skip ci]
-- File Changes --
M misc/examples/ims/scscf/README.md (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4051.patchhttps://github.com/kamailio/kamailio/pull/4051.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4051
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4051(a)github.com>
### Description
Using `cmake` to compile on MacOS (Darwin) 15.1.1 (Sequoia) fails.
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
```
mkdir buildmac
cd buildmac/
cmake ..
make VERBOSE=1
/opt/local/bin/cmake -S/tmp/kamailio -B/tmp/kamailio/buildmac --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /tmp/kamailio/buildmac/CMakeFiles /tmp/kamailio/buildmac//CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/core/CMakeFiles/GenerateParser.dir/build.make src/core/CMakeFiles/GenerateParser.dir/depend
cd /tmp/kamailio/buildmac && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/kamailio /tmp/kamailio/src/core /tmp/kamailio/buildmac /tmp/kamailio/buildmac/src/core /tmp/kamailio/buildmac/src/core/CMakeFiles/GenerateParser.dir/DependInfo.cmake "--color="
Dependencies file "src/core/CMakeFiles/GenerateParser.dir/lex.yy.c.o.d" is newer than depends file "/tmp/kamailio/buildmac/src/core/CMakeFiles/GenerateParser.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target GenerateParser
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/core/CMakeFiles/GenerateParser.dir/build.make src/core/CMakeFiles/GenerateParser.dir/build
[ 0%] Building C object src/core/CMakeFiles/GenerateParser.dir/lex.yy.c.o
cd /tmp/kamailio/buildmac/src/core && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH=\"arm64\" -DCFG_DIR=\"/usr/local/etc/kamailio/\" -DCOMPILER=\"16.0.0.16000026\" -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DFMSTATS -DF_MALLOC -DHAVE_RESOLV_RES -DKMSTATS -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DNAME=\"kamailio\" -DOS=Darwin -DOS_QUOTED=\"Darwin\" -DPIC -DPKG_MALLOC -DQ_MALLOC -DRAW_SOCKS -DRUN_DIR=\"/var/run/kamailio\" -DSHARE_DIR=\"/usr/local/share/kamailio/\" -DSHM_MMAP -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_FUTEX -DUSE_MCAST -DUSE_NAPTR -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION=\"6.0.0-dev2\" -DVERSIONVAL=6000000 -D__CPU_arm64 -D__OS_darwin -std=gnu11 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -MD -MT src/core/CMakeFiles/GenerateParser.dir/lex.yy.c.o -MF CMakeFiles/GenerateParser.dir/lex.yy.c.o.d -o CMakeFiles/GenerateParser.dir/lex.yy.c.o -c /tmp/kamailio/src/core/lex.yy.c
In file included from /tmp/kamailio/src/core/cfg.lex:33:
In file included from /tmp/kamailio/src/core/globals.h:34:
In file included from /tmp/kamailio/src/core/ip_addr.h:39:
In file included from /tmp/kamailio/src/core/ut.h:46:
In file included from /tmp/kamailio/src/core/mem/shm_mem.h:32:
In file included from /tmp/kamailio/src/core/mem/shm.h:44:
In file included from /tmp/kamailio/src/core/mem/../lock_ops.h:92:
/tmp/kamailio/src/core/mem/../fastlock.h:130:2: error: "unknown architecture"
130 | #error "unknown architecture"
| ^
/tmp/kamailio/src/core/mem/../fastlock.h:294:2: error: "unknown architecture"
294 | #error "unknown architecture"
| ^
/tmp/kamailio/src/core/mem/../fastlock.h:317:2: error: call to undeclared function 'membar_getlock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
317 | membar_getlock();
| ^
/tmp/kamailio/src/core/mem/../fastlock.h:328:2: error: call to undeclared function 'membar_getlock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
328 | membar_getlock();
| ^
/tmp/kamailio/src/core/mem/../fastlock.h:436:2: error: "unknown architecture"
436 | #error "unknown architecture"
| ^
5 errors generated.
make[2]: *** [src/core/CMakeFiles/GenerateParser.dir/lex.yy.c.o] Error 1
make[1]: *** [src/core/CMakeFiles/GenerateParser.dir/all] Error 2
make: *** [all] Error 2
```
Compiling with the old Makefiles (just git clone and then `make Q=0`), the compile command looks like:
```
gcc -g -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wunused-variable -Wuninitialized -DNAME='"kamailio"' -DVERSION='"6.0.0-dev3"' -DARCH='"arm64"' -DOS='darwin_' -DOS_QUOTED='"darwin"' -DCOMPILER='"gcc Apple clang version 16.0.0 (clang-1600.0.26.4)"' -D__CPU_arm64 -D__OS_darwin -DVERSIONVAL=6000000 -DCFG_DIR='"/opt/local/etc/kamailio/"' -DSHARE_DIR='"/opt/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSGHDR_MSG_CONTROL -DUSE_ANON_MMAP -DNDEBUG -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM -DUSE_SIGWAIT -DHAVE_IP_MREQN -DUSE_PTHREAD_MUTEX -DUSE_SYSV_SEM -DHAVE_KQUEUE -DHAVE_SELECT -c core/lex.yy.c -o core/lex.yy.o
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
Kamailio master branch
```
* **Operating System**:
```
❯ uname -a
Darwin Mac 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64
❯ uname -m
arm64
❯ uname -p
arm
❯ cmake --version
cmake version 3.29.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4049
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4049(a)github.com>
Module: kamailio
Branch: master
Commit: 6235369e1deab4b87c999d5f00fb59b6609b3df6
URL: https://github.com/kamailio/kamailio/commit/6235369e1deab4b87c999d5f00fb59b…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-12-03T14:19:43Z
cmake: Update platform-specific flags
- Update the platform-specific flags in the "os-specific.cmake" file for Linux and DragonFly BSD.
- Add new files "dragonfly.cmake" and "linux.cmake" in the "os-specific" directory to define the flags for DragonFly BSD and Linux, respectively.
- Add a new file "macos.cmake" in the "os-specific" directory to define the flags for Mac OS X.
- Update the "defs.cmake" file to print the availability of fast lock.
---
Added: cmake/os-specific/dragonfly.cmake
Added: cmake/os-specific/linux.cmake
Added: cmake/os-specific/macos.cmake
Modified: cmake/defs.cmake
Modified: cmake/os-specific.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/6235369e1deab4b87c999d5f00fb59b…
Patch: https://github.com/kamailio/kamailio/commit/6235369e1deab4b87c999d5f00fb59b…
### Description
When calling inline functions using `app_python3s_exec()`, setting the level to critical using either `KSR.xlog.xcrit("foo\n")` or using `KSR.xlog.xlog("L_CRIT", "foo\n")` Do not set the level on the log line in a manner consistent with other log levels.
#### Reproduction
Kamailio code:
```
request_route {
app_python3s_exec("log_test");
. . .
}
```
Python code to contrast how info level logging and critical level logging differ:
```
def log_test():
KSR.xlog.xinfo("This line log level: xinfo = INFO\n");
KSR.xlog.xcrit("This line log level: xcrit = CRITICAL\n");
KSR.xlog.xlog("L_INFO", "This line log level: xlog = L_INFO\n");
KSR.xlog.xlog("L_CRIT", "This line log level: xlog = L_CRIT\n");
```
#### Log Messages
Log output. Note how the info level lines begin with INFO, but the critical level lines begin with an empty string:
```
2(8) INFO: <script>: This line log level: xinfo = INFO
2(8) : <script>: This line log level: xcrit = CRITICAL
2(8) INFO: <script>: This line log level: xlog = L_INFO
2(8) : <script>: This line log level: xlog = L_CRIT
```
### Possible Solutions
The critical level lines should begin with `CRITICAL` - this is what happens if the xlog function is called in Kamailio script. The output should look like this:
```
2(8) INFO: <script>: This line log level: xinfo = INFO
2(8) CRITICAL: <script>: This line log level: xcrit = CRITICAL
2(8) INFO: <script>: This line log level: xlog = L_INFO
2(8) CRITICAL: <script>: This line log level: xlog = L_CRIT
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_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: unknown
compiled on 15:03:24 Nov 18 2024 with gcc 13.2.1
```
* **Operating System**:
Tested in docker on Windows 11 (WSL2) using alpine linux as a base. `/etc/os-releas`:
```
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.2
PRETTY_NAME="Alpine Linux v3.20"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4048
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4048(a)github.com>