### Description
I during master compilation I see an error
```
[root@safarov-dell kamailio]# make -C src/modules/ruxc/
make: Entering directory '/tmp/kamailio/src/modules/ruxc'
CC (gcc) [M ruxc.so] ruxc_mod.o
ruxc_mod.c:28:10: fatal error: ruxc.h: No such file or directory
28 | #include <ruxc.h>
| ^~~~~~~~
compilation terminated.
```
I was not able to figure out how to install the required dependency on CentOS dist and Fedora.
Could you make build this module build optional
--
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/2808
- calculate ob_key as SHA1(flow_token_secret) if specified
- keep old behavior with randomly generated ob_key if not specified
<!-- 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 -->
Adds ``flow_token_secret``(string) parameter for **outbound** module to give the ability to use persistent ob_key which is used for flow tokens validation.
Useful for cluster configurations with floating IP and ensures successful validation of the previously generated flow tokens after the **kamailio** restart.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2801
-- Commit Summary --
* outbound: add flow_token_secret param
-- File Changes --
M src/modules/outbound/doc/outbound_admin.xml (22)
M src/modules/outbound/outbound_mod.c (22)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2801.patchhttps://github.com/kamailio/kamailio/pull/2801.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/2801
<!--
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 wanted to change 478 response to 503 in case of t_relay() failure, but leave default behavior in rest error cases. I used part of code from "Example 1.1." inside https://www.kamailio.org/docs/modules/devel/modules/outbound.html. When I get -478 from t_relay() it works fine, but when this code is different sl_reply_erorr() don't use it as it should be.
This is my part of kamailio.cfg:
```
route[RELAY] {
if (!t_relay()) {
switch($rc) {
case -478:
xlog("L_WARN","T_Relay returned 478, sending back 503.\n");
sl_send_reply("503", "Service Unavailable");
exit;
default:
sl_reply_error();
exit;
}
}
exit;
}
```
When I log $rc value before sl_reply_error() it is valid, but not used by sl_reply_error() as SIP error value, it sends 500 instead.
### Troubleshooting
#### Reproduction
I've added incorrect hostnames with flag 16 to set where the message should be sent and t_relay() returns -478. To check the default case inside switch I changed case -478 to -479.
#### 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).
-->
```
1(8) ERROR: <core> [core/resolve.c:1731]: sip_hostport2su(): could not resolve hostname: "va4brhino"
1(8) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "va4brhino"
1(8) ERROR: tm [t_fwd.c:1759]: t_forward_nonack(): failure to add branches
1(8) ERROR: sl [sl_funcs.c:414]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (1/SL)
```
Logs with different route relay
```
route[RELAY] {
if (!t_relay()) {
switch($rc) {
case -479:
xlog("L_WARN","T_Relay returned 479, sending back 503.\n");
sl_send_reply("503", "Service Unavailable");
exit;
default:
xlog("L_WARN","Return code: $rc\n");
sl_reply_error();
exit;
}
}
exit;
}
```
```
1(8) ERROR: <core> [core/resolve.c:1731]: sip_hostport2su(): could not resolve hostname: "va4brhino"
1(8) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "va4brhino"
1(8) ERROR: tm [t_fwd.c:1759]: t_forward_nonack(): failure to add branches
1(8) WARNING: <script>: Return code: -478
1(8) ERROR: sl [sl_funcs.c:414]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (1/SL)
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.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
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.8.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 `uname -a`)
-->
```
Linux v4bkamailio 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 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/2802