Hello,
We added a new feature to the ndb_redis module, similar to how the rtpengine_disable_tout parameter of the rtpengine module works.
If a number of consecutive commands to a redis server fail, that server is temporarily disabled. This is configurable by parameters: "allowed_timeouts" and "disable_time".
Disabling a server means that for "disable_time" seconds any command to that sever will not send the command to the server, but an error is returned instead.
For example if allowed_timeouts is configured to 0 and disable_time to 30, the first time redis_cmd or redis_execute functions fail the server will be disabled for 30 seconds.
The server information is retained by each Kamailio process individually, so this means that disabling a server is done by that process only and not globally.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1116
-- Commit Summary --
* ndb_redis: add disable server on failure feature
-- File Changes --
M src/modules/ndb_redis/doc/ndb_redis_admin.xml (58)
M src/modules/ndb_redis/ndb_redis_mod.c (4)
M src/modules/ndb_redis/redis_client.c (77)
M src/modules/ndb_redis/redis_client.h (9)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1116.patchhttps://github.com/kamailio/kamailio/pull/1116.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/1116
### Description
I forward a sip message multiple times. I expect the sip messages that are forwarded after previous ones, to look the same. In stead, multiple via-headers are added for the host. If I modify the sip message after forwarding it, I expect the modifications to be correctly processed for subsequent forwards, in stead the modifications are mixed with elements from the previously forwarded sip message. For example setting $td to value x, forwarding, setting $td to value y, and forwarding again, results in a sip message with a to-domain of xy, in stead of just y.
#### Reproduction
To reproduce, add this to your main route and enable dispatching. For the example sip messages below, I ran this code on CANCEL messages.
```
ds_select_domain("2", "6");
$td = $nh(d);
forward();
ds_next_domain();
$td = $nh(d);
forward();
```
Run wireshark to see the resulting sip-messages on the wire.
#### SIP Traffic
As an example of a 'double' forward along with modification of $td to send the initial sip message to both [a::3] and [b::4] (anonymized hosts):
Part of the initial sip message (anonymized)
CANCEL sip:x@x SIP/2.0
Via: SIP/2.0/UDP [x::1]:5060;rport;branch=z9hG4bK152CABB1BC44E9A0
From: <sip:y@x>;tag=00623356EBD9772B
To: <sip:x@x>
Part of the first forwarded sip message (anonymized)
CANCEL sip:x@a:5060 SIP/2.0
Record-Route: <sip:[x];lr=on>
Via: SIP/2.0/UDP [x:4A];branch=z9hG4bK9a21.932b3551ed4f18f509d1bfaeecb65ea5.0
Via: SIP/2.0/UDP [x::1]:5060;received=x:1;rport=5060;branch=z9hG4bK152CABB1BC44E9A0
From: <sip:y@x>;tag=00623356EBD9772B
To: <sip:x@[a::3]>
Part of the second forwarded sip message (anonymized)
CANCEL sip:x@b:5060 SIP/2.0
Record-Route: <sip:[x];lr=on>
Via: SIP/2.0/UDP [x:4A];branch=z9hG4bK9a21.932b3551ed4f18f509d1bfaeecb65ea5.0
Via: SIP/2.0/UDP [x:4A];branch=z9hG4bK9a21.932b3551ed4f18f509d1bfaeecb65ea5.0
Via: SIP/2.0/UDP [x::1]:5060;received=x:1;rport=5060;received=x:1;rport=5060;branch=z9hG4bK152CABB1BC44E9A0
From: <sip:y@x>;tag=00623356EBD9772B
To: <sip:x@[a::3][b::4]>
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 4.4.4 (x86_64/linux) 852c47
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.
id: 852c47
compiled on 14:05:47 Mar 7 2017 with gcc 4.9.2
```
* **Operating System**:
Debian 8.7
```
Linux x.x 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-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/1108
In the file kamailio-basic-kemi-python.py:65 it reads
```
# handle requests within SIP dialogs
self.ksr_route_withindlg(msg);
```
I wonder if it shouldn't read:
```
# handle requests within SIP dialogs
if self.ksr_route_withindlg(msg) == -255:
return 1
# -- only initial requests (no To tag)
```
Seems like that is the intended behavior based on the native example script and the return codes from ksr_route_withindlg(). Kamailio will always keep processing everything below line 69 regardless of the outcome of ksr_route_withindlg(). It might run fine anyway, but the comment is misleading in that case.
I'm a beginner on Kamailio so any apologies if I misunderstood something here.
The KEMI module is really exciting and we are developing a new project with it. So far it works great!
--
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/1117
Module: kamailio
Branch: master
Commit: a813dec2d82ced5ae0891f71f12e11dbd9a6cd37
URL: https://github.com/kamailio/kamailio/commit/a813dec2d82ced5ae0891f71f12e11d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-05-04T18:01:43+02:00
modules: readme files regenerated - rtpengine ... [skip ci]
---
Modified: src/modules/rtpengine/README
---
Diff: https://github.com/kamailio/kamailio/commit/a813dec2d82ced5ae0891f71f12e11d…
Patch: https://github.com/kamailio/kamailio/commit/a813dec2d82ced5ae0891f71f12e11d…
---
diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README
index 8ecb5e3..5215d6f 100644
--- a/src/modules/rtpengine/README
+++ b/src/modules/rtpengine/README
@@ -857,6 +857,13 @@ rtpengine_offer();
messages. Including the “To” tag in a “delete” messages allows
you to be more selective about which dialogues within a call
are being torn down.
+ + to-tag=... - use the specified string as “To” tag instead of
+ the actual “To” tag from the SIP message, and force inclusion
+ of the tag in the message as per above.
+ + from-tag=... - use the specified string as “From” tag instead
+ of the actual “From” tag from the SIP message.
+ + call-id=... - use the specified string as “Call-ID” instead of
+ the actual “Call-ID” from the SIP message.
+ rtcp-mux-demux - if rtcp-mux (RFC 5761) was offered, make the
RTP proxy accept the offer, but not offer it to the recipient
of this message.
lots of fixes needed for proper operation
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1119
-- Commit Summary --
* kazoo : add specific pua helpers
* kazoo : code cleanup
* kazoo : producer heartbeats
* kazoo : add consistent worker binding option
* kazoo : add broker zone to received payload
* kazoo: add zone to connection event
* kazoo: add exchange bindings
* kazoo: create empty routing if not provided
* kazoo: parse json with amqp specified bytes
* kazoo: fix connection to root vhost
* kazoo: add pua transaction lock type
* kazoo: add more explicit fields to kz_pua
* kazoo: add consistent worker key
* kazoo: add time msg was received
* kazoo: call cfg_update on child init
* kazoo: add alternative name for sender
* kazoo: missing sender alternative for presence
* kazoo : fix json keys
* kazoo: split exchange/queue declarations
-- File Changes --
M src/modules/kazoo/defs.h (13)
M src/modules/kazoo/kazoo.c (30)
M src/modules/kazoo/kz_amqp.c (988)
M src/modules/kazoo/kz_amqp.h (85)
M src/modules/kazoo/kz_json.c (89)
M src/modules/kazoo/kz_json.h (53)
M src/modules/kazoo/kz_pua.c (593)
M src/modules/kazoo/kz_pua.h (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1119.patchhttps://github.com/kamailio/kamailio/pull/1119.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/1119