#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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)
- [ ] 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
This is the selectors feature for `lost` module.
The module still in development but the core functionality is working.
What need to do
1. separate feature into dedicated `.c` file;
2. rebase on current `lost` implementation;
3. add documentation;
4. add a unit test.
Would be fine if we can merge this into 5.5.
This branch based on e7d68556e3560f488c4f421731f78b3f9abe549e commit
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2705
-- Commit Summary --
* http_client: http_client_request (api) content-type header support
* lost: new features, attributes and a new function to dereference location
* lost: bug-fix due to a code formatting error
* lost: DOM level count fix
* http_client: duplicated code removed
* lost: README update
* lost: memory leak fix and code refactoring
* lost: implemented sectors
-- File Changes --
M src/modules/http_client/curl_api.c (1)
M src/modules/http_client/curl_api.h (3)
M src/modules/http_client/functions.c (30)
M src/modules/http_client/functions.h (14)
M src/modules/lost/doc/lost.xml (2)
M src/modules/lost/doc/lost_admin.xml (172)
M src/modules/lost/functions.c (921)
M src/modules/lost/functions.h (3)
M src/modules/lost/lost.c (754)
A src/modules/lost/naptr.c (255)
A src/modules/lost/naptr.h (38)
M src/modules/lost/pidf.c (5)
A src/modules/lost/response.c (991)
A src/modules/lost/response.h (131)
M src/modules/lost/utilities.c (532)
M src/modules/lost/utilities.h (65)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2705.patchhttps://github.com/kamailio/kamailio/pull/2705.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/2705
0xffffffff00000000ULL mask does not take into consideration signed 32 bit
integers and as result 2147483648 will be stored as -2147483648.
Another mask should be used to correct the issue: 0xffffffff80000000ULL.
It processes correctly the case of integers that are greater than 2147483647.
There are several gdb tests below:
(gdb) p ((unsigned long long)2147483648 & 0xffffffff80000000ULL)
$1= 2147483648
(gdb) p ((unsigned long long)2147483647 & 0xffffffff80000000ULL)
$2 = 0
(gdb) p ((unsigned long long)2147483646 & 0xffffffff80000000ULL)
$3 = 0
(gdb) p ((unsigned long long)4147483646 & 0xffffffff80000000ULL)
$4 = 2147483648
<!-- 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 -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2106
-- Commit Summary --
* lib: big integers should not be treated as negative ones
-- File Changes --
M src/lib/srdb1/db_ut.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2106.patchhttps://github.com/kamailio/kamailio/pull/2106.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/2106
<!--
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
dialog module does not update callee tag until it receives a 2xx response to an INVITE.
and so we can not use is_know_dlg() function for in-dialog request like UPDATE when the session is still in early state.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamailio 5.5.4
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3155
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3155(a)github.com>
### Description
If the file loaded with the modparam "load" uses CommonJS modules (Issue #3037-PR #3038), the modules are not reloaded when issuing the command app_jsdt.reload. Only the "main" file is reloaded.
#### Reproduction
1 - Start Kamailio with those files as the initial configuration
```generic
# kamailio.cfg
## Only the part concerning app_jsdt is included.
## The rest of the config file is ommited for the sake of clarity
loadmodule "app_jsdt.so"
modparam("app_jsdt", "load", "/etc/kamailio/js/index.js")
modparam("app_jsdt", "mode", 1)
cfgengine "jsdt"
```
```js
// index.js
var myModule = require('./myModule');
function ksr_request_route() {
myModule.myFunction()
KSR.log("info", "KSR.log called from the index.js file");
}
```
```js
// myModule.js
exports.myFunction = function() {
KSR.log("info", "KSR.log called from the myModule.js file"
}
```
2 - Modify the myModule.js file
```js
// myModule.js
exports.myFunction = function() {
KSR.log("info", "KSR.log called from the MODIFIED myModule.js file"
}
```
3 - Run the reload command
```console
foo@bar:~# kamcmd app_jsdt.reload
{
old: 0
new: 1
}
```
> Log file
>
> INFO: app_jsdt [app_jsdt_api.c:1557]: app_jsdt_rpc_reload(): marking for reload js script file: /etc/kamailio/js/index.js (0 => 0)
> DEBUG: app_jsdt [app_jsdt_api.c:534]: jsdt_kemi_reload_script(): reloading js script file: /etc/kamailio/js/index.js (0 => 1)
4 - The log file still show those lines:
> Log file
>
>INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the myModule.js file
>INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the index.js file
5 - Modify the index.js file
```js
// index.js
var myModule = require('./myModule');
function ksr_request_route() {
myModule.myFunction()
KSR.log("info", "KSR.log called from the MODIFIED index.js file");
}
```
6 - Run the reload command
```console
foo@bar:~# kamcmd app_jsdt.reload
{
old: 1
new: 2
}
```
> Log file
>
> INFO: app_jsdt [app_jsdt_api.c:1557]: app_jsdt_rpc_reload(): marking for reload js script file: /etc/kamailio/js/index.js (0 => 1)
> DEBUG: app_jsdt [app_jsdt_api.c:534]: jsdt_kemi_reload_script(): reloading js script file: /etc/kamailio/js/index.js (1 => 2)
7 - The log file now show those lines:
> Log file
>
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the myModule.js file
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the MODIFIED index.js file
8 - Restart kamailio completly
9 - The log file now show those lines:
> Log file
>
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the MODIFIED myModule.js file
> INFO <core> [core/kemi.c:156]: sr_kemi_core_log(): KSR.log called from the MODIFIED index.js file
### Possible Solutions
Sorry, I would really like to provide one, but, as I'm a new Kamailio user, I don't know all the internals yet.
### Additional Information
* **Kamailio Version**
```console
foo@bar:~# kamailio -v
version: kamailio 5.6.0 (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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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 10.2.1
```
* **Operating System**:
```console
foo@bar:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
foo@bar:~# uname -a
Linux localhost 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3145
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3145(a)github.com>
### Description
OPTIONS keepalives sent by usrloc are not being traced with HEP/Homer
### Troubleshooting
#### Reproduction
Module setup:
modparam("siptrace", "duplicate_uri","sip:HOMERIP:9060");
modparam("siptrace", "hep_mode_on",1);
modparam("siptrace", "trace_to_database",0);
modparam("siptrace", "trace_flag",22);
modparam("siptrace", "trace_on", 1);
modparam("siptrace", "hep_version", 3);
modparam("siptrace", "trace_mode", 1)
I believe the above setup should duplicate ALL packets to homer, which is working just fine, except for usrloc-generated OPTIONS.
The 200 OK from endpoints is showing up just fine, just not the initial request.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3136
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3136(a)github.com>
ITNOA
### Description
I think for non-db deployment of Kamailio it is very useful to add support static data (like another configurations) for caller numbers list in user blocklist module. because if we do not have this feature we cannot use this module in non-db deployment of Kamailio.
### Expected behavior
We have a configuration files (like dispatcher file) that contains below information in format of space separated list (like dispatcher file format)
```
+----+----------------+-------------+-----------+-----------+
| id | username | domain | prefix | whitelist |
+----+----------------+-------------+-----------+-----------+
| 23 | 49721123456788 | | 1234 | 0 |
| 22 | 49721123456788 | | 123456788 | 1 |
| 21 | 49721123456789 | | 12345 | 0 |
| 20 | 494675231 | | 499034133 | 1 |
| 19 | 494675231 | test | 499034132 | 0 |
| 18 | 494675453 | test.domain | 49901 | 0 |
| 17 | 494675454 | | 49900 | 0 |
+----+----------------+-------------+-----------+-----------+
```
and user blocklist module read this file and load it, and apply this data for blocking call
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3132
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3132(a)github.com>
<!--
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).
-->
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I incremented sess-version w/ value `2147483648` via `$sdp(sess_version) = -1` as well as `$sdp(sess_version) = 2147483648`.
sess-version in SDP should be 2147483649 but is `-1941279658`.
### Troubleshooting
[RFC4566 5.2. Origin ("o=")](https://datatracker.ietf.org/doc/html/rfc4566#section-5.2)
```
<sess-version> is a version number for this session description. Its
usage is up to the creating tool, so long as <sess-version> is
increased when a modification is made to the session data. Again,
it is RECOMMENDED that an NTP format timestamp is used.
```
[Wikipedia NTP Timestamps](https://en.wikipedia.org/wiki/Network_Time_Protocol#Timestamps)
```
The 64-bit binary fixed-point timestamps used by NTP consist of a 32-bit part for seconds and a 32-bit part for fractional second, giving a time scale that rolls over every 232 seconds (136 years) and a theoretical resolution of 2−32 seconds (233 picoseconds). NTP uses an epoch of January 1, 1900. Therefore, the first rollover occurs on February 7, 2036.[28][29]
```
#### Reproduction
Receive SDP w/ sess-version greater equal 2^31 (2147483648) and increase version via `$sdp(sess-version) = -1` or setting a value greater than 2^31.
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
May 02 06:43:20.578496 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:622]: extract_sess_version(): oline(46): >o=user1 53655765 2147483648 IN IP4 127.0.0.1
<
May 02 06:43:20.578501 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:651]: extract_sess_version(): end 10: >2147483648<
May 02 06:43:20.578508 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:506]: extract_mediaip(): located IP address [127.0.0.1] in `o=' field
May 02 06:43:20.578512 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:506]: extract_mediaip(): located IP address [127.0.0.1] in `c=' field
May 02 06:43:20.578532 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578536 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578576 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578581 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578695 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2111]: pv_set_sdp(): res->flags: 24
May 02 06:43:20.578702 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2112]: pv_set_sdp(): PV_TYPE_INT: 16
May 02 06:43:20.578705 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2113]: pv_set_sdp(): PV_VAL_INT: 8
May 02 06:43:20.578708 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2116]: pv_set_sdp(): param.pvn.u.isname.name.n = 1
May 02 06:43:20.578710 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:2125]: pv_set_sdp(): do $sdp(sess_version) = -1941279658
May 02 06:43:20.578713 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578716 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578750 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1971]: sdp_set_sess_version(): old_sess_version_num: -2147483648 autoincrement: 0
May 02 06:43:20.578756 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317(a)127.0.0.1} sdpops [sdpops_mod.c:1972]: sdp_set_sess_version(): *new_sess_version_num: -1941279658 autoincrement: 0
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.4 (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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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 10.2.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Linux debian11 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3099
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3099(a)github.com>