Module: kamailio
Branch: master
Commit: c2c3211cd31405188891abd16ef770c26a8ddd44
URL: https://github.com/kamailio/kamailio/commit/c2c3211cd31405188891abd16ef770c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-26T12:30:06+02:00
dialog: api function to get the status if dlg var is set or not
---
Modified: src/modules/dialog/dlg_cb.h
Modified: src/modules/dialog/dlg_var.c
Modified: src/modules/dialog/dlg_var.h
---
Diff: https://github.com/kamailio/kamailio/commit/c2c3211cd31405188891abd16ef770c…
Patch: https://github.com/kamailio/kamailio/commit/c2c3211cd31405188891abd16ef770c…
---
diff --git a/src/modules/dialog/dlg_cb.h b/src/modules/dialog/dlg_cb.h
index 86a85bb2e1..a685816306 100644
--- a/src/modules/dialog/dlg_cb.h
+++ b/src/modules/dialog/dlg_cb.h
@@ -63,6 +63,9 @@ typedef int (*get_dlg_varval_f)( struct dlg_cell* dlg,
/* method to get a variable value pkg-allocated duplicate from a dialog */
typedef int (*get_dlg_vardup_f)( struct dlg_cell* dlg,
str* key, str* val);
+/* method to get if a variable value is set or not from a dialog */
+typedef int (*get_dlg_varstatus_f)( struct dlg_cell* dlg,
+ str* key);
#define CONFIRMED_DIALOG_STATE 1
diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index 8edde80f1b..473736b437 100644
--- a/src/modules/dialog/dlg_var.c
+++ b/src/modules/dialog/dlg_var.c
@@ -376,6 +376,31 @@ int get_dlg_vardup(struct dlg_cell *dlg, str *key, str *val)
return -2;
}
+/**
+ * return the status if the dlg variable value is set or not
+ * - 1 - variable is set
+ * - 0 - variable is not set
+ */
+int get_dlg_varstatus(struct dlg_cell *dlg, str *key)
+{
+ str* var = NULL;
+ int ret = 0;
+
+ if( !dlg || !key || key->len<=0) {
+ LM_ERR("BUG - bad parameters\n");
+ return 0;
+ }
+
+ dlg_lock(d_table, &(d_table->entries[dlg->h_entry]));
+ var = get_dlg_variable_unsafe(dlg, key);
+ if(var && var->s) {
+ ret = 1;
+ }
+ dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
+
+ return ret;
+}
+
int get_dlg_variable_uintval(struct dlg_cell *dlg, str *key, unsigned int *uval)
{
str* var = NULL;
diff --git a/src/modules/dialog/dlg_var.h b/src/modules/dialog/dlg_var.h
index 52f2a01a60..292e9f701b 100644
--- a/src/modules/dialog/dlg_var.h
+++ b/src/modules/dialog/dlg_var.h
@@ -62,6 +62,7 @@ typedef struct dlg_var {
str* get_dlg_varref(dlg_cell_t *dlg, str *key);
int get_dlg_varval(dlg_cell_t *dlg, str *key, str *val);
int get_dlg_vardup(dlg_cell_t *dlg, str *key, str *val);
+int get_dlg_varstatus(dlg_cell_t *dlg, str *key);
int set_dlg_variable(dlg_cell_t *dlg, str *key, str *val);
int get_dlg_variable_uintval(struct dlg_cell *dlg, str *key, unsigned int *uval);
Module: kamailio
Branch: master
Commit: 8548aaa8a798b939e041821848b2f05b963451d8
URL: https://github.com/kamailio/kamailio/commit/8548aaa8a798b939e041821848b2f05…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-26T12:04:29+02:00
dialog: updated comments for api functions to get dlg var value
---
Modified: src/modules/dialog/dlg_cb.h
---
Diff: https://github.com/kamailio/kamailio/commit/8548aaa8a798b939e041821848b2f05…
Patch: https://github.com/kamailio/kamailio/commit/8548aaa8a798b939e041821848b2f05…
---
diff --git a/src/modules/dialog/dlg_cb.h b/src/modules/dialog/dlg_cb.h
index 91064ee9e0..86a85bb2e1 100644
--- a/src/modules/dialog/dlg_cb.h
+++ b/src/modules/dialog/dlg_cb.h
@@ -54,13 +54,13 @@ typedef int (*register_dlgcb_f)(struct dlg_cell* dlg, int cb_types,
typedef int (*set_dlg_variable_f)( struct dlg_cell* dlg,
str* key,
str* val);
-/* method to get a variable from a dialog */
+/* method to get a variable value reference from a dialog */
typedef str* (*get_dlg_varref_f)( struct dlg_cell* dlg,
str* key);
-/* method to get a variable from a dialog */
+/* method to get a variable value static-buffer duplicate from a dialog */
typedef int (*get_dlg_varval_f)( struct dlg_cell* dlg,
str* key, str* val);
-/* method to get a variable value duplicate from a dialog */
+/* method to get a variable value pkg-allocated duplicate from a dialog */
typedef int (*get_dlg_vardup_f)( struct dlg_cell* dlg,
str* key, str* val);
Hi Mojtaba,
no worries, you can just revert it with “git revert $commit-ID” for the specific commit.
I can also do it later today, no problem.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: Mojtaba <mespio(a)gmail.com>
Sent: Saturday, September 24, 2022 1:35 PM
To: Henning Westerholt <hw(a)gilawa.com>
Subject: Re: [sr-dev] git:master:f2b07f23: lrkproxy: Add new features : TURN support, behind_nat support, subset of range ports
Hello Henning,
After I pushed it, I got this issue.
Please rollback this commit, then I will push the changes related to LRKProxy again.
Thanks
On Sat, Sep 24, 2022 at 2:58 PM Henning Westerholt <hw(a)gilawa.com<mailto:hw@gilawa.com>> wrote:
Hello Mojtaba,
There seems to be an issue with this commit, you've removed something related to the tls_wolfssl module.
Cheers,
Henning
-----Original Message-----
From: sr-dev <sr-dev-bounces(a)lists.kamailio.org<mailto:sr-dev-bounces@lists.kamailio.org>> On Behalf Of Mojtaba Esfandiari.S
Sent: Saturday, September 24, 2022 12:56 PM
To: sr-dev(a)lists.kamailio.org<mailto:sr-dev@lists.kamailio.org>
Subject: [sr-dev] git:master:f2b07f23: lrkproxy: Add new features : TURN support, behind_nat support, subset of range ports
Module: kamailio
Branch: master
Commit: f2b07f2321980e74247cb0c968b98925172f6874
URL: https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
Author: Mojtaba Esfandiari.S <mespio(a)gmail.com<mailto:mespio@gmail.com>>
Committer: Mojtaba Esfandiari.S <mespio(a)gmail.com<mailto:mespio@gmail.com>>
Date: 2022-09-24T14:25:24+03:30
lrkproxy: Add new features : TURN support, behind_nat support, subset of range ports
---
Removed: misc/external/wolfssl/wolfssl
---
Diff: https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
Patch: https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
---
diff --git a/misc/external/wolfssl/wolfssl b/misc/external/wolfssl/wolfssl deleted file mode 160000 index 57aac1c50b4..00000000000
--- a/misc/external/wolfssl/wolfssl
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 57aac1c50b45275c7a99eca32ad985998b292dc8
_______________________________________________
Kamailio (SER) - Development Mailing List sr-dev(a)lists.kamailio.org<mailto:sr-dev@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
--Mojtaba Esfandiari.S
After I pushed it, I got a issue.
Please roll back this commit, then I will push the changes related to LRKProxy again.
Thanks
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b9892…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/f2b07f2321980e74247cb0c968b98925172f6874/84890546(a)github.com>
Hello,
a new feature has landed to Kamailio devel version, bringing in more
flexibility for preprocessing of the kamailio.cfg file.
It is about #!ifexp, which allows to evaluate an expression created with
defined IDs, string and number values. Based on evaluation result, being
true or false, parts of the config file can be enabled or disabled.
An extensive number of operators can be used in expressions, such as: +,
-, *, /, ==, !=, <, >, <=, >=, ||, &&, etc. The evaluation is done using
snexpr (https://github.com/miconda/snexpr), which was embedded inside
Kamailio code.
Here are some simple kamailio.cfg examples:
#!ifexp KAMAILIO_VERSION >= 5006000
loadmodule "tlsa.so"
#!else
loadmodule "tls.so"
#!endif
#!ifexp MOD_xlog && (OS_NAME == "darwin")
xlog("running on MacOS\n");
#!endif
Documentation and more examples can be found on the wiki portal at:
- https://www.kamailio.org/wikidocs/cookbooks/devel/core/#ifexp
Testing would be appreciated, feedback can be addressed to sr-users
mailing list!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
### Description
By using the WebSocket module we noticed that the memory on the server keeps increasing daily even if the number of registered devices is decreasing
### Troubleshooting
#### Reproduction
Connect to the server through the wss and then disable the network adapter.
#### Debugging Data
If the TCP connection is closed forcefully (tested by disabling network adapter) then the number of current wss connections is not decreasing:
```
kamcmd stats.get_statistics all | grep "ws_current_connections"
```
The same happens with the allocated shared memory:
```
kamcmd mod.stats all shm | grep 'wsconn_'
```
wsconn_add(198) - this value is not decreasing.
Everything is working properly if the TCP connection is properly closed.
* **Operating System**:
```
CentOS 7 X64
3.10.0-1160.76.1.el7.x86_64
version: kamailio 5.6.1 (x86_64/linux) d8f98b
```
XHTTP Request Route:
```
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if (ws_handle_handshake()) {
xlog("L_INFO", "[$cfg(route)] websocket|log|handled HTTP request $rm from $si:$sp\n");
exit;
}
}
```
TCP Settings:
```
tcp_connection_lifetime=3605
tcp_accept_no_cl=yes
tcp_rd_buf_size=16384
tcp_connect_timeout=10
tcp_crlf_ping=yes
tcp_delayed_ack = yes
tcp_fd_cache = yes
tcp_keepalive = yes
tcp_keepcnt = 3
tcp_keepidle = 30
tcp_keepintvl = 10
tcp_accept_aliases=no
tcp_async=yes
tcp_linger2=30
tcp_max_connections=4096
tcp_send_timeout = 10
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3236
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3236(a)github.com>
Hello,
Kamailio SIP Server v5.5.5 stable release is out.
This is a maintenance release of the stable branch 5.5 that
includes fixes since the release of v5.5.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.5.x. Deployments running previous v5.5.x
versions are strongly recommended to be upgraded to v5.5.5.
Note that 5.5 is the second last stable branch, still officially maintained
by Kamailio development team. The latest stable branch is 5.6, with
v5.6.1 being release out of it.
For more details about version 5.5.5 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2022/09/kamailio-v5-5-5-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Oct 10-13, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Hello,
I am considering to release Kamailio v5.5.5 soon, likely on Monday or
Tuesday next week (Sep 19 or 20, 2022). This is the usual heads up
notification to see if anyone is aware of issues not yet reported to bug
tracker and if yes, do it as soon as possible to give them a chance to
be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Oct 10-13, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
#### 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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
rx_aar: unreference dialog in case of aar update
release the dialog reference even for aar updates as the dialog was
already referenced when issuing the aar request
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3244
-- Commit Summary --
* rx_aar: unreference dialog in case of aar update (#3104)
* ims_qos: fix compilation warning
-- File Changes --
M src/modules/ims_qos/rx_aar.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3244.patchhttps://github.com/kamailio/kamailio/pull/3244.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3244
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3244(a)github.com>
#### 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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
rx_aar: unreference dialog in case of aar update
release the dialog reference even for aar updates as the dialog was
already referenced when issuing the aar request
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3245
-- Commit Summary --
* rx_aar: unreference dialog in case of aar update (#3104)
-- File Changes --
M src/modules/ims_qos/rx_aar.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3245.patchhttps://github.com/kamailio/kamailio/pull/3245.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3245
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3245(a)github.com>
<!-- 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)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] 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 -->
I found how the indexes could get mixed up between the call to ds_sorted_by_priority() and ds_manage_routes_fill_reordered_xavp() resulting in invalid gateway list selection.
```
// TEST logs
I made some tests with 3 and 6 gateways, disabling one and then two.
Some test data :
INSERT INTO dispatcher VALUES(1,1,'sip:[192.168.0.1:5060](http://192.168.0.1:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(2,1,'sip:[192.168.0.2:5060](http://192.168.0.2:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(3,1,'sip:[192.168.0.3:5060](http://192.168.0.3:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(4,1,'sip:[192.168.0.4:5060](http://192.168.0.4:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(5,1,'sip:[192.168.0.5:5060](http://192.168.0.5:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(6,1,'sip:[192.168.0.6:5060](http://192.168.0.6:5060/)',0,12,'','');
Then disabling 2 gateways :
dispatcher.set_state i 1 sip:[192.168.0.1:5060](http://192.168.0.1:5060/)
dispatcher.set_state i 1 sip:[192.168.0.3:5060](http://192.168.0.3:5060/)
// ----------------- Routing Logic -----------------
//
route {
xinfo("[MAIN][$rm][$ci]from[$fU]to[$tU]ruri[$ru]Rp[$Rp]Ri[$Ri]\n");
if (!ds_select_dst("1","13", "-1")) {
xinfo("[MAIN] no gateway available !\n");
}
while (defined $xavp(_dsdst_)) {
xinfo("[MAIN] URI : $xavp(_dsdst_=>uri) \n");
pv_unset("$xavp(_dsdst_)");
}
return;
}
// Logs showing the gateways returned.
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][0]idx[1]uri[sip:[192.168.0.5:5060](http://192.168.0.5:5060/)]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][1]idx[2]uri[sip:192.168.0.4:5060]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2270]: ds_manage_route_algo13(): [inactive][2]idx[-1]uri[sip:192.168.0.3:5060]priority[12]latency[0ms]flag[1]
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][3]idx[4]uri[sip:192.168.0.2:5060]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2270]: ds_manage_route_algo13(): [inactive][4]idx[-1]uri[sip:192.168.0.1:5060]priority[12]latency[0ms]flag[1]
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][5]idx[0]uri[sip:192.168.0.6:5060]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2128]: ds_manage_routes_fill_reordered_xavp(): [4|sip:192.168.0.3:5060|idx:-1]skipped 1 || 1
0(398491) DEBUG: dispatcher [dispatch.c:2128]: ds_manage_routes_fill_reordered_xavp(): [5|sip:192.168.0.1:5060|idx:-1]skipped 1 || 1
0(398491) DEBUG: dispatcher [dispatch.c:2300]: ds_manage_route_algo13(): priority[12]gateway_selected[1]next_index[2]
0(398491) DEBUG: dispatcher [dispatch.c:2465]: ds_manage_routes(): using alg [13] hash [1]
0(398491) DEBUG: dispatcher [dispatch.c:2512]: ds_manage_routes(): selected [13-1-0/1] <sip:[192.168.0.5:5060](http://192.168.0.5:5060/)>
0(398491) DEBUG: dispatcher [dispatch.c:2107]: ds_select_dst_limit(): selected target destinations: 4
0(398491) INFO: <script>: [MAIN][sip:[192.168.0.5:5060](http://192.168.0.5:5060/)]
0(398491) INFO: <script>: [MAIN] URI : sip:192.168.0.5:5060
0(398491) INFO: <script>: [MAIN] URI : sip:[192.168.0.4:5060](http://192.168.0.4:5060/)
0(398491) INFO: <script>: [MAIN] URI : sip:[192.168.0.2:5060](http://192.168.0.2:5060/)
0(398491) INFO: <script>: [MAIN] URI : sip:[192.168.0.6:5060](http://192.168.0.6:5060/)
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3232
-- Commit Summary --
* dispatcher: fix alog13 gateway selections
-- File Changes --
M src/modules/dispatcher/dispatch.c (32)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3232.patchhttps://github.com/kamailio/kamailio/pull/3232.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3232
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3232(a)github.com>