### Description
I´m using kamailio´s sqlops-module on a postgresql database.
If the database server gets unreachable during operation, sqlops detects this and tries to reconnect:
```
14:40:48.784 WARNING: db_postgres [km_dbase.c:259]: db_postgres_submit_query(): postgres query command failed, connection status 1, error [no connection to the server]
14:40:48.784 DEBUG: db_postgres [km_dbase.c:262]: db_postgres_submit_query(): resetting the connection to postgress server
14:40:48.784 ERROR: db_postgres [km_dbase.c:267]: db_postgres_submit_query(): 0x7f80a8093680 PQsendQuery Error: could not connect to server: Connection refused
```
and finally, when the DB comes up again, succeeds in executing queries:
```
14:41:39.738 WARNING: db_postgres [km_dbase.c:259]: db_postgres_submit_query(): postgres query command failed, connection status 1, error [SSL connection has been closed unexpectedly]
14:41:39.739 DEBUG: db_postgres [km_dbase.c:262]: db_postgres_submit_query(): resetting the connection to postgress server
14:41:39.810 DEBUG: db_postgres [km_dbase.c:249]: db_postgres_submit_query(): sending query ok: 0x7f80a8093680 (1)
```
So, obviously the module can handle database outages well.
But if the DB is already down when kamailio is started, the cyclic reconnect does not work. Instead, kamailio fails to start immediately:
```
14:57:54.187 CRITICAL: <core> [main.c:1614]: main_loop(): Cannot fork
14:57:54.188 DEBUG: db_postgres [km_pg_con.c:112]: db_postgres_new_connection(): PQconnectdbParams(0x136bfb0)
14:57:54.188 DEBUG: <core> [core/sr_module.c:938]: init_mod_child(): idx 12 rank -1: rtimer [timer]
14:57:54.188 DEBUG: <core> [core/sr_module.c:938]: init_mod_child(): idx 12 rank -1: sqlops [timer]
14:57:54.188 DEBUG: <core> [core/sr_module.c:708]: find_mod_export_record(): found export of <db_bind_api> in module db_postgres [/usr/lib64/kamailio/modules/db_postgres.so]
14:57:54.188 DEBUG: <core> [db.c:209]: db_bind_mod(): using db bind api for db_postgres
14:57:54.188 DEBUG: <core> [db.c:314]: db_do_init2(): connection 0x7f23c0154120 not found in pool
14:57:54.188 DEBUG: db_postgres [km_pg_con.c:56]: db_postgres_new_connection(): db_id = 0x7f23c0154120
14:57:54.188 DEBUG: db_postgres [km_pg_con.c:70]: db_postgres_new_connection(): 0x7f23c0154380=pkg_malloc(80)
14:57:54.188 DEBUG: db_postgres [km_pg_con.c:84]: db_postgres_new_connection(): opening connection: postgres://xxxx:xxxx@xxxxxxxxxxxxxxxxxx
14:57:54.188 DEBUG: db_postgres [km_pg_con.c:112]: db_postgres_new_connection(): PQconnectdbParams(0x13a41e0)
14:57:54.188 ERROR: db_postgres [km_pg_con.c:115]: db_postgres_new_connection(): could not connect to server: Connection refused Is the server running on host "xxxxxxxxxxxx" () and accepting TCP/IP connections on port 5432?
14:57:54.188 ERROR: db_postgres [km_pg_con.c:148]: db_postgres_new_connection(): cleaning up 0x7f23c0154380=pkg_free()
14:57:54.188 ERROR: <core> [db.c:318]: db_do_init2(): could not add connection to the pool
14:57:54.188 ERROR: sqlops [sql_api.c:164]: sql_connect(): failed to connect to the database [cb]
14:57:54.188 ERROR: <core> [core/sr_module.c:942]: init_mod_child(): error while initializing module sqlops (/usr/lib64/kamailio/modules/sqlops.so) (idx: 12 rank: -1 desc: [timer])
14:57:54.189 ERROR: <core> [core/pt.c:340]: fork_process(): init_child failed for process 12, pid 24036, "timer"
14:57:54.189 CRITICAL: <core> [main.c:1691]: main_loop(): cannot fork timer process
14:57:54.189 ALERT: <core> [main.c:743]: handle_sigs(): child process 24009 exited normally, status=255
14:57:54.190 ALERT: <core> [main.c:743]: handle_sigs(): child process 24010 exited normally, status=255
14:57:54.190 ALERT: <core> [main.c:743]: handle_sigs(): child process 24011 exited normally, status=255
14:57:54.191 ALERT: <core> [main.c:743]: handle_sigs(): child process 24013 exited normally, status=255
14:57:54.191 ALERT: <core> [main.c:743]: handle_sigs(): child process 24015 exited normally, status=255
14:57:54.191 ALERT: <core> [main.c:743]: handle_sigs(): child process 24019 exited normally, status=255
14:57:54.191 ALERT: <core> [main.c:743]: handle_sigs(): child process 24030 exited normally, status=255
14:57:54.192 INFO: <core> [main.c:771]: handle_sigs(): terminating due to SIGCHLD
14:57:54.192 INFO: <core> [main.c:826]: sig_usr(): signal 15 received
14:57:54.192 INFO: <core> [main.c:826]: sig_usr(): signal 15 received
```
#### Reproduction
- use kamailio-script with sqlops
- stop kamailio
- stop database
- try to start kamailio
#### Log Messages
see above
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
kamailio 5.1.2 (x86_64/linux)
* **Operating System**:
RHEL 7.4 on x86_64
--
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/1681
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
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 you submit a feature request (or enhancement) add the description of what you would like to be added.
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
rightnow, we can check using dlg.dlg_list command whether call is alive or not but this command will return all data about dialog. There should be a xmlrpc command that will just return whether call is alive or not.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Expected behavior
#### Actual observed behavior
#### Debugging Data
```
(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 improvement.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **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 `uname -a`)
-->
```
root@ip-172-31-4-160:~# uname -a
Linux ip-172-31-4-160 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC 2018 x86_64 x86_64 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/1697
<!-- 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
This RPC command will help us to find out whether call is alive or not. Basically this command will return error if call is not alive (confirmed) else it will return string with dialog is alive.
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1740
-- Commit Summary --
* Merge pull request #1 from kamailio/master
* Module: Dialog xmlrpc isalive rpc command added
-- File Changes --
M src/modules/dialog/dialog.c (35)
M src/modules/dialog/doc/dialog.xml (5)
M src/modules/dialog/doc/dialog_admin.xml (28)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1740.patchhttps://github.com/kamailio/kamailio/pull/1740.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/1740
<!-- 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)
- [ ] 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
<!-- Describe your changes in detail -->
Kamailio crashes when codec-flags value are not setted with codecs. it is fixed.
codec-flags information added to document.
An example is added to document.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1742
-- Commit Summary --
* rtpengine : add information to doc about transcode
* rtpengine : codec flag crash is fixed
* rtpengine : codec-transcode and other flags are added to doc
-- File Changes --
M src/modules/rtpengine/doc/rtpengine_admin.xml (32)
M src/modules/rtpengine/rtpengine.c (20)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1742.patchhttps://github.com/kamailio/kamailio/pull/1742.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/1742
<!-- 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)
- [ ] 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
<!-- Describe your changes in detail -->
we have a use case where we need to drop the request within a transaction, and that is not possible because tm module will always send the final reply.
```
route[MYREQ]
{
## protect from retrans
if (!t_newtran()) {
xlog("L_ERROR", "$ci|log|failed to create transaction\n");
drop;
}
if(some early business use case that requires drop) {
xlog("L_INFO", "$ci|log|dropping request\n");
t_drop();
}
async_func_that_suspends_and_continues("$anyparam", "TR_OK", "TR_ERROR");
}
failure_route[TR_ERROR]
{
xlog("L_INFO", "$ci|log|failed $T_reply_code $T_reply_reason\n");
t_drop();
}
onreply_route[TR_OK]
{
xlog("L_INFO", "$ci|log|checking transaction result\n");
if(some business use case that requires dropping the request) {
t_drop();
}
...
}
```
if we use `drop` instead of `t_drop` , we always get a final reply sent to the requestor
not sure if this is the right approach to the problem but at least fixes for us and can start the discussion.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1726
-- Commit Summary --
* tmx: add t_drop
-- File Changes --
M src/modules/tmx/tmx_mod.c (22)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1726.patchhttps://github.com/kamailio/kamailio/pull/1726.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/1726
Module: kamailio
Branch: master
Commit: 39b89a18a8c357151a173ab02dc95dff1f02715d
URL: https://github.com/kamailio/kamailio/commit/39b89a18a8c357151a173ab02dc95df…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-11-30T16:05:30+01:00
tm: reply_received() - simplify locking for processing sip response
- leverage the recursive mutex and skip several zones of unlock/lock,
which can lead to races on delayed processing or fast reply
retransmissions
- related to GH #1613 #1744
---
Modified: src/modules/tm/t_reply.c
---
Diff: https://github.com/kamailio/kamailio/commit/39b89a18a8c357151a173ab02dc95df…
Patch: https://github.com/kamailio/kamailio/commit/39b89a18a8c357151a173ab02dc95df…
---
diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c
index 8a95fe758d..859c73cd37 100644
--- a/src/modules/tm/t_reply.c
+++ b/src/modules/tm/t_reply.c
@@ -2189,7 +2189,7 @@ int reply_received( struct sip_msg *p_msg )
#ifdef WITH_XAVP
sr_xavp_t **backup_xavps;
#endif
- int replies_locked;
+ int replies_locked = 0;
#ifdef USE_DNS_FAILOVER
int branch_ret;
int prev_branch;
@@ -2223,10 +2223,15 @@ int reply_received( struct sip_msg *p_msg )
/* if transaction found, increment the rpl_received counter */
t_stats_rpl_received();
+ /* lock -- onreply_route, safe avp usage, ... */
+ /* - it is a recurrent mutex, so it is safe if a function executed
+ * down here does another lock/unlock */
+ LOCK_REPLIES( t );
+ replies_locked=1;
+
tm_ctx_set_branch_index(branch);
init_cancel_info(&cancel_data);
msg_status=p_msg->REPLY_STATUS;
- replies_locked=0;
uac=&t->uac[branch];
LM_DBG("org. status uas=%d, uac[%d]=%d local=%d is_invite=%d)\n",
@@ -2363,11 +2368,6 @@ int reply_received( struct sip_msg *p_msg )
/* processing of on_reply block */
if (onreply_route) {
set_route_type(TM_ONREPLY_ROUTE);
-
- /* lock onreply_route, for safe avp usage */
- LOCK_REPLIES( t );
- replies_locked=1;
-
/* transfer transaction flag to message context */
if (t->uas.request) {
p_msg->flags=t->uas.request->flags;
@@ -2444,27 +2444,12 @@ int reply_received( struct sip_msg *p_msg )
if (unlikely((ctx.run_flags&DROP_R_F) && (msg_status<200)))
#endif /* TM_ONREPLY_FINAL_DROP_OK */
{
- if (likely(replies_locked)) {
- replies_locked = 0;
- UNLOCK_REPLIES( t );
- }
goto done;
}
#ifdef TM_ONREPLY_FINAL_DROP_OK
if (msg_status >= 200) {
/* stop final reply timers, now that we executed the onreply route
* and the reply was not DROPed */
- if (likely(replies_locked)){
- /* if final reply => we have to execute stop_rb_timers,
- * but with replies unlocked to avoid a possible deadlock
- * (if the timer is currently running, stop_rb_timers()
- * will wait until the timer handler ends, but the
- * final_response_handler() will try to lock replies
- * => deadlock).
- */
- UNLOCK_REPLIES( t );
- replies_locked=0;
- }
stop_rb_timers(&uac->request);
}
#endif /* TM_ONREPLY_FINAL_DROP_OK */
@@ -2520,11 +2505,6 @@ int reply_received( struct sip_msg *p_msg )
branch_ret=add_uac_dns_fallback(t, t->uas.request,
uac, !replies_locked);
prev_branch=-1;
- /* unlock replies to avoid sending() while holding a lock */
- if (unlikely(replies_locked)) {
- UNLOCK_REPLIES( t );
- replies_locked = 0;
- }
while((branch_ret>=0) &&(branch_ret!=prev_branch)){
prev_branch=branch_ret;
branch_ret=t_send_branch(t, branch_ret, t->uas.request , 0, 1);
@@ -2533,12 +2513,8 @@ int reply_received( struct sip_msg *p_msg )
#endif
if (unlikely(p_msg->msg_flags&FL_RPL_SUSPENDED)) {
- goto skip_send_reply;
- /* suspend the reply (async), no error */
- }
- if (unlikely(!replies_locked)){
- LOCK_REPLIES( t );
- replies_locked=1;
+ /* suspended the reply (async) - no error */
+ goto done;
}
if ( is_local(t) ) {
/* local_reply() does UNLOCK_REPLIES( t ) */
@@ -2596,18 +2572,16 @@ int reply_received( struct sip_msg *p_msg )
uac->request.flags|=F_RB_FR_INV; /* mark fr_inv */
} /* provisional replies */
-skip_send_reply:
-
- if (likely(replies_locked)){
- /* unlock replies if still locked coming via goto skip_send_reply */
+done:
+ if (unlikely(replies_locked)){
+ /* unlock replies if still locked coming via goto */
UNLOCK_REPLIES(t);
replies_locked=0;
}
-done:
tm_ctx_set_branch_index(T_BR_UNDEFINED);
- /* we are done with the transaction, so unref it - the reference
- * was incremented by t_check() function -bogdan*/
+ /* done processing the transaction, so unref it
+ * - the reference counter was incremented by t_check() function */
t_unref(p_msg);
/* don't try to relay statelessly neither on success
* (we forwarded statefully) nor on error; on troubles,
<!--
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
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I tested kamailio's topoh+topos modules. udp worker's private memory is leaking when i enable both.
after a couple of hour kamailio stops and spams error messages.
### Troubleshooting
kamcmd pkg.stats shows lots of real_used memory(only udp workers are leaking).
#### Reproduction
Enable both modules.
<!--
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.
-->
#### 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).
-->
```
Oct 18 17:00:55 /usr/sbin/kamailio[20801]: ERROR: <core> [core/receive.c:162]: receive_msg(): no mem for sip_msg
Oct 18 17:00:55 /usr/sbin/kamailio[20802]: ERROR: <core> [core/mem/q_malloc.c:291]: qm_find_free(): qm_find_free(0x7fe6f5bee010, 1776); Free fragment not found!
Oct 18 17:00:55 /usr/sbin/kamailio[20802]: ERROR: <core> [core/mem/q_malloc.c:425]: qm_malloc(): qm_malloc(0x7fe6f5bee010, 1776) called from core: core/receive.c: receive_msg(160), module: core; Free fragment not found!
```
<!--
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).
-->
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
disable one of modules
### Additional Information
* **/etc/default/kamailio**
```
SHM_MEMORY=512
PKG_MEMORY=64
```
Number of children = 8
* **Parameters**:
```
loadmodule "topoh.so"
modparam("topoh", "mask_key", "N2hkVvBTxJ6Y")
modparam("topoh", "mask_callid", 0)
modparam("topoh", "sanity_checks", 1)
modparam("topoh", "uri_prefix_checks", 1)
modparam("topoh", "mask_ip", MY_IP_ADDR)
loadmodule "topos.so"
loadmodule "topos_redis.so"
modparam("topos", "storage", "redis")
modparam("topos", "branch_expire", 300)
modparam("topos", "dialog_expire", 10800)
modparam("topos", "clean_interval", 30)
modparam("topos_redis", "serverid", "topo")
```
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -v
version: kamailio 5.1.6 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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_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 4.9.2
```
* **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 `uname -a`)
-->
```
Debian 8.10
```
--
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/1682
### Description
1. Added 3 gateways to the dispatcher list file:
```
1 sip:naptr.mydomain.net 0 0
2 sip:srv.mydomain.net 0 0
```
started kamailio and ran: ```kamcmd dispatcher.list```
Output: ```error: 500 - No Destination Sets```
If I append to the list, one gateway which resolves to an A record (or an IP:PORT format) like e.g.:
```3 sip:a.mydomain.net:5060 0 0```, it shows up in the dispatcher list just fine:
```
{
NRSETS: 1
RECORDS: {
SET: {
ID: 3
TARGETS: {
DEST: {
URI: sip:a.mydomain.net:5060
FLAGS: AP
PRIORITY: 0
LATENCY: {
AVG: 14.642
STD: 0.05
EST: 15.0345
MAX: 25.452
TIMEOUT: 0
}
}
}
}
}
}
```
I also verified the DNS resolution with: ```kamcmd dns.lookup naptr naptr.mydomain.net``` and ```kamcmd dns.lookup srv srv.mydomain.net``` which was perfectly as expected.
Since I wasn't even able to see a dispatcher loaded, there was no operation that I could do to it to set it to active or anything else.
A network trace just shows A record queries to all gateways with no success on those which have NAPTR/SRV records.
#### Reproduction
100% reproducible with the description above.
### Additional Information
Tested on Kamailio version 4.4.5 and 5.1.1 with the following detailed version info:
```
version: kamailio 5.1.1 (x86_64/linux)
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.
compiled with /usr/bin/gcc 4.1.2
```
--
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/1743