Module: kamailio
Branch: master
Commit: 170067e633ef32ea7b17adad46fdfe2c85fadda0
URL: https://github.com/kamailio/kamailio/commit/170067e633ef32ea7b17adad46fdfe2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-08-12T13:31:15+02:00
xhttp: note about available variables during http request processing
---
Modified: src/modules/xhttp/doc/xhttp_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/170067e633ef32ea7b17adad46fdfe2…
Patch: https://github.com/kamailio/kamailio/commit/170067e633ef32ea7b17adad46fdfe2…
---
diff --git a/src/modules/xhttp/doc/xhttp_admin.xml b/src/modules/xhttp/doc/xhttp_admin.xml
index f0e6d3fdeb8..1c7d29a051a 100644
--- a/src/modules/xhttp/doc/xhttp_admin.xml
+++ b/src/modules/xhttp/doc/xhttp_admin.xml
@@ -22,7 +22,7 @@
Via header.
</para>
<para>
- The <module>xmlrpc</module> module uses the same concept.
+ The xmlrpc module uses the same concept.
The xHTTP module offers a generic way of handling the <acronym>HTTP</acronym>
protocol, by calling <emphasis>event_route[xhttp:request]</emphasis>
in your config. You can check the HTTP URL via the config variable
@@ -228,7 +228,10 @@ event_route[xhttp:request] {
<function moreinfo="none">xhttp:request</function>
</title>
<para>
- The event route is executed when a new HTTP request is received.
+ The event route is executed when a new HTTP request is received. Most
+ of the variables related to a SIP request can be used inside this event
+ route to get HTTP request attributes (e.g., $si - source IP, $hdr(X)
+ - body of header X, $rm - request method, $rb - request body, ...).
</para>
<programlisting format="linespecific">
...
#### 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
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3497
-- Commit Summary --
* sipcapture: use memcpy instead of strncpy for coherence
* rtpproxy: use memcpy instead of strcpy for coherence
-- File Changes --
M src/modules/rtpproxy/rtpproxy.c (40)
M src/modules/sipcapture/sipcapture.c (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3497.patchhttps://github.com/kamailio/kamailio/pull/3497.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3497
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3497(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.
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.
-->
### 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
<!--
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).
-->
```
(paste your log messages here)
```
#### 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).
-->
```
(paste your sip traffic here)
```
### 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`
```
(paste your output here)
```
* **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`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3533
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3533(a)github.com>
Hello, I have a question for [1] config function.
Can I extend it to work with INTs too? e.g. if pv not NULL and INT flag, return 1. This would help, because one won't need to know the type of the pvar beforehand, for using this function.
Or is it meant to be used only with string pv only?
[1] https://www.kamailio.org/docs/modules/devel/modules/pv.html#pv.f.not_empty
Thank you,
Stefan
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3520
-- Commit Summary --
* docs/ : typos
* etc/ typos
-- File Changes --
M INSTALL (2)
M doc/docbook/catalog.xml (2)
M doc/docbook/dep.xsl (4)
M doc/docbook/entities.xml (10)
M doc/docbook/html.chunked.xsl (2)
M doc/doxygen/main.dox (2)
M doc/man/kamailio.cfg.5 (2)
M doc/misc/HISTORY (10)
M doc/misc/NEWS (58)
M doc/misc/TODO (10)
M doc/misc/cvs-commit-rules.txt (6)
M doc/stylesheets/dbschema_k/catalog.xml (2)
M doc/stylesheets/dbschema_k/xsl/db_berkeley.xsl (4)
M doc/stylesheets/dbschema_k/xsl/db_redis.xsl (4)
M doc/stylesheets/dbschema_k/xsl/dbtext.xsl (4)
M doc/stylesheets/dbschema_k/xsl/mysql.xsl (2)
M doc/stylesheets/dbschema_k/xsl/pi_framework_mod.xsl (2)
M doc/tutorials/presence/cfg/ps.cfg (2)
M doc/tutorials/presence/install.xml (2)
M doc/tutorials/presence/intro.xml (4)
M doc/tutorials/serdev/routing_engine.xml (2)
M doc/tutorials/seruser/otherapps.xml (2)
M etc/kamailio.cfg (4)
M etc/sip-router.cfg (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3520.patchhttps://github.com/kamailio/kamailio/pull/3520.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3520
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3520(a)github.com>
Module: kamailio
Branch: master
Commit: 6e9335ff2245596b74bc1c749d1e7805bf186f02
URL: https://github.com/kamailio/kamailio/commit/6e9335ff2245596b74bc1c749d1e780…
Author: �������������������� �������������������������������� <git-dpa(a)aegee.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-08-07T15:32:56+02:00
etc/ typos
---
Modified: etc/kamailio.cfg
Modified: etc/sip-router.cfg
---
Diff: https://github.com/kamailio/kamailio/commit/6e9335ff2245596b74bc1c749d1e780…
Patch: https://github.com/kamailio/kamailio/commit/6e9335ff2245596b74bc1c749d1e780…
---
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 68493736d41..715c289af1e 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -227,7 +227,7 @@ enable_sctp=no
####### Custom Parameters #########
-/* These parameters can be modified runtime via RPC interface
+/* These parameters can be modified at runtime via RPC interface
* - see the documentation of 'cfg_rpc' module.
*
* Format: group.id = value 'desc' description
@@ -389,7 +389,7 @@ modparam("registrar", "path_mode", 0)
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
-/* by default ww do not adjust the direct of the sequential requests.
+/* by default we do not adjust the direct of the sequential requests.
* if you enable this parameter, be sure the enable "append_fromtag"
* in "rr" module */
modparam("acc", "detect_direction", 0)
diff --git a/etc/sip-router.cfg b/etc/sip-router.cfg
index 0390ef7ec57..8669ea63d79 100644
--- a/etc/sip-router.cfg
+++ b/etc/sip-router.cfg
@@ -1,7 +1,7 @@
#
# $Id$
#
-# Example configuration file (simpler then ser-oob.cfg, but more
+# Example configuration file (simpler than ser-oob.cfg, but more
# complex then ser-basic.cfg).
#
# First start SER sample config script with:
@@ -73,7 +73,7 @@ rev_dns=no # (cmd. line: -R)
#group=ser
#disable_core=yes #disables core dumping
#open_fd_limit=1024 # sets the open file descriptors limit
-#mhomed=yes # usefull for multihomed hosts, small performance penalty
+#mhomed=yes # useful for multihomed hosts, small performance penalty
#disable_tcp=yes
#tcp_accept_aliases=yes # accepts the tcp alias via option (see NEWS)
sip_warning=yes
@@ -172,7 +172,7 @@ modparam("ctl", "binrpc", "tcp:127.0.0.1:2046")
# failed transactions (=negative responses) should be logged to
modparam("acc_db", "failed_transactions", 1)
-# comment the next line if you dont want to have accounting to DB
+# comment the next line if you don't want to have accounting to DB
modparam("acc_db", "log_flag", "FLAG_ACC")
# -- tm params --
@@ -197,7 +197,7 @@ modparam("tls", "private_key", "ser-selfsigned.key")
# -- xmlrpc params --
-# using a sub-route from the module is a lot safer then relying on the
+# using a sub-route from the module is a lot safer than relying on the
# request method to distinguish HTTP from SIP
modparam("xmlrpc", "route", "RPC");
@@ -358,8 +358,8 @@ route[RR]
# particularly good if upstream and downstream entities
# use different transport protocol
- # if the inital INVITE got the ACC flag store this in
- # an RR AVP cookie. this is more for demonstration purpose
+ # if the initial INVITE got the ACC flag store this in
+ # an RR AVP cookie. This is more for demonstration purpose
if (isflagset(FLAG_ACC)) {
$account = "yes";
setavpflag($account, "dialog_cookie");
@@ -377,7 +377,7 @@ route[DOMAIN]
# check if the callee is at a local domain
lookup_domain("$td", "@ruri.host");
- # we dont know the domain of the caller and also not
+ # we don't know the domain of the caller and also not
# the domain of the callee -> somone uses our proxy as
# a relay
if (strempty($t.did) && strempty($f.did)) {
@@ -528,7 +528,7 @@ route[INBOUND]
if (lookup_contacts("location")) {
append_hf("P-hint: usrloc applied\r\n");
- # we set the TM module timers according to the prefences
+ # we set the TM module timers according to the preferences
# of the callee (avoid too long ringing of his phones)
# Note1: timer values have to be in ms now!
# Note2: this makes even more sense if you switch to a voicemail
Hello,
(Adding sr-dev to CC)
This looks indeed a bit strange. Do you get any error messages in the log? In which process you are freeing the memory, one of the worker processes or the RPC process?
You could also try to use another memory manager to see if you get better performance. There is a command line parameter to choose one during startup.
Cheers,
Henning
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>
From: Chaigneau, Nicolas <nicolas.chaigneau(a)capgemini.com>
Sent: Wednesday, January 18, 2023 6:49 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: [SR-Users] Performances issue when freeing shared memory in custom module (Kamailio 5.5.2)
Hello,
I'm encountering performance issues with Kamailio (5.5.2).
I'm using a custom Kamailio module that loads routing data in memory, using Kamailio shared memory.
This routing data is very large. It can be fully reloaded through a Kamailio RPC command (which is done once each day).
When reloading, two sets of data are maintained, one "loading" and another "current" (the latter being used to handle SIP requests).
When loading of the new data is finished, it is swapped to "current". Then, memory of the old (now unused) data is freed.
I've noticed that when Kamailio is freeing the old data, there is a very significant performance impact on SIP requests.
This is surprising to me, because the SIP requests do not use this old data.
This is not a CPU issue, idle CPU% is at about 99% at that moment.
I'm using the following functions :
- shm_mallocxz
- shm_free
From what I understand, shm_free is actually "qm_shm_free" defined in "src\core\mem\q_malloc.c" (the default shared memory manager being "qm").
I've noticed that there is also a variant shm_free_unsafe ("qm_free"), which does not perform locking.
I'm wondering if the lock could be the cause of my performances issues ?
(But I'm not sure how this could be possible, because although the SIP requests need to access the shared memory allocated, they do not use directly the functions from the share memory manager.)
If the performances issues are causes by the lock, could I use the unsafe version "safely" ? (considering that it is guaranteed that the old data cannot be used by anyone else)
Thanks for your help.
Regards,
Nicolas.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
**Description**
We are using ims_charging module and Freediameter as diameter server for billing process....recently we faced one issue...For Initial **INVITEs** kamailio sending **CCR request (INITIAL_REQUEST)** to **diameter server** but if we receive Immediate **CANCLE** for the **INVITE**, kamailio sending **CCR request ( TERMINATE_REQUEST )** without waiting for the **CCR request (INITIAL_REQUEST) response** from the **Diameter server.**..
**Expected behavior**
Kamailio has to send **CCR request ( TERMINATE_REQUEST )** after getting the **response** from the **INITIAL_REQUEST.**
**Additional Info**
kamailio server : 4.2
platform : linux
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2143
#### 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
- [x] Related to issue #3502
#### Description
From https://www.openssl.org/docs/man3.0/man7/migration_guide.html
> Use of low-level digest functions such as SHA1_Init(3) have been informally
> discouraged from use for a long time. Applications should instead use the
> high level EVP APIs EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and
> EVP_DigestFinal_ex(3), or the quick one-shot EVP_Q_digest(3).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3518
-- Commit Summary --
* crypto: SHA1_Init deprecated at openssl 3.0
-- File Changes --
M src/modules/crypto/crypto_uuid.c (19)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3518.patchhttps://github.com/kamailio/kamailio/pull/3518.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3518
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3518(a)github.com>
Hello everyone,
I'm trying to authenticate kamailio users using freeradius but I get the following error message when I try to start kamailio:
ERROR: <core> [core/cfg.y:3762]: yyparse(): cfg. parser: failed to find command radius_www_authorize (params 1).
Thanks for your help.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3525
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3525(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
The module has been broken in d00ceda2c04. The code to replace strcpy() did not terminate the target sting with \0.
Discovered by our voiptests rig:
https://github.com/sippy/voiptests/actions/workflows/kamailio.yml
Results in a broken SDP (note garbage around o= attribute:
```
1681 00:00:08.271/GLOBAL/alice_ua: RECEIVED message from [::1]:5060:
1682 SIP/2.0 183 Session Progress
1683 Via: SIP/2.0/UDP [::1]:5061;received=::1;rport=5061;branch=z9hG4bK20a1169c6781e4bfe26554e84d3b4925
1684 Record-Route: <sip:[::1];ftag=l5v4RNY4iYqP.*!0LQUA.MLVq8RX'm!q;lr>
1685 From: "Alice Smith" <sip:alice_2_ipv6@[::1]>;tag=l5v4RNY4iYqP.*!0LQUA.MLVq8RX'm!q
1686 To: <sip:bob_2@[::1]>;tag=c77c4b2c8430cf6c18566bc3d9212ed3
1687 Call-ID: O%CciL!Yf0-SQn]G46v4J(SPddRr<MtH(a))<0.ev}(]q.\%X[>
1688 CSeq: 200 INVITE
1689 Content-Type: application/sdp
1690 Content-Length: 296
1691
1692 v=0
1693 o=- 577651195072 577651195072 IN IP6 ::1\x86zU
1694 s=BOBSDP Session
1695 c=IN IP6 ::1\x86zU
1696 t=0 0
1697 m=image 13424 udptl t38
1698 a=T38FaxVersion:0
1699 a=T38MaxBitRate:14400
1700 a=T38FaxRateManagement:transferredTCF
1701 a=T38FaxMaxBuffer:262
1702 a=T38FaxMaxDatagram:176
1703 a=T38FaxUdpEC:t38UDPRedundancy
1704 a=nortpproxy:yes
1740 00:00:08.322/GLOBAL/alice_ua: RECEIVED message from 127.0.0.1:5060:
1741 SIP/2.0 183 Session Progress
1742 v: SIP/2.0/UDP 127.0.0.1:5061;received=127.0.0.1;rport=5061;branch=z9hG4bK8e357573055f35a768af0c9be78c836d
1743 Record-Route: <sip:127.0.0.1;ftag=q3~s'YH'`.Krs%LQKdFWrWnWgwPHJHnf;lr>
1744 f: "Alice Smith" <sip:alice_7_ipv4@127.0.0.1>;tag=q3~s'YH'`.Krs%LQKdFWrWnWgwPHJHnf
1745 t: <sip:bob_7@127.0.0.1>;tag=8ee80e5205ef358c3cb868fb5e5614f8
1746 i: m6!(QAFQlv}vTlycDH[rpMjW}mVV1phG@z/c{KI:L*n'[`%15
1747 CSeq: 200 INVITE
1748 c: application/sdp
1749 l: 328
1750
1751 v=0
1752 o=- 577651195078 577651195078 IN IP4 127.0.0.1z\xcfpzG\xd1\xcb`\xef=\x86zU
1753 s=BOBSDP Session
1754 c=IN IP4 127.0.0.1z\xcfpzG\xd1\xcb`\xef=\x86zU
1755 t=0 0
1756 m=image 13696 udptl t38
1757 a=T38FaxVersion:0
1758 a=T38MaxBitRate:14400
1759 a=T38FaxRateManagement:transferredTCF
1760 a=T38FaxMaxBuffer:262
1761 a=T38FaxMaxDatagram:176
1762 a=T38FaxUdpEC:t38UDPRedundancy
1763 a=nortpproxy:yes
```
Looks like there were multiple changes of the same nature. All of them probably needs to be re-evaluated to make sure this pattern is not propagated.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3524
-- Commit Summary --
* rtpproxy: make sure we null terminate the copy of the string.
-- File Changes --
M src/modules/rtpproxy/rtpproxy.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3524.patchhttps://github.com/kamailio/kamailio/pull/3524.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3524
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3524(a)github.com>