I am using this docker file for installaing kamailio. I wana use it with open5gs for trynig VoNR , I used before it for VoLTE it works but right now I have this error in installation process.
![log](https://github.com/kamailio/kamailio/assets/161492387/42017f48-3a7f-4cbe-bdf0-48dbb3443f5f)
and there is docker file that Im using:
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
# Install updates and dependencies
RUN apt-get update && \
apt-get -y install mysql-server tcpdump screen tmux ntp ntpdate git-core dkms \
gcc flex bison libmysqlclient-dev make libssl-dev libcurl4-openssl-dev \
libxml2-dev libpcre2-dev bash-completion g++ autoconf libmnl-dev \
libsctp-dev libradcli-dev libradcli4 libjson-c-dev pkg-config iproute2 net-tools \
iputils-ping
# Fetch Kamailio code (branch 5.3)
RUN mkdir -p /usr/local/src/ && cd /usr/local/src/ && \
git clone https://github.com/kamailio/kamailio && \
cd kamailio && git checkout 5.8
# Build and Install Kamailio
RUN cd /usr/local/src/kamailio && make cfg
COPY modules.lst /usr/local/src/kamailio/src
RUN cd /usr/local/src/kamailio && \
make -j`nproc` Q=0 all | tee make_all.txt && \
make install | tee make_install.txt && \
ldconfig
COPY kamailio_init.sh /
CMD /kamailio_init.sh
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3825
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3825(a)github.com>
May I ask what the problem is? It prompts an error but does not affect the program's operation. Is it that the configuration file and the deployed version are inconsistent?
13(682) ERROR: *** cfgtrace:dbg_cfg_trace(): branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg] l=706 a=16 n=if
13(682) ERROR: *** cfgtrace:dbg_cfg_trace(): branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg] l=695 a=16 n=if
13(682) ERROR: *** cfgtrace:dbg_cfg_trace(): branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg] l=695 a=16 n=if
13(682) INFO: <script>: Call from Websocket endpoint at the DURI {sip:117.80.229.36:15060} for callee {3008}
13(682) ERROR: *** cfgtrace:dbg_cfg_trace(): branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg] l=691 a=16 n=if
13(682) ERROR: *** cfgtrace:dbg_cfg_trace(): branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg] l=685 a=25 n=has_body
Here is the code for my kamailio.cfg section
branch_route[MANAGE_BRANCH]{
xlog("L_INFO","Call to ru:{$ru} '$du'/'$proto'\n");
if(($du=~"transport=ws") || ($du=~"transport=wss")){
if ($du=~"transport=tls") {
#sdp_remove_media("video");
xlog("L_INFO","Call to TLS endpoint at the DURI {$du} for callee {$tU}\n");
if (has_body('application/sdp')) {
rtpengine_manage("record-call=off metadata=6:$ci force trust-address replace-origin replace-session-connection UDP/TLS/RTP/SAVPF");
}
t_on_reply("REPLY_FROM_TLS");
$fs="tls:MY_IP_ADDR:MY_WSS_PORT";
} else if ($du=~"transport=ws") {
xlog("L_INFO","Call to Websocket endpoint at the DURI {$du} for callee {$tU}\n");
if (has_body('application/sdp')) {
route(GET_REAL_IP_FOR_RTPENGINE);
#rtpengine_manage("record-call=off metadata=7:$ci replace-origin replace-session-connection rtcp-mux-accept rtcp-mux-offer DTLS=passive SDES-off UDP/TLS/RTP/SAVPF media-address=$avp(mediaAddr)");
rtpengine_manage("record-call=off metadata=7:$ci replace-origin replace-session-connection rtcp-mux-accept rtcp-mux-offer DTLS=passive SDES-off UDP/TLS/RTP/SAVPF");
}
t_on_reply("REPLY_FROM_WS");
$du = $du + ";transport=ws";
$fs="tcp:MY_IP_ADDR:MY_WS_PORT";
}
}else {
if ($proto=~ "tls")
{
#sdp_remove_media("video");
xlog("L_INFO","Call from WSS endpoint at the DURI {$du} for callee {$tU}\n");
if (has_body('application/sdp')) {
rtpengine_manage("record-call=off metadata=8:$ci trust-address replace-origin replace-session-connection DTLS=passive ICE=remove RTP/AVP");
}
xlog("L_INFO","media adress is $(du{s.select,1,:})\n");
t_on_reply("REPLY_TO_TLS");
} else if ($proto =~ "ws"){
xlog("L_INFO","Call from Websocket endpoint at the DURI {$du} for callee {$tU}\n");
if (has_body('application/sdp')) {
route(GET_REAL_IP_FOR_RTPENGINE);
#rtpengine_manage("record-call=off metadata=9:$ci replace-origin replace-session-connection DTLS=passive ICE=remove RTP/AVP media-address=$avp(mediaAddr)");
rtpengine_manage("record-call=off metadata=9:$ci replace-origin replace-session-connection DTLS=passive ICE=remove RTP/AVP");
}
xlog("L_INFO","media adress is $(du{s.select,1,:})\n");
t_on_reply("REPLY_TO_WS");
}
if (($proto=~ "udp") || ($proto=~"tcp"))
{
#sdp_remove_media("video");
xlog("L_INFO","UDP Branch is {$du} for {$tU}\n");
# $avp(mediaAddr) = '';
if ( has_body('application/sdp')) {
#rtpengine_manage("record-call=off metadata=10:$ci replace-origin replace-session-connection media-address=$avp(mediaAddr)");
rtpengine_manage("record-call=off metadata=10:$ci replace-origin replace-session-connection");
}
t_on_reply("STANDART");
}
}
xlog("L_INFO", "t_on_reply set\n");
if is_method("BYE|CANCEL") {
rtpengine_manage();
}
}
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3821
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3821(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
Kamailio segfaults on startup. After a bit of digging, it looks like the issue is caused by trying to publish something related to an expired dalog which is present in the database:
```
kamailio=# select * from dialog;
id | hash_entry | hash_id | callid | from_uri | from_tag | to_uri | to_tag | caller_cseq |
callee_cseq | caller_route_set | callee_route_set | caller_contact |
callee_contact | caller_sock | callee_sock | state | start_time | timeout | sflags | iflags | toroute_name | req_ur
i | xdata
----+------------+---------+---------------------------+------------------------------+----------+-------------------------------------------+---------------+-------------+-
------------+--------------------------------------------+------------------+---------------------------------------------------------------------------+--------------------
-----------------------------------+----------------------+----------------------+-------+------------+------------+--------+--------+--------------+------------------------
-------------------+-------
90 | 3720 | 11295 | msowdcchfzrlapg@localhost | sip:101@example.voismart.com | msfvz | sip:*9001*0039123456@example.voismart.com | HBQj442BFrH0N | 131 |
0 | <sip:172.23.42.1;lr=on;ftag=msfvz;nat=yes> | | sip:101_example_voismart_com@172.23.42.1:5065;alias=192.168.1.201~32878~1 | sip:*9001*003912345
6@172.23.42.211:5060;transport=udp | udp:172.23.42.3:5060 | udp:172.23.42.3:5060 | 4 | 1706715542 | 1706801943 | 0 | 1 | | sip:*9001*0039123456@ex
ample.voismart.com |
(1 row)
```
### Troubleshooting
#### 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.
-->
```
(gdb) bt full
#0 0x00007f193de1bc93 in free_str_list_all (del_current=0x2e656c706d617865) at /usr/local/src/pkg/src/modules/pua_dialoginfo/pua_dialoginfo.c:1109
del_next = <optimized out>
__func__ = "free_str_list_all"
#1 0x00007f193de1ebc6 in free_dlginfo_cell (param=0x7f1942265dc8) at /usr/local/src/pkg/src/modules/pua_dialoginfo/pua_dialoginfo.c:1079
cell = 0x7f1942265dc8
cell = <optimized out>
__func__ = <optimized out>
#2 free_dlginfo_cell (param=0x7f1942265dc8) at /usr/local/src/pkg/src/modules/pua_dialoginfo/pua_dialoginfo.c:1070
cell = 0x0
__func__ = "free_dlginfo_cell"
#3 0x00007f1940b7120b in destroy_dlg_callbacks_list (cb=0x0) at /usr/local/src/pkg/src/modules/dialog/dlg_cb.c:74
cb_t = 0x7f1942266050
__func__ = "destroy_dlg_callbacks_list"
#4 0x00007f1940ba5229 in destroy_dlg (dlg=0x7f1941b1a8a0) at /usr/local/src/pkg/src/modules/dialog/dlg_hash.c:369
ret = <optimized out>
var = <optimized out>
__func__ = "destroy_dlg"
#5 0x00007f1940ba6b08 in destroy_dlg_table () at /usr/local/src/pkg/src/modules/dialog/dlg_hash.c:436
dlg = 0x0
l_dlg = <optimized out>
i = 3720
__func__ = <optimized out>
#6 destroy_dlg_table () at /usr/local/src/pkg/src/modules/dialog/dlg_hash.c:422
dlg = <optimized out>
l_dlg = <optimized out>
i = <optimized out>
__func__ = "destroy_dlg_table"
#7 0x00007f1940b57b06 in mod_destroy () at /usr/local/src/pkg/src/modules/dialog/dialog.c:871
No locals.
#8 0x000055dd96a6d1e2 in destroy_modules () at core/sr_module.c:872
t = 0x7f1949d9d5f0
foo = 0x7f1949d94710
__func__ = "destroy_modules"
#9 0x000055dd96864d01 in cleanup (show_status=1) at /usr/local/src/pkg/src/main.c:573
memlog = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
__func__ = "cleanup"
#10 0x000055dd96c92a4d in shutdown_children.constprop.0 (show_status=show_status@entry=1, sig=15) at /usr/local/src/pkg/src/main.c:721
__func__ = <optimized out>
#11 0x000055dd9685fcd5 in handle_sigs () at /usr/local/src/pkg/src/main.c:821
chld = <optimized out>
chld_status = 139
any_chld_stopped = <optimized out>
memlog = <optimized out>
__func__ = "handle_sigs"
#12 0x000055dd96868aa4 in main_loop () at /usr/local/src/pkg/src/main.c:1988
i = <optimized out>
pid = <optimized out>
si = <optimized out>
si_desc = "udp receiver child=31 sock=172.23.42.3:9999\000\335U\000\000\000\260\312I\031\177\000\000\003\000\000\000\377\377\377\377\004\220\312\226\335U\000\000\004\000\000\000\031\177\000\000\003\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000Tue Feb \000\023&\252U\314\342\207:34 2024\005\000\000\000\000\000\000"
nrprocs = <optimized out>
woneinit = 1
error = <optimized out>
__func__ = "main_loop"
#13 0x000055dd96859ffc in main (argc=<optimized out>, argv=<optimized out>) at /usr/local/src/pkg/src/main.c:3212
cfg_stream = <optimized out>
c = <optimized out>
r = <optimized out>
tmp = 0x7ffe9d9b7db4 ""
tmp_len = 1274056464
port = 32537
proto = 1275323104
ahost = 0x0
aport = 0
options = 0x55dd96cac300 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 3377142042
rfd = <optimized out>
debug_save = <optimized out>
debug_flag = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
dont_fork_cnt = <optimized out>
n_lst = <optimized out>
p = <optimized out>
st = {st_dev = 194, st_ino = 570312884, st_nlink = 2, st_mode = 16872, st_uid = 101, st_gid = 101, __pad0 = 0, st_rdev = 0, st_size = 6, st_blksize = 4096,
st_blocks = 0, st_atim = {tv_sec = 1707216241, tv_nsec = 46870706}, st_mtim = {tv_sec = 1707216227, tv_nsec = 573144090}, st_ctim = {tv_sec = 1707216227,
tv_nsec = 573144090}, __glibc_reserved = {0, 0, 0}}
tbuf = '\000' <repeats 16 times>, '/' <repeats 16 times>, "\230\r", '\000' <repeats 14 times>, "`", '\000' <repeats 15 times>, "\001", '\000' <repeats 143 times>...
option_index = 12
__func__ = "main"
long_options = {{name = 0x55dd96cabfe2 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55dd96cb3dc8 "version", has_arg = 0, flag = 0x0, val = 118}, {
name = 0x55dd96cc3731 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55dd96cabfe7 "subst", has_arg = 1, flag = 0x0, val = 1025}, {
name = 0x55dd96cabfed "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55dd96cabff6 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {
name = 0x55dd96cac000 "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x55dd96cac00a "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {
name = 0x55dd96cac015 "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55dd96cac01e "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {
name = 0x55dd96cb3ee5 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55dd96cac029 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {
name = 0x55dd96cac033 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x55dd96cac03a "all-errors", has_arg = 0, flag = 0x0, val = 1035}, {name = 0x0,
has_arg = 0, flag = 0x0, val = 0}}
(gdb) info locals
del_next = <optimized out>
__func__ = "free_str_list_all"
(gdb) list
1104 in /usr/local/src/pkg/src/modules/pua_dialoginfo/pua_dialoginfo.c
```
#### 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).
-->
```
65(75) DEBUG: dialog [dlg_timer.c:232]: get_expired_dlgs(): start with tl=0x7f1941b1a900 tl->prev=0x7f1941a084d8 tl->next=0x7f1941a084d8 (45536602) at 45536603 and end with end=0x7f1941a084d8 end->prev=0x7f1941b1a900 end->next=0x7f1941b1a900
65(75) DEBUG: dialog [dlg_timer.c:237]: get_expired_dlgs(): getting tl=0x7f1941b1a900 tl->prev=0x7f1941a084d8 tl->next=0x7f1941a084d8 with 45536602
65(75) DEBUG: dialog [dlg_timer.c:243]: get_expired_dlgs(): end with tl=0x7f1941a084d8 tl->prev=0x7f1941b1a900 tl->next=0x7f1941b1a900 and d_timer->first.next->prev=(nil)
65(75) DEBUG: dialog [dlg_timer.c:280]: dlg_timer_routine(): tl=0x7f1941b1a900 next=(nil)
65(75) DEBUG: dialog [dlg_cb.c:267]: run_dlg_callbacks(): dialog=0x7f1941b1a8a0, type=64
65(75) DEBUG: pua_dialoginfo [pua_dialoginfo.c:395]: __dialog_sendpublish(): dialog over, from=sip:101@example.voismart.com
65(75) DEBUG: pua_dialoginfo [dialog_publish.c:410]: dialog_publish_multi(): CALLING dialog_publish for URI
65(75) DEBUG: <core> [core/parser/parse_uri.c:1389]: parse_uri(): bad uri, state 0 parsed: <> (4) / <> (28)
65(75) ERROR: pua_dialoginfo [dialog_publish.c:303]: dialog_publish(): failed to parse the PUBLISH R-URI
123(133) CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 133
123(133) DEBUG: <core> [core/tcp_main.c:3955]: handle_ser_child(): dead child 65, pid 75 (shutting down?)
123(133) DEBUG: <core> [core/io_wait.h:597]: io_watch_del(): DBG: io_watch_del (0x55dd96e1fba0, 133, -1, 0x0) fd_no=157 called
0(1) ALERT: <core> [main.c:791]: handle_sigs(): child process 75 exited by a signal 11
0(1) ALERT: <core> [main.c:795]: handle_sigs(): core was generated
0(1) INFO: <core> [main.c:818]: handle_sigs(): terminating due to SIGCHLD
2(12) INFO: <core> [main.c:874]: sig_usr(): signal 15 received
3(13) INFO: <core> [main.c:874]: sig_usr(): signal 15 received
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.7.4 (x86_64/linux) dc393e
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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: dc393e
compiled with gcc 11.4.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`)
-->
```
Linux c7a9e0ef942e 6.6.13-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 20 18:03:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
```
Running in a Docker container based on Ubuntu Jammy which builds kamailio from git tag 5.7.4.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3743
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3743(a)github.com>
some of the documentation contains \ which need escaping
<!-- 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
- [ ] 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/3824
-- Commit Summary --
* tools/kemi: escape docstrings when required
-- File Changes --
M misc/tools/kemi/python_mock/kemi_mock.py (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3824.patchhttps://github.com/kamailio/kamailio/pull/3824.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3824
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3824(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
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Hello, when I was testing the SMSC SMS business, I found that the SMS could not be forwarded by the SMSC when the characters were too long, approximately 117 characters. The issue was traced back to the smsops module, which has a limit on the length of the SMS, but it seems that it does not handle SMS segmentation. The error message returned is as follows. Could you please provide some suggestions and help?
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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.
-->
```
(paste your debugging data here)
```
#### Log Messages
```
2024-04-24T05:59:01.837950514Z 3(24) ERROR: <script>: SMS for "" (Valid: 0 )
2024-04-24T05:59:14.466167796Z 2(23) ERROR: <script>: 3GPP-SMS: MESSAGE (sip:+8618107550088@ims.mnc011.mcc460.3gppnetwork.org (172.22.0.20:6060) to tel:+8613800138000, bnecb4LQJ(a)10.46.2.1)
2024-04-24T05:59:14.466173859Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466175929Z 2(23) ERROR: smsops [smsops_impl.c:1320]: pv_get_sms(): Error getting/decoding RP-Data from request!
2024-04-24T05:59:14.466191554Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466194545Z 2(23) ERROR: smsops [smsops_impl.c:1320]: pv_get_sms(): Error getting/decoding RP-Data from request!
2024-04-24T05:59:14.466196517Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466198406Z 2(23) ERROR: smsops [smsops_impl.c:1320]: pv_get_sms(): Error getting/decoding RP-Data from request!
2024-04-24T05:59:14.466200311Z 2(23) ERROR: <script>: SMS for "" (Valid: )
2024-04-24T05:59:14.466255812Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466276249Z 2(23) ERROR: smsops [smsops_impl.c:1903]: isRPDATA(): Error getting/decoding RP-Data from request!
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
```
![image](https://github.com/kamailio/kamailio/assets/152272255/808e65ce-9763-4056-9924-77122f6d9c25)
### 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`
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 4fb8ac -dirty
compiled on 03:11:49 Apr 24 2024 with gcc 9.4.0
```
version: kamailio 5.9.0-dev0 (x86_64/linux) 4fb8ac-dirty
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
```
* **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`)
-->
```
Linux sder 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3822
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3822(a)github.com>
### Description
We are using Kamailio 5.7.4 on Debian 12 (from http://deb.kamailio.org/kamailio57) with rtpengine as an Edgeproxy for our clients. The instance terminates SIP/TLS (with Cliencertificates) and forwards the SIP Traffic to internal systems.
After some days we are getting errors like this
`tls_complete_init(): tls: ssl bug #1491 workaround: not enough memory for safe operation: shm=7318616 threshold1=8912896`
First we thought Kamailio just doesnt have enough memory, so we doubled it..
But after some days the Logmessage (and Userissues) occured again.
So we monitored the shmmem statistics and found that used and max_used are constantly growing til it reaches the limit.
As i mentioned we are using client-certificates and so we are also using the CRL feature.
We do have a systemd-timer which fetches the CRL every hour and runs 'kamcmd tls.reload' when finished.
Our tls.cfg looks like this:
```
[server:default]
method = TLSv1.2+
private_key = /etc/letsencrypt/live/hostname.de/privkey.pem
certificate = /etc/letsencrypt/live/hostname.de/fullchain.pem
ca_list = /etc/kamailio/ca_list.pem
ca_path = /etc/kamailio/ca_list.pem
crl = /etc/kamailio/combined.crl.pem
verify_certificate = yes
require_certificate = yes
[client:default]
verify_certificate = yes
require_certificate = yes
```
After testing a bit we found that every time tls.reload is executed Kamailio consumes a bit more memory which eventually leads to all the memory being consumed which leads to issues for our users.
See following example:
```
[0][root@edgar-dev:~]# while true ; do /usr/sbin/kamcmd tls.reload ; /usr/sbin/kamcmd core.shmmem ; sleep 1 ; done
Ok. TLS configuration reloaded.
{
total: 268435456
free: 223001520
used: 41352552
real_used: 45433936
max_used: 45445968
fragments: 73
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 222377960
used: 41975592
real_used: 46057496
max_used: 46069232
fragments: 78
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 221748664
used: 42604992
real_used: 46686792
max_used: 46698080
fragments: 77
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 221110832
used: 43242408
real_used: 47324624
max_used: 47335608
fragments: 81
}
^C
[130][root@edgar-dev:~]#
```
### Troubleshooting
#### Reproduction
Everytime tls.reload is called the memory consumptions grows..
#### 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.
-->
```
If you let me know what would be interesting for tracking this down, i am happy to provide logs/debugging data!
```
#### 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).
-->
```
If you let me know what would be interesting for tracking this down, i am happy to provide logs/debugging data!
```
#### SIP Traffic
SIP doesnt seem to be relevant here
### Possible Solutions
Calling tls.reload less often or restart kamailio before memory is consumed ;)
### Additional Information
```
version: kamailio 5.7.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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 12.2.0
```
* **Operating System**:
```
* Debian GNU/Linux 12 (bookworm)
* Linux edgar-dev 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3823
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3823(a)github.com>