- update weighted/relative weighted algos to use probability based sort
- calls from 0-99 now follow the weighted distributions
- removed the now unused shuffle_uint100array() function
#### Pre-Submission Checklist
- [ x ] Commit message has the format required by CONTRIBUTING guide
- [ x ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ x ] Each component has a single commit (if not, squash them into one commit)
- [ x ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ x ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
The previous random sort for weights in a dispatcher set distributed correctly only after a minimum of n=100 calls.
This PR fixes the sort algorithm to distribute calls based on those weights, even for n<100 calls.
The real benefit here is customers can see the weighted distribution occur sooner now, when testing.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3531
-- Commit Summary --
* dispatcher: fix weighted sort for n<100 calls
-- File Changes --
M src/modules/dispatcher/dispatch.c (313)
M src/modules/dispatcher/doc/dispatcher.xml (9)
M src/modules/dispatcher/doc/dispatcher_admin.xml (20)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3531.patchhttps://github.com/kamailio/kamailio/pull/3531.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3531
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3531(a)github.com>
Hello!
It often happens to me that the service begins to refuse service (503) and so far I have not been able to understand the exact reason. Typically, before clients start receiving 503, many before them receive a 408 code. As soon as the service starts responding with 503, it does not recover on its own, you have to restart. There is no way to understand from the logs what led to this (nothing unusual). My server is powerful enough for the number of users of my service (what I mean is that there is no problem with resources). For example, 64 cores, 125GB of DDR4 RAM, 2TB of disk, of which 1TB SSD for the database, 10Gigabit channel, this is only a server for Kamailio for Rtpengines separate servers.
Please help me figure out what causes a service failure!?
OS: Debian 11, 64 cores, 125GB of DDR4 RAM; DB: MariaDB 10.5.15;
kamailio -v
version: kamailio 5.5.3 (x86_64/linux) 473cef
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_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.
udp_children: 30; tcp_children: 34; TLS: YES; async_workers: 64.
Incoming calls are sent via push notifications( Federico Cabiddu method: https://www.voztovoice.org/sites/default/files/KamilioWorld2015%20-Federico…).
NetBridging(for SIP and RTPEngine).
ims_charging for billing (integration with our billing system using the Diameter protocol).
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3591
-- Commit Summary --
* pkg: RPM packaging add kamailio-tls_wolfssl subpackage
-- File Changes --
M pkg/kamailio/obs/kamailio.spec (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3591.patchhttps://github.com/kamailio/kamailio/pull/3591.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3591
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3591(a)github.com>
Module: kamailio
Branch: master
Commit: f04f8539fccfc2afefb5e0badb4747adead2e378
URL: https://github.com/kamailio/kamailio/commit/f04f8539fccfc2afefb5e0badb4747a…
Author: �������������������� �������������������������������� <git-dpa(a)aegee.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-10-05T07:56:24+02:00
examples/kamailio-basic-kemi-lua.lua: Add example for rtpengine
---
Modified: misc/examples/kemi/kamailio-basic-kemi-lua.lua
---
Diff: https://github.com/kamailio/kamailio/commit/f04f8539fccfc2afefb5e0badb4747a…
Patch: https://github.com/kamailio/kamailio/commit/f04f8539fccfc2afefb5e0badb4747a…
---
diff --git a/misc/examples/kemi/kamailio-basic-kemi-lua.lua b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
index d3de2688243..fe9b131f570 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-lua.lua
+++ b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
@@ -340,7 +340,7 @@ end
-- RTPProxy control
function ksr_route_natmanage()
- if not KSR.rtpproxy then
+ if not KSR.rtpproxy and not KSR.rtpengine then
return 1;
end
if KSR.siputils.is_request()>0 then
@@ -354,7 +354,19 @@ function ksr_route_natmanage()
return 1;
end
- KSR.rtpproxy.rtpproxy_manage("co");
+ if KSR.kx.ifdef('WITH_RTPENGINE') then
+ if KSR.nathelper.nat_uac_test(8)>0 then
+ KSR.rtpengine.rtpengine_manage("replace-origin replace-session-connection SIP-source-address");
+ else
+ KSR.rtpengine.rtpengine_manage("replace-origin replace-session-connection");
+ end
+ elseif KSR.kx.ifdef('WITH_RTPPROXY') then
+ if KSR.nathelper.nat_uac_test(8)>0 then
+ KSR.rtpproxy.rtpproxy_manage("co");
+ else
+ KSR.rtpproxy.rtpproxy_manage("cor");
+ end
+ end
if KSR.siputils.is_request()>0 then
if KSR.siputils.has_totag()<0 then
A while ago I wanted to adjust my Lua configuration to work with rtpengine and I have adjusted this example accordingly. I have not tried the example, but if there are no obvious bugs with it, I think it will be useful.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3587
-- Commit Summary --
* examples/kamailio-basic-kemi-lua.lua: Add example for rtpengine
-- File Changes --
M misc/examples/kemi/kamailio-basic-kemi-lua.lua (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3587.patchhttps://github.com/kamailio/kamailio/pull/3587.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3587
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3587(a)github.com>