<!-- 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 I am uac module with database. uacreg table have the send_socket column. i do have 2 kamailio server running. i want only kamailio-1 should send register to uacreg entries. for this i have used send_socket column with socket of kamailio-1. After this we can see both kamailio server sending registration and that's the problem. <!-- Explain what you did, what you expected to happen, and what actually happened. -->
### Troubleshooting
#### Reproduction loadmodule "uac.so" modparam("uac","auth_username_avp","$avp(auser)") modparam("uac","auth_password_avp","$avp(apass)") modparam("uac","auth_realm_avp","$avp(arealm)") modparam("uac", "reg_contact_addr", "EXTERNAL_IP:5060") modparam("uac", "reg_db_url", DBURL)
and use send_socket into uacreg with kamailio-1 socket. <!-- 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`
``` version: kamailio 5.3.8 (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_BLACKLIST, 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 8.3.0 ```
* **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-10-0-12-135:/etc/kamailio# uname -a Linux ip-10-0-12-135 5.3.0-1019-aws #21~18.04.1-Ubuntu SMP Mon May 11 12:33:03 UTC 2020 x86_64 GNU/Linux ```
@miconda please suggest. I can make a pull request against this but need your suggestion on this?
Since you are not indicating a specific bug or propose a code change, please take your issue to the mailing list. Thank you.
Closed #2624.
@oej I have said very specific to bug and also shared reproducing steps. Please review the complete issue ticket. This should not be closed like this.
Where in the documentation is it documented that it should behave as you expect? If you tell two kamailio servers to register, both will register. Please discuss how to solve this on the mailing list as it is the expected behaviour even though you may want another behaviour.
https://kamailio.org/docs/db-tables/kamailio-db-5.1.x.html#gen-db-uacreg - yes its documented. check uacreg table socket field. It should use that socket only. i can discuss over mailing list but let this issue to be open if anyone else have idea over this they can comment on this.
I agree that documentation is unclear on the behaviour of what happens when the suggested socket does not exist. It is in most cases named "default socket" which suggests that if it does not exist, Kamailio will use another socket. Which is what happens in your case. You want kamailio to drop the request if the suggested socket does not exist, which I think may require code changes. It should not be the default behaviour as that may break installations, but it may be configured with a mod param.
@surendratiwari3 - we do not use issue tracker for discussions to give ideas of how to configure kamailio for specific cases. The description of the field in database is not saying that it must use that socket only. Once discussions on mailing list conclude on ways to do it using the current version or what new feature has to be implemented, then an issue here can be open for feature request and the discussion on tracker can focus on implementation details, c code review, etc ...
Everyone tends to open issue on the tracker for something they need in their config/deployment, hoping to get help here. It is not what we use the tracker for. Discuss always on sr-users mailing list if you are not sure it is a bug. And connecting many instances to the same database, expecting that one instance behaves different that the others is definitely not a clear bug. When many instances share database, they are expected to behave more or less the same.
Was this problem solved? I have exctly same issue. For now, I have not found a way to activate Sip-registration only on one server, and avoid doing so on 2nd server. Making same SIp-registration on both server makes no sense.
I have tried to set ` modparam("uac", "default_socket", "udp:<invalid IP>:5060")` to drop SIP registration if in DB uacreg.socket not specified one of servers, but it does not work.
SIp-registartion still sent from both servers.
Please move the discussion to the mailing list, as already mentioned. If you want to disable registrations on certain servers, there are RPC commands to do this. https://kamailio.org/docs/modules/5.5.x/modules/uac.html#uac.r.uac.reg_disab...