#### 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
<!--
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:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
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
I have 2 jsonrpc servers configured with different prio's. For testing, I have the servers configured to always delay the response to any request by more than the module's timout setting.
The (initial) request is sent to the first server. As this one times out, I would expect a retry to go to the second servers, but instead, all retries are sent to the same server. The backup server is never contacted. This makes the whole "prio" system seem a bit useless.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
```
modparam("janssonrpcc", "server", "conn=test;addr=pc1;port=8081;priority=5;weight=10")
modparam("janssonrpcc", "server", "conn=test;addr=pc1;port=8082;priority=5;weight=10")
```
```
janssonrpc_request("test", "Test.Timeout", '[ { "Timout": 1000} ]', "route=JSONRPC_RESPONSE;retry=10;timeout=1000");
```
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Log Messages
No useful logs are produced. I verified the described behavior on the jsonrpc server.
<!--
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).
-->
```
2023-02-23T16:59:34.585346+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:361]: bev_connect(): Connecting to server pc1:8081 for conn rating.
2023-02-23T16:59:34.585420+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:361]: bev_connect(): Connecting to server pc1:8082 for conn rating.
2023-02-23T16:59:34.585446+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:290]: bev_connect_cb(): Connected to host pc1:8081
2023-02-23T16:59:34.585462+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:290]: bev_connect_cb(): Connected to host pc1:8082
2023-02-23T17:05:10.903398+01:00 pc1 proxy1[340870]: WARNING: janssonrpcc [janssonrpc_request.c:247]: schedule_retry(): Number of retries exceeded. Failing request.
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
Retry in combination with a timeout and prio's is a bit tricky. When do what? Just retrying on the first prio makes the lower prio servers completely useless, while going to the next prio on every retry skips possibly useful high-prio servers and may exhaust the number of candidate servers very fast.
Best solution IMHO would be to first try every server in the highest prio, before going to the next prio. Do not do (exponential) backoff between these steps.
If there are still retries remaining after that, wrap around to the highest prio with the exponentional backoff delay.
With the above, failover considers all servers and failover between servers is fast while not overloading a single server.
BTW. If I configure multiple servers per prio, it seems to randomly select one of them for every (re)try. It never selects one form the next prio.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
5.6.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`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3378
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3378(a)github.com>
Hi
I have a kimailio box that receives messages from one interface and send it from another interface and I use dispatcher module successfully.
Now I assigned an I range to Linux loopback interface through Linux kernel anyip feature. And I can ping the range.
ip -4 route add local 192.168.0.0/24 dev lo
I want to send messages from source of the ip in this range but kamailio cant do this in the right way.
I added this two directives to kamailio.cfg:
mhomed=yes
ip_free_bind = 1
and when I want to use an ip from the list I use
$fs=”udp:192.168.0.120:5060”;
With no luck
If I use
force_send_socket(udp:192.168.0.120:5060);
kamailio returns an error
bad force_send_socket argument: 192.168.0.120:5060 (kamailio doesn't listen on it)
and if I add listen directive for one ip like:
listen=udp:192.168.0.120:5060
everything works fine but I want to be able to use any ip from list not just one ip.
Thanks.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3394
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3394(a)github.com>
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 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)
- [ ] 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 -->
topoh: uses socket IP when no mask_ip is defined
If the parameter mask_ip is not defined the module finds the socket IP
and uses that as mask IP for the message.
If the socket has an advertised IP it is used, otherwise the socket IP is used.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3341
-- Commit Summary --
* topoh: uses socket IP when no mask_ip is defined
* Merge remote-tracking branch 'upstream/master'
-- File Changes --
M src/modules/topoh/doc/topoh_admin.xml (4)
M src/modules/topoh/th_msg.c (55)
M src/modules/topoh/th_msg.h (16)
M src/modules/topoh/topoh_mod.c (309)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3341.patchhttps://github.com/kamailio/kamailio/pull/3341.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3341
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3341(a)github.com>
warning on alpine dist
```
In file included from kz_amqp.c:32:
/usr/include/amqp.h:7:2: warning: #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead." [-Wcpp]
7 | #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."
| ^~~~~~~
In file included from kz_amqp.c:33:
/usr/include/amqp_framing.h:8:2: warning: #warning "amqp_framing.h is deprecated, use rabbitmq-c/framing.h instead. [-Wcpp]
8 | #warning "amqp_framing.h is deprecated, use rabbitmq-c/framing.h instead.
| ^~~~~~~
In file included from kz_amqp.c:34:
/usr/include/amqp_tcp_socket.h:7:2: warning: #warning "amqp_tcp_socket.h is deprecated, use rabbitmq-c/tcp_socket.h instead." [-Wcpp]
7 | #warning "amqp_tcp_socket.h is deprecated, use rabbitmq-c/tcp_socket.h instead."
| ^~~~~~~
In file included from kz_amqp.c:35:
/usr/include/amqp_ssl_socket.h:9:2: warning: #warning "amqp_ssl_socket.h is deprecated, use rabbitmq-c/ssl_socket.h instead. [-Wcpp]
9 | #warning "amqp_ssl_socket.h is deprecated, use rabbitmq-c/ssl_socket.h instead.
| ^~~~~~~
In file included from kz_amqp.h:35,
from kazoo.c:36:
/usr/include/amqp.h:7:2: warning: #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead." [-Wcpp]
7 | #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."
| ^~~~~~~
kz_amqp.c: In function 'kz_amqp_connection_open_ssl':
kz_amqp.c:815:13: warning: 'amqp_set_initialize_ssl_library' is deprecated [-Wdeprecated-declarations]
815 | amqp_set_initialize_ssl_library(1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/amqp_ssl_socket.h:11:
/usr/include/rabbitmq-c/ssl_socket.h:233:16: note: declared here
233 | void AMQP_CALL amqp_set_initialize_ssl_library(amqp_boolean_t do_initialize);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M kazoo.so] kz_fixup.o
CC (gcc) [M kazoo.so] kz_hash.o
In file included from kz_amqp.h:35,
from kz_hash.h:33,
from kz_hash.c:29:
/usr/include/amqp.h:7:2: warning: #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead." [-Wcpp]
7 | #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."
| ^~~~~~~
CC (gcc) [M kazoo.so] kz_json.o
CC (gcc) [M kazoo.so] kz_pua.o
kz_amqp.c: In function 'kz_amqp_send_ex':
kz_amqp.c:2327:12: warning: 'num_headers' may be used uninitialized [-Wmaybe-uninitialized]
2327 | if (num_headers > 0) {
| ^
kz_amqp.c:2281:9: note: 'num_headers' was declared here
2281 | int num_headers = 0;
| ^~~~~~~~~~~
CC (gcc) [M kazoo.so] kz_trans.o
In file included from kz_amqp.h:35,
from kz_trans.c:54:
/usr/include/amqp.h:7:2: warning: #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead." [-Wcpp]
7 | #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."
| ^~~~~~~
make[3]: Entering directory '/usr/src/kamailio/pkg/kamailio/alpine/src/kamailio-95d33167cff13190b51c04b5347df6d419cf2630/src/lib/srdb1'
make[3]: 'libsrdb1.so.1.0' is up to date.
make[3]: Leaving directory '/usr/src/kamailio/pkg/kamailio/alpine/src/kamailio-95d33167cff13190b51c04b5347df6d419cf2630/src/lib/srdb1'
LD (gcc) [M kazoo.so] kazoo.so
make[2]: --libs: No such file or directory
make[2]: --libs: No such file or directory
CC (gcc) [M rabbitmq.so] rabbitmq.o
CC (gcc) [M rabbitmq.so] utils.o
In file included from utils.c:47:
/usr/include/amqp.h:7:2: warning: #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead." [-Wcpp]
7 | #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."
| ^~~~~~~
In file included from utils.c:48:
/usr/include/amqp_framing.h:8:2: warning: #warning "amqp_framing.h is deprecated, use rabbitmq-c/framing.h instead. [-Wcpp]
8 | #warning "amqp_framing.h is deprecated, use rabbitmq-c/framing.h instead.
| ^~~~~~~
In file included from rabbitmq.c:55:
/usr/include/amqp_tcp_socket.h:7:2: warning: #warning "amqp_tcp_socket.h is deprecated, use rabbitmq-c/tcp_socket.h instead." [-Wcpp]
7 | #warning "amqp_tcp_socket.h is deprecated, use rabbitmq-c/tcp_socket.h instead."
| ^~~~~~~
In file included from rabbitmq.c:56:
/usr/include/amqp.h:7:2: warning: #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead." [-Wcpp]
7 | #warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."
| ^~~~~~~
In file included from rabbitmq.c:57:
/usr/include/amqp_framing.h:8:2: warning: #warning "amqp_framing.h is deprecated, use rabbitmq-c/framing.h instead. [-Wcpp]
8 | #warning "amqp_framing.h is deprecated, use rabbitmq-c/framing.h instead.
| ^~~~~~~
LD (gcc) [M rabbitmq.so] rabbitmq.so
CC (gcc) [M sctp.so] sctp_mod.o
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3464
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3464(a)github.com>
hello ,
I 'm trying to change value "xhttp_prom_timeout" to specific value , for instance 1 minute , to do i set command : modparam("xhttp_prom", "xhttp_prom_timeout", 1) , but it seems metrics is not deleted after 1 minute of not using this metric , only metric is deleted after 10 hours , even i set xhttp_prom_timeoutto 1
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3439
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3439(a)github.com>
### Description
_**Sipwise** hat on_
We noticed that pkg memory was getting exhausted and we found out that pv_cache_add() was the origin of the allocations.
We are using ``$xavp(user_<UUID>)`` variables that, for sure, are kind of dynamic.
There is a pv_cache_drop() that tries to remove ``$sht()`` occurrences when the cache is about to be filled but in our case that's not helping.
#### Log Messages
```
WARNING: ROUTE_SET_CALLEE_DIALOG_TOTAL <core> [core/pvapi.c:340]: pv_cache_add(): pv cache limit is going to be exceeded - pkg memory may get filled with pv declarations
WARNING: dialog:failed <core> [core/pvapi.c:340]: pv_cache_add(): pv cache limit is going to be exceeded - pkg memory may get filled with pv declarations
```
### Possible Solutions
Possible solutions that came on the top of my head:
- add a datetime member to struct _pv_cache so we can keep the last time it was accessed and search for the oldest and remove them in pv_cache_drop()
- add pv module parameter to define a magic prefix, for instance '__' that will mark those vars as "temporal" should remove it from cache when needed.
- add pv module parameter to control what types of variables will be added to cache
Any thoughts about this?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3440
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3440(a)github.com>