Module: kamailio
Branch: master
Commit: 44f62bd8e0a4c0ef7a9d2b87e52941b0f62d41bd
URL: https://github.com/kamailio/kamailio/commit/44f62bd8e0a4c0ef7a9d2b87e52941b…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2020-06-25T21:42:59+03:00
dispatcher: docbook - fixed "The content of the parent element type is element only."
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/44f62bd8e0a4c0ef7a9d2b87e52941b…
Patch: https://github.com/kamailio/kamailio/commit/44f62bd8e0a4c0ef7a9d2b87e52941b…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index e42c94fa3e..41a5749387 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -355,31 +355,32 @@ modparam("dispatcher", "force_dst", 1)
<para>
The addeded fields are:
<itemizedlist>
- <listitem>
- grp - the set id (group id).
- </listitem>
- <listitem>
- uri - the URI address.
- </listitem>
- <listitem>
- sock - the socket pointer.
- </listitem>
- <listitem>
- socket - the socket string - it is added only if xavp_dst_mode has bit 2 set
- (value 2).
- </listitem>
- <listitem>
- sockname - the sockname string - it is added only if xavp_dst_mode has bit 3 set
- (value 3).
- </listitem>
- <listitem>
- dstid - the destination unique id (in case of call load distribution algorithm).
- </listitem>
- <listitem>
- attrs - the attributes - they are added if xavp_dst_mode does not have
- the bit 1 set (value 1).
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>grp - the set id (group id).</para>
+ </listitem>
+ <listitem>
+ <para>uri - the URI address.</para>
+ </listitem>
+ <listitem>
+ <para>sock - the socket pointer.</para>
+ </listitem>
+ <listitem>
+ <para>socket - the socket string - it is added only if xavp_dst_mode has
+ bit 2 set (value 2).</para>
+ </listitem>
+ <listitem>
+ <para>sockname - the sockname string - it is added only if xavp_dst_mode
+ has bit 3 set (value 3).</para>
+ </listitem>
+ <listitem>
+ <para>dstid - the destination unique id (in case of call load distribution
+ algorithm).</para>
+ </listitem>
+ <listitem>
+ <para>attrs - the attributes - they are added if xavp_dst_mode does not
+ have the bit 1 set (value 1).</para>
+ </listitem>
+ </itemizedlist>
</para>
<para>
<emphasis>
### Description
<!--
I integrate a Kamailio and asterisk with together(Kamailio fo registrar server) as a sip trunk and I have a kazoo server that doesn't send a register message to Kamailio and I want to register this kazoo manually to my Kamailio location and asterisk sipregs with fixed values and send an incoming call to kazoo from another hosted PBXs.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.0.8 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 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 6.3.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 `uname -a`)
-->
```
Linux trunk2-sbc 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/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/2378
### Description
Selected algorithm is a hash, over Call-ID, From, etc. If destination is not available, a new one must be selected, without breaking the hash assignation (all messages with the same hash must be forwarded to the same destination)
### Expected behavior
The load to the failed destination to be (hopefully) evenly distributed over the remaining destinations.
#### Actual observed behavior
All the messages that were supposed to be sent to the failed destination are sent to only one of the remaining, causing it to receive double load, comparing with the rest
#### Debugging Data
In this test, 6000 Calls were sent to a group of six destinations, using algorithm "0" (hash over Call-ID)
| All destinations active
-- | --
Dest1 | 996
Dest2 | 997
Dest3 | 999
Dest4 | 1006
Dest5 | 1005
Dest6 | 997
Total | 6000

Repeating the test, but with destination Dest4 down:
| OriginalImplementation
-- | --
Dest1 | 975
Dest2 | 993
Dest3 | 2022
Dest4 | 0
Dest5 | 1019
Dest6 | 991
Total | 6000

We can see that poor destination Dest3 receives double traffic
### Possible Solutions
I implemented a solution that does not break the expected behavior (messages with same hash are assigned the same destination, but with a better distribution over remaining destinations)
| New Implementation
-- | --
Dest1 | 1175
Dest2 | 1206
Dest3 | 1191
Dest4 | 0
Dest5 | 1216
Dest6 | 1212
Total | 6000

Basically, the solution is as simple as to execute a rehash of the original hash.
I will create a pull request with the proposed change, which I already tested, as it can be seen on the previous chart.
### Additional Information
* **Kamailio Version**
```
kamailio 5.4.0-dev4 (x86_64/linux) 0c29e8-dirty
```
* **Operating System**:
```
Linux Rechitsa 5.4.19-100.fc30.x86_64 #1 SMP Tue Feb 11 22:27:11 UTC 2020 x86_64 x86_64 x86_64 GNU/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/2361
Hi Mojtaba,
not looked in the code – but it could be related to be able to check with this function for request and replies. Replies will have the method name in their CSEQ.
If you have a requirement that is not available right now in the module, it can be of course extended (e.g. by pull request).
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: sr-users <sr-users-bounces(a)lists.kamailio.org> On Behalf Of Mojtaba
Sent: Friday, June 26, 2020 12:43 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Subject: Re: [SR-Users] Question about textops
Any idea?
On Wed, 24 Jun 2020, 14:26 Mojtaba, <mespio(a)gmail.com<mailto:mespio@gmail.com>> wrote:
Hello,
Some confusing things while developing in Kamailio:
In is_method_f function in textops module, the code checks the HDR_CSEQ_F in msg also, and if the method name appears in CSEQ_F, The result is returned TRUE.
These question will arise why in this function, the CSEQ field in message will check?
if(parse_headers(msg, HDR_CSEQ_F, 0)!=0 || msg->cseq==NULL)
{
LM_ERR("cannot parse cseq header\n");
return -1; /* should it be 0 ?!?! */
}
if(m->s==0)
return (get_cseq(msg)->method_id&m->len)?1:-1;
else
return (get_cseq(msg)->method_id==METHOD_OTHER
&& get_cseq(msg)->method.len==m->len
&& (strncasecmp(get_cseq(msg)->method.s, m->s,
m->len)==0))?1:-1;
I think it would be nice to add new function like: is_cseq_method_f in module to avoid some problem understanding.
--
--Mojtaba Esfandiari.S
Managing the config value as a string (`char*`) doesn't change the string size, so the value is cut off to the default value size (26 chars).
<!-- 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/2372
-- Commit Summary --
* keepalive: manage the `ping_from` config value as str.
-- File Changes --
M src/modules/keepalive/keepalive_mod.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2372.patchhttps://github.com/kamailio/kamailio/pull/2372.diff
--
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/pull/2372
### Description
Kamailio is crashing every 2-3 calls with this sample config. I dont mind paying for a paid support. Please help :)
Ive used asterisk server to generate calls like
```
for i in `seq 1 4`;do asterisk -rx'originate Local/1@test application MusicOnHold';done
extensions.conf:
[test]
exten => 1,1,Set(CALLERID(all)=12345)
same=n,Dial(SIP/q_1_Test_Queue@1.1.1.1:5060)
request_route {
# MOH queue?
if ($rU=~"c_" || $rU=~"q_") {
if (mohq_process ()) {
if (is_method("INVITE")) {
route(ACCSTART);
xlog("L_INFO", "QUEUE JOIN: $ci $rm from $fu to $rU/$ruri (IP:$si:$sp)\n");
}
exit;
}
}
}
route[ACCPREPARE] {
$var(callid) = "$ci";
$var(referCallid) = "";
$var(did) = "$rU";
$var(clid) = "$fU";
}
route[ACCSTART] {
route(ACCPREPARE);
xlog("L_INFO", "ACC START: did $var(did) didid $var(didid) action $var(action)-$var(value) valueid $var(valueid) trunk $si:$sp\n refered-by $(hdr(Referred-By))");
}
```
### Troubleshooting
```
Jun 23 22:33:38 dialer-gw-qa kamailio: INFO: <script>: ACC START: did $rU didid 0 action 0-0 valueid 0 trunk 45.55.203.176:5060#012 refered-by <null>
Jun 23 22:33:38 dialer-gw-qa kamailio: INFO: <script>: QUEUE JOIN: 42c9d48d39329106158a600b6c4b059e@xxxx:5060 INVITE from sip:12345@xxxxx to q_1_Test_Queue/sip:q_1_Test_Queue@xxxxx:5060
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6825ad5 in t_check_msg (p_msg=0x7ffff76941a0, param_branch=0x0) at t_lookup.c:1086
1086 t_lookup.c: No such file or directory.
(gdb)
(gdb)
(gdb) bt
#0 0x00007ffff6825ad5 in t_check_msg (p_msg=0x7ffff76941a0, param_branch=0x0) at t_lookup.c:1086
#1 0x00007ffff6826997 in t_check (p_msg=0x7ffff76941a0, param_branch=0x0) at t_lookup.c:1137
#2 0x00007ffff68d1b94 in t_release (msg=0x7ffff76941a0) at tm.c:1528
#3 0x00007ffff68d1c0b in w_t_release (msg=0x7ffff76941a0, str=0x2 <error: Cannot access memory at address 0x2>, str2=0x7ffff76941a0 "\b") at tm.c:1540
#4 0x00007ffff64ce57f in ack_msg (pmsg=0x7ffff7695d38, pcall=0x7ffff2301050) at mohq_funcs.c:218
#5 0x00007ffff64e9431 in mohq_process (pmsg=0x7ffff7695d38) at mohq_funcs.c:2733
#6 0x0000555555731e23 in do_action (h=0x7fffffffcc90, a=0x7ffff76703b0, msg=0x7ffff7695d38) at core/action.c:1071
#7 0x000055555573fe86 in run_actions (h=0x7fffffffcc90, a=0x7ffff76703b0, msg=0x7ffff7695d38) at core/action.c:1576
#8 0x000055555574058c in run_actions_safe (h=0x7fffffffde80, a=0x7ffff76703b0, msg=0x7ffff7695d38) at core/action.c:1640
#9 0x0000555555593f30 in rval_get_int (h=0x7fffffffde80, msg=0x7ffff7695d38, i=0x7fffffffd000, rv=0x7ffff7670508, cache=0x0) at core/rvalue.c:915
#10 0x0000555555598a80 in rval_expr_eval_int (h=0x7fffffffde80, msg=0x7ffff7695d38, res=0x7fffffffd000, rve=0x7ffff7670500) at core/rvalue.c:1913
#11 0x0000555555731890 in do_action (h=0x7fffffffde80, a=0x7ffff7671ff8, msg=0x7ffff7695d38) at core/action.c:1047
#12 0x000055555573fe86 in run_actions (h=0x7fffffffde80, a=0x7ffff7671ff8, msg=0x7ffff7695d38) at core/action.c:1576
#13 0x0000555555731d8f in do_action (h=0x7fffffffde80, a=0x7ffff7672148, msg=0x7ffff7695d38) at core/action.c:1062
#14 0x000055555573fe86 in run_actions (h=0x7fffffffde80, a=0x7ffff7672148, msg=0x7ffff7695d38) at core/action.c:1576
#15 0x0000555555740698 in run_top_route (a=0x7ffff7672148, msg=0x7ffff7695d38, c=0x0) at core/action.c:1661
#16 0x0000555555747718 in receive_msg (
buf=0x555555a31820 <buf> "ACK sip:q_1_Test_Queue@xxxx:5060 SIP/2.0\r\nVia: SIP/2.0/UDP xxxx:5060;branch=z9hG4bK1415e654\r\nMax-Forwards: 70\r\nFrom: <sip:12345@xxx>;tag=as2aeac8b5\r\nTo: <sip:q_1_Test_Queu"..., len=429, rcv_info=0x7fffffffe270) at core/receive.c:423
#17 0x0000555555613318 in udp_rcv_loop () at core/udp_server.c:554
#18 0x00005555555857a5 in main_loop () at main.c:1471
#19 0x000055555559043b in main (argc=2, argv=0x7fffffffebb8) at main.c:2802
(gdb)
```
#### SIP Traffic
there is nothing special in the SIP dialog. everything looks correct.
### Possible Solutions
no solution yet.
### Additional Information
````
Happens with all versions of kamailio 5.2.1,5.3.1-5.3.5
version: kamailio 5.3.5 (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, 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_BLACKLIST, 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 8.3.0
```
* **Operating System**:
debian 10 latest updates
```
--
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/2370