<!-- 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
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] 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
I've marked this as a "breaking change" only because it slightly alters the error handling of the RPC dlg.list_match command, to draw attention to it. But the actual functionality is unchanged.
This PR adds a new script function to the dialog module: `dlg_get_matches`. This has the same behaviour as the RPC `dlg.list_match` command, but allows use in scripts. The results are returned in an XAVP of a specified name, as an array of fields.
```
dlg_get_matches(mkey, mop, mval, xavp_name[, max_results]);
Returns number of matches found. Or -1 if there's an error.
```
An example of use would be:
```
xlog("Extension is: $var(ext)\n");
$avp(dlg_count) = dlg_get_matches("turi", "sw", "sip:nexusone$var(ext)@", "dlg_matches");
xlog("Got $avp(dlg_count) matches.\n");
$var(i) = 0;
$var(matched) = 0;
while ($var(i) < $avp(dlg_count))
{
//Skip dialogs that are not early state
if ($xavp(dlg_matches[$var(i)]=>state) == 2)
{
xlog("Found matching dlg[$var(i)]: $xavp(dlg_matches[$var(i)]=>from_uri)\n");
}
}
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3005
-- Commit Summary --
* dialog: Adding dlg_get_matches function based on RPC dlg.list_match command.
* dialog: Adding documentation for dlg_get_matches function.
* dialog: Refactored dlg_get_matches and dlg.list_match RPC command to use a shared dlg_list_matches function.
-- File Changes --
M src/modules/dialog/dialog.c (793)
M src/modules/dialog/doc/dialog_admin.xml (92)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3005.patchhttps://github.com/kamailio/kamailio/pull/3005.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3005
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3005(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
- [x] Related to issue #3278
#### Description
When websocket is closed, then possible race condition websocket removal and websocket keepalive functions.
[ws_frame.c:816](https://github.com/kamailio/kamailio/blob/ac4c2d4579f121395… - setting socked state `WS_S_CLOSING`
[ws_conn.c:703](https://github.com/kamailio/kamailio/blob/master/src/modules… - setting socket state `WS_S_REMOVING` and updates `rmticks` value.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3331
-- Commit Summary --
* websocket: ignoring keepalive for socket in the removing state (GH #3278)
-- File Changes --
M src/modules/websocket/ws_frame.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3331.patchhttps://github.com/kamailio/kamailio/pull/3331.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3331
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3331(a)github.com>
```
CC (gcc) [kamailio] core/nonsip_hooks.o
CC (gcc) [kamailio] core/onsend.o
CC (gcc) [kamailio] core/pass_fd.o
CC (gcc) [kamailio] core/ppcfg.o
In file included from core/ppcfg.c:37:
core/utils/snexpr.h: In function 'snexpr_create':
core/utils/snexpr.h:1247:98: warning: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size 2 [-Wformat-truncation=]
1247 | snprintf(varname, sizeof(varname) - 1, "$%d",
| ^~
core/utils/snexpr.h:1247:96: note: directive argument in the range [-2147483646, 2147483647]
1247 | snprintf(varname, sizeof(varname) - 1, "$%d",
| ^~~~~
core/utils/snexpr.h:1247:57: note: 'snprintf' output between 3 and 13 bytes into a destination of size 3
1247 | snprintf(varname, sizeof(varname) - 1, "$%d",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1248 | (j + 1));
| ~~~~~~~~
CC (gcc) [kamailio] core/proxy.o
CC (gcc) [kamailio] core/pt.o
CC (gcc) [kamailio] core/pv_core.o
CC (gcc) [kamailio] core/pvapi.o
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3330
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3330(a)github.com>
I am trying to create a docker image which contains a preconfigured Kamailio server in presence mode.
My image is based off the official Kamailio docker image version **kamailio/kamailio:5.6.2-bullseye**.
My **kamctlrc** file is as follows.
```
SIP_DOMAIN="my-domain.com"
DBENGINE="DBTEXT"
DB_PATH="/usr/share/kamailio/dbtext"
MD5="md5sum"
AWK="awk"
GDB="gdb"
GREP="grep"
EGREP="egrep"
SED="sed"
LAST_LINE="tail -n 1"
EXPR="expr"
INSTALL_EXTRA_TABLES="yes"
INSTALL_PRESENCE_TABLES="yes"
INSTALL_DBUID_TABLES="yes"
RPCFIFOPATH="/run/kamailio/kamailio_rpc.fifo"
PID_FILE="/run/kamailio/kamailio.pid"
```
However, when I try to run **kamdbctl create** I get the following error.
`'18 0.402 ** ERROR: database engine not loaded - tried 'DBTEXT`
Can anyone shed any light on what I am doing wrong here?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3333
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3333(a)github.com>