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.

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>
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>
After the transaction was suspended, 1st user registered, got INVITE message, there is 2nd user wakes up and send REGISTER.
Kamailio check if transaction suspended (for 2nd user, it is not suspended anymore), and checks if there is stored transaction.
So, for 2nd user we have stored transaction, then it should append new branch. ts_append failed.
if ($var(suspended) == 0) {
if ($var(stored)) {
# no suspended INVITE (i.e. there was at least one
# registered contact for target) and 'stored' set
# (i.e. ongoing transaction) -> this newly just
# registered contact needs alerting.
ts_append("location", "sip:$avp(extension)@LOCALVIRTUALIP");
xinfo("appending branches for sip:$avp(extension)@LOCALVIRTUALIP, result $rc");
} else {
xinfo("no suspended transactions for $tu");
}
return;
}
Mar 10 21:07:11 stage-webrtc-kama-01 /usr/sbin/kamailio[4067482]: INFO: [t3jutj5k1na4eir1o8pvk9 REGISTER WAKE_SUSPENDED:1:1339] <script>: -----------122583d4102d400d8565c6f48d217b8d
Mar 10 21:07:11 stage-webrtc-kama-01 /usr/sbin/kamailio[4067482]: INFO: [t3jutj5k1na4eir1o8pvk9 REGISTER WAKE_SUSPENDED:1:1348] <script>: var(suspended)=0, tsilo=>suspended::122583d4102d400d8565c6f48d217b8d
Mar 10 21:07:11 stage-webrtc-kama-01 /usr/sbin/kamailio[4067482]: INFO: [t3jutj5k1na4eir1o8pvk9 REGISTER WAKE_SUSPENDED:1:1349] <script>: var(stored)=1, tsilo=>stored::122583d4102d400d8565c6f48d217b8d
Mar 10 21:07:11 stage-webrtc-kama-01 /usr/sbin/kamailio[4067482]: ERROR: [t3jutj5k1na4eir1o8pvk9 REGISTER WAKE_SUSPENDED:1:1357] tsilo [ts_append.c:152]: ts_append_to(): transaction 11743:1310842517: error updating dset (-1)
Mar 10 21:07:11 stage-webrtc-kama-01 /usr/sbin/kamailio[4067482]: INFO: [t3jutj5k1na4eir1o8pvk9 REGISTER WAKE_SUSPENDED:1:1359] <script>: appending branches for sip:1000@10.160.201.190, result 1
At this moment we have active transaction
`{
cell: 0x7f313d43cda8
tindex: 11743
tlabel: 1310842517
method: INVITE
from: From: "9988" <sip:9988@10.156.0.6>;tag=as081c0936
to: To: <sip:1000@10.160.201.190:5070>
callid: Call-ID: 66d9dace125df36915783fb379f4e3dd@10.156.0.6:5060
cseq: CSeq: 102
uas_request: yes
tflags: 69
outgoings: 3
ref_count: 1
lifetime: 5402832
}
`
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3782
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3782(a)github.com>
### Description
Event routes that are executed without a real SIP message available use the default "fake SIP message". The fake message has a source IPv4 address of 1.0.0.127 which belongs to CloudFlare (1.0.0.0/24).. and this led us to believe that traffic is coming from CF but could not find the messages on tcpdumps or HEP exports. Had a bit of a wild goose chase there trying to find the source. I believe the original intention has been to use 127.0.0.1 loopback address but the bytes are reversed at:
https://github.com/kamailio/kamailio/blob/master/src/core/fmsg.c#L78
It would be best to change this address to well ANYTHING that doesn't imply CloudFlare is pinging you 😂
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3817
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3817(a)github.com>
kemi_mock.py can now optionally consume documentation information generated by the vscode-kamailio-hover project
<!-- 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
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3818
-- Commit Summary --
* tools/kemi: add dockstrings to the mocking
-- File Changes --
M misc/tools/kemi/python_mock/README.md (15)
M misc/tools/kemi/python_mock/kemi_mock.py (31)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3818.patchhttps://github.com/kamailio/kamailio/pull/3818.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3818
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3818(a)github.com>
Module: kamailio
Branch: master
Commit: 6b29df73115682424daf7b276d0138f004e274f7
URL: https://github.com/kamailio/kamailio/commit/6b29df73115682424daf7b276d0138f…
Author: tsearle <torrey.searle(a)wavecrest.com>
Committer: GitHub <noreply(a)github.com>
Date: 2024-04-22T12:53:48+02:00
tools/kemi: add dockstrings to the mocking (#3818)
kemi_mock.py can now optionally consume documentation information
generated by the vscode-kamailio-hover project
---
Modified: misc/tools/kemi/python_mock/README.md
Modified: misc/tools/kemi/python_mock/kemi_mock.py
---
Diff: https://github.com/kamailio/kamailio/commit/6b29df73115682424daf7b276d0138f…
Patch: https://github.com/kamailio/kamailio/commit/6b29df73115682424daf7b276d0138f…
---
diff --git a/misc/tools/kemi/python_mock/README.md b/misc/tools/kemi/python_mock/README.md
index 5e72e738c58..385cbd5656a 100644
--- a/misc/tools/kemi/python_mock/README.md
+++ b/misc/tools/kemi/python_mock/README.md
@@ -2,7 +2,7 @@
Generate a mocking framework base on the output of app_python.api_list
-Usage:
+### Usage:
```
/usr/sbin/kamctl rpc app_python.api_list > api.json
./kemi_mock.py api.json > KSR.py
@@ -15,6 +15,19 @@ the Union type add the --no-union flag
./kemi_mock.py api.json --no-union > KSR.py
```
+### Usage with Documentation:
+run the generate.py from the following project
+
+https://github.com/braams/vscode-kamailio-hover
+
+this creates a modules.json file in a tmp directory. This file can be used to generate the KSR.py file with documentation
+
+pass the modules.json as a 2nd parameter to kemi_mock.py
+```
+./kemi_mock.py api.json modules.json > KSR.py
+```
+
+## Mocking
Return values can be injected through the dictionary \_mock\_data
```python
diff --git a/misc/tools/kemi/python_mock/kemi_mock.py b/misc/tools/kemi/python_mock/kemi_mock.py
index 48a73efa232..145fcb34b3a 100755
--- a/misc/tools/kemi/python_mock/kemi_mock.py
+++ b/misc/tools/kemi/python_mock/kemi_mock.py
@@ -113,21 +113,41 @@ def printFunction(module_name, func, indent):
else:
print(prefix + "def " + func['name'] +"("+params+"):")
+ generate_function_doc(module_name, func, prefix)
+
print(prefix + "\tprint(\"Calling " + log_format_params + "\" % "+log_params+")")
printMocReturn(module_name, func, indent+1)
print("")
+def generate_function_doc(module_name, func, prefix):
+ if documentation is not None and module_name in documentation:
+ function_parts = func['name'].split("_")
+ for i in range(len(function_parts), 0, -1):
+ function_prefix = "_".join(function_parts[:i])
+ if function_prefix in documentation[module_name]["functions"]:
+ print(prefix + "\t\"\"\"")
+ documentation_lines = documentation[module_name]["functions"][function_prefix].split("\n")
+ for line in documentation_lines:
+ print(prefix + "\t" + line)
+ print(prefix + "\t\"\"\"")
+ break
+
+
classes = defaultdict(list)
if len(sys.argv) < 2:
print("Please specify the json file to parse")
sys.exit(-1)
+documentation = None
if len(sys.argv) > 2:
for i in range(2,len(sys.argv)):
if sys.argv[i] == "--no-union":
noUnion = True
+ else:
+ with open(sys.argv[i]) as f:
+ documentation = json.load(f)
if not noUnion:
print("from typing import Union")
@@ -193,12 +213,23 @@ def printFunction(module_name, func, indent):
print("")
printFunction('', func, 0)
+
+def document_module(module_name):
+ if documentation is not None and module_name in documentation:
+ print("\"\"\"")
+ documentation_lines = documentation[module_name]["overview"].split("\n")
+ for line in documentation_lines:
+ print("" + line)
+ print("\"\"\"")
+
+
for module_name in classes.keys():
if module_name != "":
if module_name in reserved_keywords:
print("setattr(sys.modules[__name__], '" + module_name + "', " + module_name.capitalize() + "())")
else:
print(module_name + " = "+module_name.capitalize()+"()")
+ document_module(module_name)
print("")
<!-- 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)
- [ ] 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 -->
When inserting into the database the AOR is split at the @ sign and if there is no @ sign in the AOR only the domain part is filled and the user part is left empty.
But for deleting this is not done and the query failed to be executed and the AOR is not deleted. This PR add this behaviour of only comparing against the domain part if the AOR doesn't contain a @ sign.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3815
-- Commit Summary --
* usrloc: check on db delete the return value of memchr
-- File Changes --
M src/modules/usrloc/urecord.c (14)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3815.patchhttps://github.com/kamailio/kamailio/pull/3815.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3815
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3815(a)github.com>
Module: kamailio
Branch: master
Commit: 49276a1f43b1a3bf4a8d681888df964000360c79
URL: https://github.com/kamailio/kamailio/commit/49276a1f43b1a3bf4a8d681888df964…
Author: Rick Barenthin <rick(a)ng-voice.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-04-20T06:35:51+02:00
usrloc: check on db delete the return value of memchr
When inserting into the database the AOR is split at the @ sign and
if there is no @ sign in the AOR only the domain part is filled and the
user part is left empty.
But for deleting this is not done and the query failed to be executed
and the AOR is not deleted. This PR add this behaviour of only comparing against the
domain part if the AOR doesn't contain a @ sign.
---
Modified: src/modules/usrloc/urecord.c
---
Diff: https://github.com/kamailio/kamailio/commit/49276a1f43b1a3bf4a8d681888df964…
Patch: https://github.com/kamailio/kamailio/commit/49276a1f43b1a3bf4a8d681888df964…
---
diff --git a/src/modules/usrloc/urecord.c b/src/modules/usrloc/urecord.c
index e027affc8aa..3c394a24a10 100644
--- a/src/modules/usrloc/urecord.c
+++ b/src/modules/usrloc/urecord.c
@@ -491,13 +491,17 @@ int db_delete_urecord(urecord_t *_r)
vals[0].val.str_val.len = _r->aor.len;
if(ul_use_domain) {
- dom = memchr(_r->aor.s, '@', _r->aor.len);
- vals[0].val.str_val.len = dom - _r->aor.s;
-
vals[1].type = DB1_STR;
vals[1].nul = 0;
- vals[1].val.str_val.s = dom + 1;
- vals[1].val.str_val.len = _r->aor.s + _r->aor.len - dom - 1;
+ dom = memchr(_r->aor.s, '@', _r->aor.len);
+ if(dom == 0) {
+ vals[0].val.str_val.len = 0;
+ vals[1].val.str_val = _r->aor;
+ } else {
+ vals[0].val.str_val.len = dom - _r->aor.s;
+ vals[1].val.str_val.s = dom + 1;
+ vals[1].val.str_val.len = _r->aor.s + _r->aor.len - dom - 1;
+ }
}
if(ul_dbf.use_table(ul_dbh, _r->domain) < 0) {
I want kamailio use User-Agent header, not Server head
My setup is as follows: kamailio.cfg
server_signature=no
user_agent_header="User-Agent: carrierroute-kam"
the result is :
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP xxx
From: xxxxxxtag=N856ZmNXa4S6D
To: xxx
Call-ID: 5ab0
CSeq: 82194 INVITE
Content-Length: 0
**not have User-Agent header**
please help me,How to make it appear the User-Agent field? thank you
version: kamailio 5.7.0 (x86_64/linux) f1e91d
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3816
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3816(a)github.com>
Module: kamailio
Branch: master
Commit: 0a28a93c6e060081267dc686e342d45ef03358e7
URL: https://github.com/kamailio/kamailio/commit/0a28a93c6e060081267dc686e342d45…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-04-16T14:42:20+02:00
tcp_main: Update comment docs
---
Modified: src/core/tcp_main.c
---
Diff: https://github.com/kamailio/kamailio/commit/0a28a93c6e060081267dc686e342d45…
Patch: https://github.com/kamailio/kamailio/commit/0a28a93c6e060081267dc686e342d45…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 0ea1b541ea6..e3323736cc0 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -1697,8 +1697,8 @@ void tcpconn_rm(struct tcp_connection *c)
/* finds a connection, if id=0 uses the ip addr, port, local_ip and local port
* (host byte order) and tries to find the connection that matches all of
- * them. Wild cards can be used for local_ip and local_port (a 0 filled
- * ip address and/or a 0 local port).
+ * them. Wild cards can be used for local_ip, local_port and proto (a 0 filled
+ * ip address and/or a 0 local port and/or PROTO_NONE).
* WARNING: unprotected (locks) use tcpconn_get unless you really
* know what you are doing */
struct tcp_connection *_tcpconn_find(int id, struct ip_addr *ip, int port,
@@ -1754,7 +1754,7 @@ struct tcp_connection *_tcpconn_find(int id, struct ip_addr *ip, int port,
/**
- * find if a tcp connection exits by id or remote+local address/port
+ * find if a tcp connection exits by id or remote+local address/port and protocol
* - return: 1 if found; 0 if not found
*/
int tcpconn_exists(int conn_id, ip_addr_t *peer_ip, int peer_port,
@@ -1774,6 +1774,7 @@ int tcpconn_exists(int conn_id, ip_addr_t *peer_ip, int peer_port,
/* TCP connection find with locks and timeout
* - local_addr contains the desired local ip:port. If null any local address
* will be used. IN*ADDR_ANY or 0 port are wild cards.
+ * - proto is the protocol to match (PROTO_NONE for any)
* - try_local_port makes the search use it first, instead of port from local_addr
* If found, the connection's reference counter will be incremented, you might
* want to decrement it after use.
<!-- 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
We noticed that configuration option tcp_accept_iplimit was included in newer kamailio versions (most notably 5.7.4), and it was a breaking change for us. Added sample configuration value in /etc/kamailio.cfg file - already tested in our production deployment.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3792
-- Commit Summary --
* tcp/docs: Added tcp_accept_iplimit config sample
-- File Changes --
M etc/kamailio.cfg (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3792.patchhttps://github.com/kamailio/kamailio/pull/3792.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3792
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3792(a)github.com>
#### 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
- [x] Related to issue #3777
#### Description
<!-- Describe your changes in detail -->
- freed request.s after sending request to websocket in send_rtpp_command method.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3813
-- Commit Summary --
* rtpengine: fix pkg mem leak in send_rtpp_command()
-- File Changes --
M src/modules/rtpengine/rtpengine.c (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3813.patchhttps://github.com/kamailio/kamailio/pull/3813.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3813
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3813(a)github.com>
Hello,
there is some planned work on the data center infrastructure hosting
kamailio.org server that is going to affect briefly the web server (web
site, wiki) and the mailing lists.
The downtime is expected to be 10-15 minutes around 1:00am Western
Europe time (CEST / GMT+2), but if it takes longer or repeats, be
patient for a while.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
### Description
Hello. Probably I'm doing something wrong but I can't get rid of **received** parameter in the **Via** header in responses from kamailio by websocket transport.
According [RFC 7118](https://datatracker.ietf.org/doc/rfc7118/):
``
When a SIP WebSocket Server receives a request, it MAY decide not
to add a "received" parameter to the top Via header. Therefore,
SIP WebSocket Clients MUST accept responses without such a
parameter in the top Via header regardless of whether the **Via**
"sent-by" field contains a domain name.
``
### Expected behavior
For responses to websocket transport have a way to not add **received** parameter in **Via** header
#### Actual observed behavior
Responses to OPTION or REGISTER methods trough websocket got **received** containing IP we want to not show to the end users.
### Possible Solutions
maybe add a param in **tm** module or something
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.1 (x86_64/linux)
```
and
```
kamailio 5.6.1 (x86_64/linux) b36a13
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3515
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3515(a)github.com>
Module: kamailio
Branch: master
Commit: 94b9cd5d5ffafde86fbcbede2d9a018fc616b6b1
URL: https://github.com/kamailio/kamailio/commit/94b9cd5d5ffafde86fbcbede2d9a018…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-04-15T11:01:29+02:00
modules: readme files regenerated - cfgutils ... [skip ci]
---
Modified: src/modules/cfgutils/README
---
Diff: https://github.com/kamailio/kamailio/commit/94b9cd5d5ffafde86fbcbede2d9a018…
Patch: https://github.com/kamailio/kamailio/commit/94b9cd5d5ffafde86fbcbede2d9a018…
---
diff --git a/src/modules/cfgutils/README b/src/modules/cfgutils/README
index b7c8075fad9..cb6251b6719 100644
--- a/src/modules/cfgutils/README
+++ b/src/modules/cfgutils/README
@@ -65,9 +65,9 @@ Daniel-Constantin Mierla
4.12. set_gflag(flag)
4.13. reset_gflag(flag)
4.14. is_gflag(flag)
- 4.15. lock(key)
- 4.16. trylock(key)
- 4.17. unlock(key)
+ 4.15. lock(key [, key2])
+ 4.16. trylock(key [, key2])
+ 4.17. unlock(key [, key2])
4.18. check_route_exists(route)
4.19. route_if_exists(route)
4.20. core_hash(string1, string2, size)
@@ -154,9 +154,9 @@ Chapter 1. Admin Guide
4.12. set_gflag(flag)
4.13. reset_gflag(flag)
4.14. is_gflag(flag)
- 4.15. lock(key)
- 4.16. trylock(key)
- 4.17. unlock(key)
+ 4.15. lock(key [, key2])
+ 4.16. trylock(key [, key2])
+ 4.17. unlock(key [, key2])
4.18. check_route_exists(route)
4.19. route_if_exists(route)
4.20. core_hash(string1, string2, size)
@@ -304,9 +304,9 @@ modparam("cfgutils", "lock_set_size", 4)
4.12. set_gflag(flag)
4.13. reset_gflag(flag)
4.14. is_gflag(flag)
- 4.15. lock(key)
- 4.16. trylock(key)
- 4.17. unlock(key)
+ 4.15. lock(key [, key2])
+ 4.16. trylock(key [, key2])
+ 4.17. unlock(key [, key2])
4.18. check_route_exists(route)
4.19. route_if_exists(route)
4.20. core_hash(string1, string2, size)
@@ -506,16 +506,18 @@ if(is_gflag("4"))
};
...
-4.15. lock(key)
+4.15. lock(key [, key2])
Lock the key. Can be used to synchronize operations in config file, a
- hash id is computed over the key and appropriate lock is set in the
+ hash id is computed over the keys and appropriate lock is set in the
lock array controlled by parameter "lock_set_size". Do not use lock()
after another lock() unless you are sure the keys hit different array
entries.
���key��� can be static string or string with PVs.
+ ���key2��� is optional and can be static string or string with PVs.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
@@ -524,13 +526,15 @@ if(is_gflag("4"))
lock("$rU");
...
-4.16. trylock(key)
+4.16. trylock(key [, key2])
Try to lock the key. If the lock can not be obtained (possibly already
locked), the function returns an error and script execution continues.
���key��� can be static string or string with PVs.
+ ���key2��� is optional and can be static string or string with PVs.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
@@ -542,12 +546,14 @@ if (trylock("$rU")) {
}
...
-4.17. unlock(key)
+4.17. unlock(key [, key2])
Unlock the key.
���key��� can be static string or string with PVs.
+ ���key2��� is optional and can be static string or string with PVs.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
#### 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
#### Description
expose in config via cfgutils ``core_case_hash`` optional second string key for hashing
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3808
-- Commit Summary --
* cfgutils: expose optional second string key for hashing at locks
* cfgutils: document second optional string for hashing on lock functions family [skip ci]
* app_lua_sr: support second str for cfgutils lock
-- File Changes --
M src/modules/app_lua_sr/app_lua_sr_exp.c (30)
M src/modules/cfgutils/api.h (4)
M src/modules/cfgutils/cfgutils.c (103)
M src/modules/cfgutils/doc/cfgutils_admin.xml (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3808.patchhttps://github.com/kamailio/kamailio/pull/3808.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3808
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3808(a)github.com>
Module: kamailio
Branch: master
Commit: 235591cd704529589bbde700b6232ac55281d071
URL: https://github.com/kamailio/kamailio/commit/235591cd704529589bbde700b6232ac…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-04-15T10:50:26+02:00
cfgutils: document second optional string for hashing on lock functions family [skip ci]
---
Modified: src/modules/cfgutils/doc/cfgutils_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/235591cd704529589bbde700b6232ac…
Patch: https://github.com/kamailio/kamailio/commit/235591cd704529589bbde700b6232ac…
---
diff --git a/src/modules/cfgutils/doc/cfgutils_admin.xml b/src/modules/cfgutils/doc/cfgutils_admin.xml
index 1cab1284fd5..35721e31c6d 100644
--- a/src/modules/cfgutils/doc/cfgutils_admin.xml
+++ b/src/modules/cfgutils/doc/cfgutils_admin.xml
@@ -485,10 +485,10 @@ if(is_gflag("4"))
</example>
</section>
<section id="cfgutils.f.lock">
- <title><function moreinfo="none">lock(key)</function></title>
+ <title><function moreinfo="none">lock(key [, key2])</function></title>
<para>
Lock the key. Can be used to synchronize operations in config file,
- a hash id is computed over the key and appropriate lock is set in the
+ a hash id is computed over the keys and appropriate lock is set in the
lock array controlled by parameter "lock_set_size". Do not use lock()
after another lock() unless you are sure the keys hit different array
entries.
@@ -497,6 +497,9 @@ if(is_gflag("4"))
<quote>key</quote> can be static string or string with PVs.
</para>
<para>
+ <quote>key2</quote> is optional and can be static string or string with PVs.
+ </para>
+ <para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
</para>
@@ -510,7 +513,7 @@ lock("$rU");
</example>
</section>
<section id="cfgutils.f.trylock">
- <title><function moreinfo="none">trylock(key)</function></title>
+ <title><function moreinfo="none">trylock(key [, key2])</function></title>
<para>
Try to lock the key. If the lock can not be obtained (possibly already locked),
the function returns an error and script execution continues.
@@ -519,6 +522,9 @@ lock("$rU");
<quote>key</quote> can be static string or string with PVs.
</para>
<para>
+ <quote>key2</quote> is optional and can be static string or string with PVs.
+ </para>
+ <para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
</para>
@@ -535,7 +541,7 @@ if (trylock("$rU")) {
</example>
</section>
<section id="cfgutils.f.unlock">
- <title><function moreinfo="none">unlock(key)</function></title>
+ <title><function moreinfo="none">unlock(key [, key2])</function></title>
<para>
Unlock the key.
</para>
@@ -543,6 +549,9 @@ if (trylock("$rU")) {
<quote>key</quote> can be static string or string with PVs.
</para>
<para>
+ <quote>key2</quote> is optional and can be static string or string with PVs.
+ </para>
+ <para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
</para>
@@ -854,4 +863,3 @@ if (rand_event()) {
</section>
</section>
</chapter>
-