Module: kamailio
Branch: master
Commit: 531eaea43e9a086aa7d1797ce3fa710691c1880b
URL: https://github.com/kamailio/kamailio/commit/531eaea43e9a086aa7d1797ce3fa710…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-10-13T15:46:25+02:00
modules: readme files regenerated - pike ... [skip ci]
---
Modified: src/modules/pike/README
---
Diff: https://github.com/kamailio/kamailio/commit/531eaea43e9a086aa7d1797ce3fa710…
Patch: https://github.com/kamailio/kamailio/commit/531eaea43e9a086aa7d1797ce3fa710…
---
diff --git a/src/modules/pike/README b/src/modules/pike/README
index beea746f45..761ae10822 100644
--- a/src/modules/pike/README
+++ b/src/modules/pike/README
@@ -31,6 +31,7 @@ Bogdan-Andrei Iancu
4. Functions
4.1. pike_check_req()
+ 4.2. pike_check_ip(ipaddr)
5. RPC Commands
@@ -50,6 +51,7 @@ Bogdan-Andrei Iancu
1.3. Set remove_latency parameter
1.4. Set pike_log_level parameter
1.5. pike_check_req usage
+ 1.6. pike_check_ip usage
2.1. Using pike.top
3.1. Tree of IP addresses
@@ -73,6 +75,7 @@ Chapter 1. Admin Guide
4. Functions
4.1. pike_check_req()
+ 4.2. pike_check_ip(ipaddr)
5. RPC Commands
@@ -175,6 +178,7 @@ modparam("pike", "pike_log_level", -1)
4. Functions
4.1. pike_check_req()
+ 4.2. pike_check_ip(ipaddr)
4.1. pike_check_req()
@@ -191,13 +195,30 @@ Warning
* -2 (false) - IP is detected as a new source of flooding - first
time detection
- This function can be used from REQUEST_ROUTE.
+ This function can be used from REQUEST_ROUTE|ONREPLY_ROUTE.
Example 1.5. pike_check_req usage
...
if (!pike_check_req()) { exit; };
...
+4.2. pike_check_ip(ipaddr)
+
+ Process the IP address parameter and return false if it was exceeding
+ the blocking limit. The return codes are the same from
+ pike_check_req().
+
+ The parameter can contain variables.
+
+ This function can be used from REQUEST_ROUTE|ONREPLY_ROUTE.
+
+ Example 1.6. pike_check_ip usage
+...
+if (!pike_check_ip("1.2.3.4")) { exit; };
+...
+if (!pike_check_ip("$si")) { exit; };
+...
+
5. RPC Commands
5.1. pike.top
How about adding source addr param to pike_check_req()?
Motivation is that main proxy may be front-ended by another proxy that
passes the real source addr to the main proxy in a header.
-- Juha
Module: kamailio
Branch: master
Commit: 8a0c8f1b4c6da364d527fd8e1bc305332825b50e
URL: https://github.com/kamailio/kamailio/commit/8a0c8f1b4c6da364d527fd8e1bc3053…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-13T15:34:42+02:00
pike: docs for pike_check_ip()
---
Modified: src/modules/pike/doc/pike_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/8a0c8f1b4c6da364d527fd8e1bc3053…
Patch: https://github.com/kamailio/kamailio/commit/8a0c8f1b4c6da364d527fd8e1bc3053…
---
diff --git a/src/modules/pike/doc/pike_admin.xml b/src/modules/pike/doc/pike_admin.xml
index 1963373d9d..612765843f 100644
--- a/src/modules/pike/doc/pike_admin.xml
+++ b/src/modules/pike/doc/pike_admin.xml
@@ -193,7 +193,7 @@ modparam("pike", "pike_log_level", -1)
</itemizedlist>
</para>
<para>
- This function can be used from REQUEST_ROUTE.
+ This function can be used from REQUEST_ROUTE|ONREPLY_ROUTE.
</para>
<example>
<title><function>pike_check_req</function> usage</title>
@@ -204,6 +204,32 @@ if (!pike_check_req()) { exit; };
</programlisting>
</example>
</section>
+ <section id="pike.f.pike_check_ip">
+ <title>
+ <function moreinfo="none">pike_check_ip(ipaddr)</function>
+ </title>
+ <para>
+ Process the IP address parameter and return false if it was exceeding
+ the blocking limit. The return codes are the same from pike_check_req().
+ </para>
+ <para>
+ The parameter can contain variables.
+ </para>
+ <para>
+ This function can be used from REQUEST_ROUTE|ONREPLY_ROUTE.
+ </para>
+ <example>
+ <title><function>pike_check_ip</function> usage</title>
+ <programlisting format="linespecific">
+...
+if (!pike_check_ip("1.2.3.4")) { exit; };
+...
+if (!pike_check_ip("$si")) { exit; };
+...
+</programlisting>
+ </example>
+ </section>
+
</section>
<section>
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454@sub.domain.com;myid=+34@sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri);
xavp_params_explode("$(var(uri){s.unbracket})", "uri");
xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");
I tried above and it prints +34(a)sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
1) Could you please help how to get it or If there is any alternate/single line approach to get this value?
2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right
3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?
Please help, thanks in advance.
### Description
We have segfault in Kamailio v5.3.1 installed on Debain 9.x 64 bit occured while kamailio was shutting down while our script tryed to get metrics using kamcmd utility at the same time.
### Troubleshooting
No troubleshooting was done, since it happened on a production server. We simply restarted the server.
#### Reproduction
The problem periodically happens on production servers in runtime. Kamailio crashes when one of our scripts tried getting statistics about websocket and tls modules using kamcmd. As I see in core dump, shared memory was already freed when rpc_mod_print called in the child process.
#### Debugging Data
```
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /var/lib/ums/sbin/kamailio...done.
[New LWP 17075]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/var/lib/ums/sbin/kamailio -m 2048 -M 12 -P /var/run/kamailio/kamailio.pid -f /'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strcmp_sse2_unaligned ()
at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:32
#0 __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:32
#1 0x00007fcae1ef62f5 in rpc_mod_print (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808, mname=0x1edd0c9 "websocket", stats=0x1ef8310, flag=2) at mod_stats.c:117
#2 0x00007fcae1ef60eb in rpc_mod_print_one (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808, mname=0x1edd0c9 "websocket", pkg_stats=0x1ef69d0, shm_stats=0x1ef8310, flag=2) at mod_stats.c:159
#3 0x00007fcae1ef5ee1 in rpc_mod_mem_stats_mode (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808, fmode=0) at mod_stats.c:239
#4 0x00007fcae1ef584f in rpc_mod_mem_stats (rpc=0x7fcae180b540 <binrpc_callbacks>, ctx=0x7ffe7a6f7808) at mod_stats.c:251
#5 0x00007fcae15dac80 in process_rpc_req (buf=0x1edd0b4 "\241\003\035\020\333Qg\221\nmod.stats", size=36, bytes_needed=0x7ffe7a6f7c50, sh=0x7ffe7a6f7bc0, saved_state=0x1eed0b8) at binrpc_run.c:678
#6 0x00007fcae15c872f in handle_stream_read (s_c=0x1edd080, idx=-1) at io_listener.c:511
#7 0x00007fcae15c4121 in handle_io (fm=0x7fcb65600cb0, events=1, idx=-1) at io_listener.c:706
#8 0x00007fcae15c293a in io_wait_loop_epoll (h=0x7fcae180b348 <io_h>, t=10, repeat=0) at ./../../core/io_wait.h:1062
#9 0x00007fcae15b662c in io_listen_loop (fd_no=2, cs_lst=0x1df1940) at io_listener.c:281
#10 0x00007fcae15ec72c in mod_child (rank=0) at ctl.c:338
#11 0x0000000000638c14 in init_mod_child (m=0x7fcb6547f4b0, rank=0) at core/sr_module.c:780
#12 0x000000000063862d in init_mod_child (m=0x7fcb6547fb78, rank=0) at core/sr_module.c:776
#13 0x000000000063862d in init_mod_child (m=0x7fcb65480018, rank=0) at core/sr_module.c:776
#14 0x000000000063862d in init_mod_child (m=0x7fcb65480528, rank=0) at core/sr_module.c:776
#15 0x000000000063862d in init_mod_child (m=0x7fcb654809c8, rank=0) at core/sr_module.c:776
#16 0x000000000063862d in init_mod_child (m=0x7fcb65481140, rank=0) at core/sr_module.c:776
#17 0x000000000063862d in init_mod_child (m=0x7fcb654817b0, rank=0) at core/sr_module.c:776
#18 0x000000000063862d in init_mod_child (m=0x7fcb65481c38, rank=0) at core/sr_module.c:776
#19 0x00000000006385b2 in init_child (rank=0) at core/sr_module.c:825
#20 0x000000000043140c in main_loop () at main.c:1753
#21 0x000000000043df6f in main (argc=9, argv=0x7ffe7a6fbf88) at main.c:2802
```
#### Log Messages
No any useful logs available.
#### SIP Traffic
No SIP traffic available.
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **This is a sequence of commands that python script runs every 10 seconds:**
```
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 stats.get_statistics websocket:
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 stats.get_statistics tcp:
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 stats.get_statistics shmem:
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats tls pkg
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats tls shm
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats websocket pkg
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats websocket shm
/var/lib/ums/sbin/kamcmd -s tcp:localhost:2048 mod.stats core shm
```
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.1 (x86_64/linux) 283e46
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
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: 283e46
compiled on 14:23:37 Jul 28 2020 with clang 9.0
```
* **Operating System**:
```
Linux devhpbx005-1.vx 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) 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/2460
### Description
I am experimenting with fuzzing on Kamailio SIP. A malformed INVITE (with a long tag) crashes the server, raised by qm_debug_check_frag().
### Troubleshooting
The error message:
```
qm_debug_check_frag(): BUG: qm: fragm. 0x7ffff03642e8 (address 0x7ffff0364320) end overwritten (9191919191919191, 9191919191919191)! Memory allocator was called from tm: t_reply.c:2410. Fragment marked by tm: t_msgbuilder.c:327. Exec from core/mem/q_malloc.c:511.
```
Output from GDB:
```
(gdb) watch *0x7ffff0364320
Hardware watchpoint 1: *0x7ffff0364320
(gdb) run -f kamailio-basic.cfg -L src/modules -Y runtime_dir/ -n 1 -D -E
Starting program: /home/rnatella/workdir-sip/kamailio/src/kamailio -f kamailio-basic.cfg -L src/modules -Y runtime_dir/ -n 1 -D -E
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0(29450) INFO: <core> [core/sctp_core.c:75]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
Aliases:
WARNING: no fork mode
0(29450) INFO: rr [./../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
0(29450) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available
0(29450) INFO: <core> [main.c:2841]: main(): processes (at least): 4 - shm size: 67108864 - pkg size: 8388608
0(29450) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
0(29450) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
0(29450) ERROR: {1 2 INVITE 1-670(a)127.0.0.1} <core> [core/parser/parse_rr.c:78]: do_parse_rr_body(): Failed parsing name-addr (<sip:127.0"0tttttttttttttttttttttttttttK-670-1-7)
0(29450) ERROR: {1 2 INVITE 1-670(a)127.0.0.1} <core> [core/parser/parse_rr.c:140]: do_parse_rr_body(): Failed parsing rr header body [<sip:127.0"0tttttttttttttttttttttttttttK-670-1-7]
0(29450) ERROR: {1 2 INVITE 1-670(a)127.0.0.1} rr [loose.c:468]: find_rem_target(): failed to parse last Route HF
0(29450) ERROR: {1 2 INVITE 1-670(a)127.0.0.1} rr [loose.c:700]: after_strict(): searching for last Route URI failed
Hardware watchpoint 1: *0x7ffff0364320
Old value = <unreadable>
New value = 4932352
__memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:316
316 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
(gdb) bt
#0 __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:316
#1 0x00007ffff602e4ff in build_local_reparse (Trans=<optimized out>, branch=<optimized out>, len=<optimized out>, method=<optimized out>,
method_len=<optimized out>, to=<optimized out>, reason=<optimized out>) at t_msgbuilder.c:336
#2 0x00007ffff607eaff in build_ack (rpl=<optimized out>, trans=<optimized out>, branch=0, ret_len=<optimized out>) at t_reply.c:360
#3 reply_received (p_msg=<optimized out>) at t_reply.c:2398
#4 0x00000000005a0af3 in do_forward_reply (msg=0x7ffff68eed28, mode=<optimized out>) at core/forward.c:757
#5 0x0000000000688cae in receive_msg (buf=<optimized out>, len=<optimized out>, rcv_info=<optimized out>) at core/receive.c:509
#6 0x00000000004a6b39 in udp_rcv_loop () at core/udp_server.c:543
#7 0x000000000042c938 in main_loop () at main.c:1480
#8 0x000000000043c574 in main (argc=<optimized out>, argv=<optimized out>) at main.c:2863
(gdb) frame \
Quit
(gdb) frame
No symbol "frame" in current context.
(gdb) frame frame 1
No symbol "frame" in current context.
(gdb) frame 1
#1 0x00007ffff602e4ff in build_local_reparse (Trans=<optimized out>, branch=<optimized out>, len=<optimized out>, method=<optimized out>,
method_len=<optimized out>, to=<optimized out>, reason=<optimized out>) at t_msgbuilder.c:336
336 append_str(d, method, method_len);
(gdb) print d
$1 = 0x7ffff0364320 ""
(gdb) c
Continuing.
Hardware watchpoint 1: *0x7ffff0364320
Old value = 4932352
New value = 4932417
__memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:317
317 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
(gdb) bt
#0 __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:317
#1 0x00007ffff602e4ff in build_local_reparse (Trans=<optimized out>, branch=<optimized out>, len=<optimized out>, method=<optimized out>,
method_len=<optimized out>, to=<optimized out>, reason=<optimized out>) at t_msgbuilder.c:336
#2 0x00007ffff607eaff in build_ack (rpl=<optimized out>, trans=<optimized out>, branch=0, ret_len=<optimized out>) at t_reply.c:360
#3 reply_received (p_msg=<optimized out>) at t_reply.c:2398
#4 0x00000000005a0af3 in do_forward_reply (msg=0x7ffff68eed28, mode=<optimized out>) at core/forward.c:757
#5 0x0000000000688cae in receive_msg (buf=<optimized out>, len=<optimized out>, rcv_info=<optimized out>) at core/receive.c:509
#6 0x00000000004a6b39 in udp_rcv_loop () at core/udp_server.c:543
#7 0x000000000042c938 in main_loop () at main.c:1480
#8 0x000000000043c574 in main (argc=<optimized out>, argv=<optimized out>) at main.c:2863
(gdb) c
Continuing.
Hardware watchpoint 1: *0x7ffff0364320
Old value = 4932417
New value = 541803329
0x00007ffff602e504 in build_local_reparse (Trans=<optimized out>, branch=<optimized out>, len=<optimized out>, method=<optimized out>,
method_len=<optimized out>, to=<optimized out>, reason=<optimized out>) at t_msgbuilder.c:337
337 *d = ' ';
(gdb) bt
#0 0x00007ffff602e504 in build_local_reparse (Trans=<optimized out>, branch=<optimized out>, len=<optimized out>, method=<optimized out>,
method_len=<optimized out>, to=<optimized out>, reason=<optimized out>) at t_msgbuilder.c:337
#1 0x00007ffff607eaff in build_ack (rpl=<optimized out>, trans=<optimized out>, branch=0, ret_len=<optimized out>) at t_reply.c:360
#2 reply_received (p_msg=<optimized out>) at t_reply.c:2398
#3 0x00000000005a0af3 in do_forward_reply (msg=0x7ffff68eed28, mode=<optimized out>) at core/forward.c:757
#4 0x0000000000688cae in receive_msg (buf=<optimized out>, len=<optimized out>, rcv_info=<optimized out>) at core/receive.c:509
#5 0x00000000004a6b39 in udp_rcv_loop () at core/udp_server.c:543
#6 0x000000000042c938 in main_loop () at main.c:1480
#7 0x000000000043c574 in main (argc=<optimized out>, argv=<optimized out>) at main.c:2863
(gdb) c
Continuing.
0(29450) CRITICAL: {2 2 INVITE 1-670(a)127.0.0.1} <core> [core/mem/q_malloc.c:138]: qm_debug_check_frag(): BUG: qm: fragm. 0x7ffff03642e8 (address 0x7ffff0364320) end overwritten (9191919191919191, 9191919191919191)! Memory allocator was called from tm: t_reply.c:2410. Fragment marked by tm: t_msgbuilder.c:327. Exec from core/mem/q_malloc.c:511.
Program received signal SIGSEGV, Segmentation fault.
0x000000000082f45f in qm_status (qmp=<optimized out>) at core/mem/q_malloc.c:902
902 f!=&(qm->free_hash[h].head); f=f->u.nxt_free, i++, j++){
```
#### Reproduction
I am running the server with a basic configuration (attached kamailio-basic.cfg), using the command:
```
./src/kamailio -f kamailio-basic.cfg -L src/modules -Y runtime_dir/ -n 1 -D -E
```
[kamailio-basic.cfg.txt](https://github.com/kamailio/kamailio/files/5354439/…
On the same machine, I am sending the malformed message (also attached):
```
cat sip-crash.txt | nc -4u -w1 localhost 5060
```
[sip-crash.txt](https://github.com/kamailio/kamailio/files/5354468/sip-crash…
You can find more information about my fuzzing setup at: [](https://github.com/rnatella/aflnet-kamailio-sip)
#### 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.
-->
See previous section
#### 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).
-->
See previous section
#### 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).
-->
See previos section
### 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.5.0-dev2 (x86_64/linux) 6049a1-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, DBG_QM_MALLOC, 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: 6049a1 -dirty
compiled on 10:12:13 Oct 9 2020 with /home/rnatella/aflnet/afl-clang-fast 6.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`)
-->
```
Ubuntu 18.04.2 LTS
Linux dockertest1 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 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/2503
### Description
<!--
DID Trunk ----> Kamailio (UAC) ---> Asterisk
Call comes from DID Trunk and UAC module is used as per some fixed mapping in DB so we use that user to make call Asterisk through UAC as shown below.
```
$var(original_ru) = $rU;
if (uac_reg_request_to("$avp(auser)", 1)) {
$var(status) = uac_reg_status("$rU");
$rU = $var(original_ru) ;
t_on_failure("REMOTE_AUTH");
}
failure_route[REMOTE_AUTH] {
if (t_check_status("401|407")) {
xlogl("L_INFO", " Remote asked for authentication");
t_drop_replies();
# - remove preloaded route headers
remove_hf("Route");
record_route();
$avp(authed) = 1;
# Drop replies so that they are not sent back to the UAC
uac_auth();
route(RELAY);
}
}
```
in all this activity Contact Header also replaced by UAC_AUTH so Replies from Asterisk reaches to Kamailio but does not relay back to DID Trunk.
-->
### Troubleshooting
#### Reproduction
<!--
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`
```
(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`)
-->
```
(paste your output here)
```
--
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/2504