### Description
In a setup with 2 kamailios in active/passive with a virtual IP that failovers between them:
sbc01 (active) is handling calls.
sbc02 (passive) is started, and does an initial dialog sync via DMQ
```
root@sbc01:~# kamctl rpc stats.get_statistics all | grep dialog
"dialog:active_dialogs = 39",
"dialog:early_dialogs = 2",
"dialog:expired_dialogs = 0",
"dialog:failed_dialogs = 583",
"dialog:processed_dialogs = 2527",
root@sbc01:~#
```
```
root@sbc02:/etc/kamailio# kamctl rpc stats.get_statistics all | grep dialog
"dialog:active_dialogs = 39",
"dialog:early_dialogs = 0",
"dialog:expired_dialogs = 0",
"dialog:failed_dialogs = 0",
"dialog:processed_dialogs = 0",
root@sbc02:/etc/kamailio#
```
>From that point onwards, as long as sbc01 stays as active, sbc02 stays as passive, and no restarts occur anywhere, the values for `dialog` metrics in sbc02 will not change and remain as they are, in the previous example, active_dialogs would remain as 39.
### Troubleshooting
This was discovered during some tests from #1591
#### Reproduction
Setup 2 kamailio instances that replicate dialogs via DMQ.
1- On Kamailio1 put some traffic to have some active dialogs (must call `dlg_manage()` in routing script for these test calls)
2- Start Kamailio2
3- Compare output of: `kamcmd stats.get_statistics dialog:` on both nodes.
4- Alter the amount of active dialogs on Kamailio1 (either end some or create new ones).
5- Repeat step 3.
Kamailio1 --> Step5 will have different values from Step3.
Kamailio2 --> Step5 will have exactly the same values from Step3.
### Possible Solutions
`dialog:active_dialogs` should remain as 0 on Kamailio2, as technically there are no dialogs being handled by that server, it only has information of replicated dialogs and those stats are available in the `dlg.stats_active` metric.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -V
version: kamailio 5.2.0-pre1 (x86_64/linux) 2ecf60-dirty
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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 2ecf60 -dirty
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`)
-->
```
root@sbc02:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch
root@sbc02:~# uname -a
Linux sbc02 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
root@sbc02:~#
```
--
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/1692
### Description
SIP OPTION relayed using `t_forward_nonack()` not being URI decoded
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
register with PATH and use SIP OPTION keep alive
or simply send relay a SIP OPTIONS with a route.
#### 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.
-->
```#1 0x00007fa3067a998f in t_forward_nonack (t=0x7fa3246fce88,
p_msg=0x7fa3885aa1c0, proxy=0x0, proto=0) at t_fwd.c:1729
1729 raise(SIGSEGV);
(gdb) l
1724 ser_error=MIN_int(lowest_ret, E_CFG);
1725 return -1;
1726 }
1727 if(lowest_ret!=E_CFG) {
1728 LM_ERR("failure to add branches\n");
1729 raise(SIGSEGV); << raising exception to get the coredump
1730 }
1731 ser_error=lowest_ret;
1732 return lowest_ret;
1733 }
```
#### Log Messages
```
4(34) ERROR: tm [ut.h:245]: uri2dst2(): bad_uri: sip:247.25.169.51:52307%3Btransport%3Dtls
4(34) ERROR: tm [t_fwd.c:1728]: t_forward_nonack(): failure to add branches
```
### Possible Solutions
This patch can fix the problem from the routing script :
```
if (is_method("OPTIONS") && uri!=myself) {
$var(path_uri) = $(hdr(Route){re.subst,/<(.*)>/\1/});
if (defined $(var(path_uri){uri.params}) && $(var(path_uri){uri.params}{param.value,received}) != "") {
$var(received) = $(var(path_uri){uri.params}{param.value,received});
if ($var(received) =~ "sip:.*:.*") {
$du = $var(received);
$avp(received) = $(var(path_uri){uri.params}{param.value,received});
avp_subst("$avp(received)", "/%3Btransport%3Dtcp/;transport=tcp/ig");
if ($avp(received) =~ "sip:.*:.*") {
$du = $avp(received);
}
}
t_relay();
}
```
### Additional Information
tested on 5.3.2, something changed during 5.3.0.dev, I will try to pin point the commit
--
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/2255
It seems a good idea to support JWT as a new SIP authorization method. Wonder if anyone is interested? Think auth_db would be the best spot to add support for JWT.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/29
### Description
Kamailio with TOPOS enabled acts as a proxy between SIP client and SBC.
When client sends "180 Ringing" without Contact header - kamailio does not forward it to SBC.
If Contact header exists in "180 Ringing" - all works as expected.
### Troubleshooting
#### Reproduction
Load and configure topos module
Make call with "180 Ringing" without Contact header - kamailio will not forward it.
#### Log Messages
```
ERROR: topos [tps_storage.c:340]: tps_storage_link_msg(): bad sip message or missing Contact hdr
```
#### SIP Traffic
```
SIP/2.0 180 Ringing
Via: SIP/2.0/TLS 1.2.3.4:5061;branch=z9hG4bKef45.8c75f0bae8a59dfaec6ff533ff0f3b2d.0
From: <sip:1111@1.2.3.4:5061>;tag=02000879948559
To: <sip:2.2.2.2@5.6.7.8:5061;transport=tls;user=phone>;tag=SDbsq8499-y2pMOVV
Call-ID: apdW7374315131g0bcGhEfDjFof
CSeq: 988207425 INVITE
User-Agent: agent
Supported: replaces, outbound
Content-Length: 0
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.6 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, 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
```
* **Operating System**:
```
Red Hat Enterprise Linux Server 7.3
3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 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/1720
### Description
In our setup, we try to eliminate setup configuration in database and replace it with files. The advantage is, that we can maintain those files via puppet or ansible, and since we always rewrite the whole file, we don't have to take care about deleting obsolete entries. We can run different Kamailio versions without having problems with the version table when using the same database. And finally, we can stop all those local mysqld processes on a lot of machines.
Modules like the dispatcher module were easy to change. But the permissions module is not prepared to run without database, if you want to use `allow_trusted()` or `allow_source_address()` and similar. The only option to feed those functions with data is a database table.
### Expected behavior
We would like to place files for trusted and address into the Kamailio directory and have Kamailio read from those files during startup or after reload commands.
#### Actual observed behavior
Data for trusted and address have to reside inside a database.
--
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/2037
Greetings,
Dispatcher RPC command allows to change the runtime state of a GW using its Group ID and the IP.
In my implementation i have 2 Kamailio machines in an HA setup and, as such, i have the GW configured twice with same group_id and different sockets (Different HA adressess - one for each machine).
I would like to be able to disable on runtime GWs that are configured with an HA adress that isn't present yet on that machine. To be able do that, the combination of GroupID + IP is not enough, but Socket + IP would be enough.
Is this possible to implement ?
Best Regards
--
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/2085
When I just tried to do a commit today, I got the following error:
```
kamailio $ git ci .
error: 'pkg/docker' does not have a commit checked out
fatal: updating files failed
```
It is related to the `pkg/docker` submodule referencing to kamailio/kamailio-ci.
Not sure if this is due to a new git version or something else, because I did commits in that folder a few days ago.
To get is sorted out, I did:
```
kamailio $ git submodule update pkg/docker
Submodule path 'pkg/docker' not initialized
Maybe you want to use 'update --init'?
kamailio $ git submodule update --init pkg/docker
Submodule 'pkg/docker' (https://github.com/kamailio/kamailio-ci.git) registered for path 'pkg/docker'
Cloning into '/.../kamailio/pkg/docker'...
Submodule path 'pkg/docker': checked out 'b92a1c899b8c474afadd0cf29dd7cb4ea01a3466'
```
Then it worked to do the commit.
I wonder if this is going to break the process we were used with, specially the installation guidelines from GIT repo. Therefore I open this item to see if we really need the to have `pkg/docker` submodule, or better have the docker files directly in the repo. Other options to keep things sane and simple?
Git version:
```
$ git --version
git version 2.22.0
```
--
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/2003
Hello all
Testing dialog timeout event callback for kemi lua setup on kamailio
5.4.0-dev3 (x86_64/linux) d74157-dirty, i had some problems to perform the
dlg timeroute behaviour the same as we could on native version.
If i used KSR.dialog.var_sets to set $dlg_ctx(timeout_route), I saw that on
a dialog timeout, the dlg_ontimeout event route was not triggered, and only
the dialog callback was executed with evname dialog:end. (only executing
event_route -1 on state 5)
So i'm guessing that the kemi dialog var_sets is for $dlg_var only (¿?)
Anycase, If i used KSR.pv.sets, i saw the kamailio was crashing
.....
16(5579) DEBUG: dialog [dlg_hash.c:1013]: dlg_ref_helper(): ref dlg
0x7f9a961f5f90 with 1 -> 3
16(5579) DEBUG: dialog [dlg_handlers.c:1589]: dlg_ontimeout(): executing
route -1 on timeout
22(5645) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 8
22(5645) DEBUG: <core> [core/tcp_main.c:3762]: handle_ser_child(): dead
child 16, pid 5579 (shutting down?)
....
Adding some debug, i could see that the call was not attempting the kemi
function of line 1598 of dlg_handlers.c, and was trying the code i think
was for native on line 1593.
We think the issue is that the toroute is defined as unsigned
dlg_hash.h: unsigned int toroute; /*!< index of route that is
executed on timeout */
but after that when setting $dlg_ctx(timeout_route) with pv module, it
tries to compare an integer being unsigned, so it's always true and never
uses kemi
with this change we made it work
+ if ((int)(dlg->toroute) > 0) {
+ /*if(dlg->toroute>0) {*/
but i don't know maybe there is a better way to do it.
best regards
david
When upgrading from stretch to buster the kamailio packages aren't upgraded because the 5.3.1+stretch version is greater than 5.3.1+buster:
```
$ dpkg --compare-versions 5.3.1+stretch gt 5.3.1+buster ; echo $?
0
```
The package version should include the release version instead of its codename, e.g. 5.3.1+deb9u1 & 5.3.1+deb10u1 like done for [stable updates](https://www.debian.org/doc/manuals/developers-reference/pkgs.en.ht…:
```
$ dpkg --compare-versions 5.3.1+deb10u1 gt 5.3.1+deb9u1 ; echo $?
0
```
--
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/2160
>From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949521:
> your package is using `xml2-config` to detect and use libxml2. I'm
removing that script, so please update your build system to use
pkg-config instead.
>
>Additionally, your package is not failing to build, so it's creating
binaries that are not linked against libxml2 anymore:
--
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/2199