I've been trying to work out how to set the username element of the contact header in uac_reg outbound REGISTER requests and it seems it's hard coded in the source (uac_reg.c:990) to use the l_uuid.
I'm curious why l_uuid is used here and not l_username which feels like it should be more consistent with the use of r_username?
My C skills are sufficient to let me patch this locally for my application, but I wondered what the reason for this design decision is or if it's actually a very long lived 'bug' as it feels like l_username is the 'right' thing to use here?
Alternatively, perhaps this would be considered a feature request to make it configurable via another parameter in the database (probably beyond my C unless I modelled it on the pull request that added contact_addr (#2470)
Ross
success events should be routed to onreply_route[]
failure events should be routed to failure_route[]
<!-- 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
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] 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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Kazoo cfg files use onreply_route[] and failure_route[] to handle the replies from AMQP and the module was sending the replies to the main route and therefore the scripts were not receiving the responses
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2786
-- Commit Summary --
* kazoo : fix routing of reply events
-- File Changes --
M src/modules/kazoo/kz_amqp.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2786.patchhttps://github.com/kamailio/kamailio/pull/2786.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/2786
### Description
Building TLSA module on ubuntu 18.04 results in a compiler warning and an undefined symbol error when attempting to load module.
### Troubleshooting
#### Reproduction
Make module and attempt to load it
<!--
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.
-->
```
N/A
```
#### 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).
-->
Compiler output
```
CC (gcc) [M tlsa.so] tls_util.o
CC (gcc) [M tlsa.so] tls_domain.o
CC (gcc) [M tlsa.so] tls_locking.o
CC (gcc) [M tlsa.so] tls_rand.o
CC (gcc) [M tlsa.so] tls_map.o
CC (gcc) [M tlsa.so] tls_cfg.o
CC (gcc) [M tlsa.so] tls_select.o
CC (gcc) [M tlsa.so] tls_server.o
CC (gcc) [M tlsa.so] tls_dump_vf.o
CC (gcc) [M tlsa.so] tls_init.o
CC (gcc) [M tlsa.so] tls_rpc.o
CC (gcc) [M tlsa.so] tls_config.o
CC (gcc) [M tlsa.so] tls_bio.o
CC (gcc) [M tlsa.so] tls_ct_wrq.o
CC (gcc) [M tlsa.so] tlsa_mod.o
CC (gcc) [M tlsa.so] tls_verify.o
LD (gcc) [M tlsa.so] tlsa.so
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
(.text+0x11): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
```
Kamailio Log
```
Aug 9 11:21:04 kamtest kamailio: ERROR: <core> [core/sr_module.c:570]: load_module(): could not open module </usr/local/lib64/kamailio/modules/tlsa.so>: /usr/local/lib64/kamailio/modules/tlsa.so: undefined symbol: __dlclose
Aug 9 11:21:04 kamtest kamailio: CRITICAL: <core> [core/cfg.y:3683]: yyerror_at(): parse error in config file /etc/kamailio/parameters/modules.cfg, line 7, column 12-20: failed to load module
Aug 9 11:21:04 kamtest kamailio: ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tlsa> found
```
#### 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).
-->
```
N/A
```
### 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.6.0-dev0 (x86_64/linux) 0a5307-dirty
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: 0a5307 -dirty
compiled on 10:36:16 Aug 9 2021 with gcc 7.5.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`)
-->
```
Linux kamtest 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 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/2815
### Description
Suppose that there is an variable define in `kamailio-basic-kemi.cfg` with:
```
#!define MYVAR 1.2.3.4
```
Then in the `kamailio-basic-kemi-lua.lua`
- How can we get that variable?
### Possible Solutions
Is there any alternative solution like set global via app_lua parameter, example:
```
modparam("app_lua", "load", "/usr/local/etc/kamailio/lua/myscript.lua")
modparam("app_lua", "varset", "pstngw=s:sip:10.10.10.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/2822
### Description
The ACK that response to 200 OK was NAT relayed by Kamailio if using TCP protocol, then got this issue from log
```pending write on new connection 0x14a595095d40 sock 16 (-1/539 bytes written) (err: 11 - Resource temporarily unavailable)```
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
* Using KAMI with Lua for routing config.
* make call between 2 sip clients, the receiver has been registered with TCP
#### Debugging Data
* With the same scenario with UDP, it work fine.
*
<!--
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).
-->
```
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <script>: ROUTE RELAY BEGIN:-----------------------------------------------------------
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: tm [t_lookup.c:1327]: t_newtran(): msg (0x14a5999f0b38) id=3/4784 global id=2/4784 T start=0xffffffffffffffff
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=41830, isACK=1
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bKQe8H61SrNcaXD]
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: tm [t_funcs.c:286]: t_relay_to(): forwarding ACK statelessly
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/crypto/md5utils.c:67]: MD5StringArray(): MD5 calculated: 66c47e5249a7009267e0cd264863c247
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/msg_translator.c:1797]: check_boundaries(): no multi-part body
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/forward.c:577]: forward_request(): Sending:#012ACK sip:Joe%20Biden@14.186.XXX.XX:60791;transport=TCP SIP/2.0#015#012Via: SIP/2.0/TCP 188.166.XXX.XX:5060;branch=z9hG4bK663a.66c47e5249a7009267e0cd264863c247.0#015#012Via: SIP/2.0/UDP 127.0.0.2;received=127.0.0.2;rport=5060;branch=z9hG4bKQe8H61SrNcaXD#015#012Max-Forwards: 69#015#012From: "Donald Trump"
<sip:33123456789@127.0.0.2>;tag=mUNavKm60XZte#015#012To: <sip:5512345@127.0.0.3:5060;transport=udp>;tag=bd21bf6b#015#012Call-ID: 0e846d85-720e-123a-45a5-ea0e9328da5f#015#012CSeq: 39612479 ACK#015#012Contac
t: <sip:gw+KamGW@127.0.0.2:5060;transport=udp;gw=KamGW>#015#012Content-Length: 0#015#012#015#012.
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/forward.c:578]: forward_request(): orig. len=557, new_len=539, proto=2
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: app_lua [app_lua_api.c:489]: sr_lua_reload_script(): No need to reload [/path-to-lua/routing.lua] is version 0
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: app_lua [app_lua_api.c:673]: app_lua_run_ex(): executing Lua function: [[ksr_onsend_route]]
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: app_lua [app_lua_api.c:675]: app_lua_run_ex(): lua top index is: 0
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/tcp_main.c:1993]: tcp_send(): no open tcp connection found, opening new one
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/ip_addr.c:577]: print_ip(): tcpconn_new: new tcp connection: 14.186.47.222
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/tcp_main.c:1175]: tcpconn_new(): on port 60791, type 2, socket -1
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/tcp_main.c:1494]: tcpconn_add(): hashes: 1566:2785:0, 4
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: <core> [core/tcp_main.c:2886]: tcpconn_1st_send(): pending write on new connection 0x14a595095d40 sock 16 (-1/539 bytes written) (err: 11 - Resource temporar
ily unavailable)
Aug 7 10:35:53 testnode1 /usr/local/sbin/kamailio[4806]: DEBUG: <core> [core/tcp_main.c:3792]: handle_ser_child(): read response= 14a595095d40, 5, fd 55 from 12 (4784)
Aug 7 10:35:53 testnode1 /usr/local/sbin/kamailio[4806]: DEBUG: <core> [core/io_wait.h:375]: io_watch_add(): DBG: io_watch_add(0x55f0338266a0, 55, 2, 0x14a595095d40), fd_no=41
Aug 7 10:35:53 testnode1 testnode[4784]: DEBUG: app_lua [app_lua_api.c:1003]: sr_kemi_lua_exec_func_ex(): param[0] for: xdbg is str: ROUTE RELAY END:--------------------------------------------------------
---
```
#### SIP Traffic
![image](https://user-images.githubusercontent.com/85822466/128597726-0f64fdec-9b45-4ef6-b480-f5c0b3f21600.png)
```
(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 -v
version: kamailio 5.5.1 (x86_64/linux) 7abebb
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: 7abebb
compiled on 07:46:14 Jun 27 2021 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`)
-->
Debian 10.10
```
root@testnode1:~# uname -a
Linux testnode1 4.19.0-12-cloud-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) 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/2814
#### Pre-Submission Checklist
- [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 -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
setting via xavp in tm:local-request has no effect
```
xavp_via_params = "via"
event_route[tm:local-request]
{
$xavp(via=>xi) = "something"
via_add_xavp_params("1");
}
reply_route {
$var(vd) = $sel(via.params["xi"]);
xlog("L_INFO", "$ci|log|core|reply $rm this should be true => ('$var(vd)' == 'something')\n");
}
```
#### Changes
changed t_run_local_req and moved restore xavps & flags to the end, after the messages changes are applied.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2821
-- Commit Summary --
* tm: restore xavps & flags after rebuilding message
-- File Changes --
M src/modules/tm/uac.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2821.patchhttps://github.com/kamailio/kamailio/pull/2821.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/2821