<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
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
I've been trying to setup kamailio with the latest freeradius-client. I've been using the docker image `kamailio/kamailio:5.3.1-jessie` adding the freeradius-client (latest github pool).
However it seems that kamailio cannot create a proper radius request and fails with error `3(9) ERROR: auth_radius [sterman.c:264]: radius_authorize_sterman(): unable to add User-Name attribute`
### Troubleshooting
#### Reproduction
Install freeradius-client
```
git clone https://github.com/FreeRADIUS/freeradius-client.git \
&& cd freeradius-client/ \
&& ./configure \
&& make \
&& make install
```
Modify the `/usr/local/etc/radiusclient/dictionary` and append the following lines
```
$INCLUDE /etc/radiusclient/dictionary.sip
$INCLUDE /etc/radiusclient/dictionary.kamailio # https://github.com/kamailio/kamailio/blob/master/src/modules/auth_radius/cf…
```
Configure auth_radius
```
loadmodule "auth_radius.so"
loadmodule "misc_radius.so"
modparam("auth_radius|misc_radius", "radius_config", "/usr/local/etc/radiusclient/radiusclient.conf")
```
#### Debugging Data
I've went on the tried to debug the issue from the freeradius-client's point of view since it was easier to compile and iterate, and I've added various logs here and there to try and figure out what was wrong. From what I've seen, kamailio invokes `INIT_AV` to setup the `attrs` dictionary containing the dictionary attributes and matching values.
https://github.com/kamailio/kamailio/blob/360e012d9d93c80b62b6e75bfac6e3340…
I've traced the `rc_dict_findattr` and it seems that the library properly returns `User-Name` attribute with value `1`.
However in the `radius_authorize_sterman` function
https://github.com/kamailio/kamailio/blob/360e012d9d93c80b62b6e75bfac6e3340…
the application tries to add the AVPs by invoking `rc_avpair_add` and passing `attr[...].v` value. I've logged the `rc_avpair_add` parameters passed and it seems that `attr[...].v` is not 1 as expected but 0, thus failing since 0 is an invalid attribute code.
I modified freeradius-client to replace `attrid` with 1 if it were a 0 as a test, and it seems that all calls to `rc_avpair_add` by sterman.c are passing 0 as attribute value leading to a radius message like:
```
(0) User-Name = "test@localhost"
(0) User-Name = "test"
(0) User-Name = "localhost"
(0) User-Name = "X3q5AV96t9WlJ5ZnoFFQQq/ftg7u+Mx5KRxYYIA="
(0) User-Name = "sip:localhost"
(0) User-Name = "REGISTER"
(0) User-Name = "bc6c2152d2e068e16f76188d69e66340"
(0) User-Name = "\017"
(0) User-Name = "test"
(0) NAS-Port = 5060
(0) NAS-IP-Address = 10.10.10.4
```
(As you can see pretty much all attributes are replaced by User-Name)
It looks like `attrs` dictionary although initialized at `mod_init`, at a later stage is somehow corrupted or reset.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.1 (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
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 4.9.2
```
* **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 bea2be591c38 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 GNU/Linux
```
This is tested on a docker installation using `kamailio/kamailio:5.3.1-jessie`
--
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/2496
### Description
installing from the RPM installs libphonenumber 8.10 which does not include the north American area code 689.
### Solution?
Update google libphonenumber requirements to >=8.12 in kamailio's PHONENUM module.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.1 (x86_64/linux) 09fd6a
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
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: 09fd6a
compiled on 11:07:49 Sep 1 2020 with gcc 4.8.5
```
* **Operating System**:
```
CentOS 7.8 - CentOS Linux release 7.8.2003 (Core)
kernel 3.10.0-1127.13.1.el7.x86_64
```
--
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/2533
<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
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
When running a load test Kamailio eventually becames unresponsive and stops processing calls.
Kamilio is configured to use the DMQ replication for dialog and usrloc. Also the dialog keepalived is enabled.
### Troubleshooting
>From investigation, the problem happens faster and easier when there is some network degradation causing packet loss and/or retransmissions but even without any noticeable network issue the freeze eventually happens.
#### Reproduction
Run a simple load test making calls at a rate of ~5 cps and keep around ~2000 calls connected all the time. A higher cps seems to make it easier to reproduce the problem.
Adding network degradation to the environment makes the problem happens, but when running a tool such as SIPp for the load test, the retransmission can be forced by simply killing the SIPp instance receiving calls which will then force Kamailio to retransmit.
#### 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.
-->
Output of kamct trap:
[gdb_kamailio_20201028_213030.txt](https://github.com/kamailio/kamailio/file…
#### Log Messages
Local generated requests shows up in the log, but are not sent in the network
### Possible Solutions
Not found so far
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -v
version: kamailio 5.4.2 (x86_64/linux) c3b91f
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
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: c3b91f
compiled on 13:50:37 Oct 27 2020 with gcc 4.8.5
```
* **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`)
-->
```
# cat /etc/centos-release
CentOS Linux release 7.8.2003 (Core)
# uname -a
Linux hostname 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 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/2535
hi
can any one help me to add rtpproxy in kamailio/kamailio-ci:master-alpine
thank you
--
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/2109
### Description
I notice a test failure when validating Kamailio 5.4.x, and after looking at the SIP traces, Kamailio is does not forwarding the first ACK.
However, it does it after receiving a 200 OK re-transmission .
```
192.0.2.12:5062 192.0.2.24:5060
──────────┬───────── ──────────┬─────────
│ │
│ │
│ │ 200 coco (SDP
│ │ <<<────────────────
200 coco (SDP) │
<───────────────────────────────────────────── │
ACK │
─────────────────────────────────────────────> │
ACK │
───────────────────────────────────────────>>> │
│ │ 200 coco (SDP
│ │ <<<────────────────
200 coco (SDP) │
<───────────────────────────────────────────── │
│ │
ACK │
─────────────────────────────────────────────> │
│ │ ACK
│ │ ──────────────────>
```
### Troubleshooting
I did proceed by isolation and ended up concluding that this commit was triggering this behavior.
Simply, reverting this commit is fixing the problem.
```
commit 28049aafc8dd06c160ce5e7b8d5e4fc728441b0c
Author: Semen Darienko <semen.darienko(a)wildix.com>
Date: Sun May 3 12:26:45 2020 +0200
core: dns - use all NAPTR records
- enable using of all NAPTR records instead of the first one ordered by
priority
- GH #2290
```
I did not look at the code modification and/or anything config specific yet, I will try to find some time to debug.
--
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/2539
#1762 ## 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)
- [x] 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 -->
Fix invalid JSON returned by stats.fetch with multiple modules as parameter.
Cleanup by reducing code duplication.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2537
-- Commit Summary --
* kex: Make stats.fetch(n) reply with valid JSON
* kex: Remove a lot of duplicate code from rpc_stats_fetch*
* kex: Let the RPC server do printf as it may have optimizations
-- File Changes --
M src/modules/kex/core_stats.c (222)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2537.patchhttps://github.com/kamailio/kamailio/pull/2537.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/2537
### Description
### Troubleshooting
By executing an external script using exec_cmd function I'm getting the following error:
``failed. exit_status=13, errno=11: Resource temporarily unavailable``
This is happening intermittently, sometimes it's working fine, but sometimes I see this error in the log file. After looking in the debug log file I found that for some reason the exit code for the executed command is not 0 (ki_exec_cmd(): execution return code: 1), that's why this function is complaining (I guess).
What is weird that this is not happening permanently, it's about 2 cases from 5, and by running the same command manually - every time I'm getting success, all the time exit code is 0. (I'm running the same command with the same user like kamailio is running)
Replacing exec_cmd with exec_avp - I didn't notice this issue.
#### Debugging Data
```
2376cc5b10f549@192.168.0.1:5060} exec [exec_mod.c:278]: ki_exec_cmd(): executing [nice -20 /usr/local/bin/cmd arg1 arg2
2376cc5b10f549@192.168.0.1:5060} dialog [dlg_hash.c:1069]: dlg_unref_helper(): unref dlg 0x7fd643b32398 with 1 -> 4
376cc5b10f549@192.168.0.1:5060} <script>: [From=sip:+123456789@company.net, To Domain=company.net, R-URI=sip:+987654321@192.168.0.1:5060]
2376cc5b10f549@192.168.0.1:5060} <core> [main.c:905]: sig_usr(): SIGCHLD received: we do not worry about grand-children
2376cc5b10f549@192.168.0.1:5060} exec [exec_mod.c:282]: ki_exec_cmd(): execution return code: 1
2376cc5b10f549@192.168.0.1:5060} <core> [core/action.c:1598]: run_actions(): alert - action [corefunc (16)] cfg [/etc/kamailio-dev/conf.d/routes.cfg:1567] took too long [780373 us]
2376cc5b10f549@192.168.0.1:5060} dialog [dlg_hash.c:877]: internal_get_dlg(): ref dlg 0x7fd643b32398 with 1 -> 5
```
### Possible Solutions
Use exec_avp instead
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.1 (x86_64/linux) a6cb74
```
* **Operating System**:
```
CentOS 7 x64
Linux k3-core1.nuacom.eqx 3.10.0-1127.8.2.el7.x86_64 #1 SMP Tue May 12 16:57:42 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/2538
I’m doing some testing on Dispatcher in order to prepare it for HA setups with floating IPs on Kamailio version 5.4.1.
In this scenario my calls must be sent to SET with the ID 2 :
> SET: {
ID: 2
TARGETS: {
DEST: {
URI: sip:GW_IP:5061
FLAGS: AX
PRIORITY: 0
ATTRS: {
BODY: duid=TB_MG03;socket=SOCKET_IP_1:5060
DUID: TB_MG03
MAXLOAD: 0
WEIGHT: 0
RWEIGHT: 0
SOCKET: SOCKET_IP_1:5060
SOCKNAME:
OBPROXY:
}
RUNTIME: {
DLGLOAD: 0
}
}
DEST: {
URI: sip:GW_IP:5061
FLAGS: AX
PRIORITY: 0
ATTRS: {
BODY: duid=TB_MG02;socket=SOCKET_IP_2:5060
DUID: TB_MG02
MAXLOAD: 0
WEIGHT: 0
RWEIGHT: 0
SOCKET: SOCKET_IP_2:5060
SOCKNAME:
OBPROXY:
}
RUNTIME: {
DLGLOAD: 0
}
}
}
}
As you can see, both gateways have the same URI but they have different sockets. In this scenario i tried to make a bunch of calls with this set as destination but all calls ended being delivered with socket "SOCKET_IP_2:5060" as oposed to doing a load balancing. This isn’t a real scenario since i wouldn’t want load balance for the same destination, but the objective is to show you the balance feature failing in this conditions, in order to help you debug the issue.
After that i tried a different scenario. This time i disabled the destination with DUID TB_MG02 and socket SOCKET_IP_2:5060 and made the same test.
> SET: {
ID: 2
TARGETS: {
DEST: {
URI: sip:GW_IP:5061
FLAGS: AX
PRIORITY: 0
ATTRS: {
BODY: duid=TB_MG03;socket=SOCKET_IP_1:5060
DUID: TB_MG03
MAXLOAD: 0
WEIGHT: 0
RWEIGHT: 0
SOCKET: SOCKET_IP_1:5060
SOCKNAME:
OBPROXY:
}
RUNTIME: {
DLGLOAD: 0
}
}
DEST: {
URI: sip:GW_IP:5061
FLAGS: DX
PRIORITY: 0
ATTRS: {
BODY: duid=TB_MG02;socket=SOCKET_IP_2:5060
DUID: TB_MG02
MAXLOAD: 0
WEIGHT: 0
RWEIGHT: 0
SOCKET: SOCKET_IP_2:5060
SOCKNAME:
OBPROXY:
}
RUNTIME: {
DLGLOAD: 0
}
}
}
}
In this test all the calls ended up being delivered with SOCKET_IP_2 as the socket. This time no load balance was made and a disabled destination was used.
I’ve tried reversing the order of the destinations in the configuration and it now chooses socket SOCKET_IP_1 all the time.
If both destinations have different URIs none of this problems happen, only with two destinations with same address but different sockets.
Here are my dispatcher parameters, let me know if there is some config wrong :
modparam("dispatcher", "flags", 2) // Failover support is enabled
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_hash_size", 8)
modparam("dispatcher", "db_url", DBURL)
modparam("dispatcher", "table_name", "TBK_DISPATCHER")
modparam("dispatcher", "setid_col", "TBK_NapGroupId")
modparam("dispatcher", "destination_col", "TBK_NapPeer")
modparam("dispatcher", "flags_col", "TBK_NapState")
modparam("dispatcher", "priority_col", "TBK_NapPriority")
modparam("dispatcher", "attrs_col", "TBK_NapAttrs")
modparam("dispatcher", "ds_probing_mode", 3)
modparam("dispatcher", "ds_ping_interval", 10)
modparam("dispatcher", "ds_probing_threshold", 2)
modparam("dispatcher", "ds_inactive_threshold", 2)
modparam("dispatcher", "ds_ping_reply_codes", "code=200;code=484;code=404")
modparam("dispatcher", "ds_db_extra_attrs", "socket=TBK_Sap")
modparam("dispatcher", "ds_ping_from", "sip:PeerProbing@peer.probing")
What do you think might be the problem here? If you need any more info please let me know. HA setup is a really important feature for us to move forward and as such we need to assure that we use the correct socket.
--
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/2527
Hello,
I am planning to release Kamailio v5.3.7 sometime next week, likely on
Monday or Tuesday, this being the usual prior notice for heads up to
identify issues not reported yet on bug tracker as well as the commits
you are aware of that were not backported yet.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda