siptrace module not mirror relayed ACK message.
Need patch vanilla kamailio config like this diff
--- kamailio.cfg
+++ /etc/kamailio/kamailio.cfg
@@ -1,4 +1,8 @@
#!KAMAILIO
+#!define WITH_DEBUG
+#!define WITH_PSTN
+#!define WITH_NAT
+
#
# Kamailio (OpenSER) SIP Server v5.1 - default configuration script
# - web: https://www.kamailio.org
@@ -137,7 +141,9 @@
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define FLT_NATS 5
+#!define FLT_SIPTRACE 8
+
#!define FLB_NATB 6
#!define FLB_NATSIPPING 7
@@ -198,8 +204,8 @@
* pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
*
* - by default is empty to avoid misrouting */
-pstn.gw_ip = "" desc "PSTN GW Address"
-pstn.gw_port = "" desc "PSTN GW Port"
+pstn.gw_ip = "8.8.8.8" desc "PSTN GW Address"
+pstn.gw_port = "5060" desc "PSTN GW Port"
#!endif
#!ifdef WITH_VOICEMAIL
@@ -286,6 +292,16 @@
loadmodule "debugger.so"
#!endif
+loadmodule "siptrace.so"
+modparam("siptrace", "duplicate_uri", "sip:217.12.247.98:9060")
+modparam("siptrace", "hep_mode_on", 1)
+modparam("siptrace", "hep_version", 3)
+modparam("siptrace", "hep_capture_id", 1)
+modparam("siptrace", "trace_to_database", 0)
+## `trace_flag` value must be equal to FLT_SIPTRACE value at head of "default.cfg" file
+modparam("siptrace", "trace_flag", 8)
+modparam("siptrace", "trace_on", 1)
+
# ----------------- setting module-specific parameters ---------------
@@ -310,9 +326,10 @@
# ----- rr params -----
# set next param to 1 to add value to ;lr param (helps with some UAs)
-modparam("rr", "enable_full_lr", 0)
+modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)
+modparam("rr", "enable_double_rr", 1)
# ----- registrar params -----
modparam("registrar", "method_filtering", 1)
@@ -536,6 +553,9 @@
if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
}
+ sip_trace();
+ setflag(FLT_SIPTRACE);
+
if (!t_relay()) {
sl_reply_error();
}
none
{1 20 ACK 1258335781} 15(2198) DEBUG: siptrace [siptrace.c:507]: sip_trace_store_db(): database connection not initialized
{1 20 ACK 1258335781} 15(2198) DEBUG: siptrace [siptrace_hep.c:498]: pipport2su(): the port string is 35060
{1 20 ACK 1258335781} 15(2198) DEBUG: siptrace [siptrace_hep.c:498]: pipport2su(): the port string is 5060
{1 20 ACK 1258335781} 15(2198) DEBUG: <core> [core/proxy.c:264]: mk_proxy(): doing DNS lookup...
{1 20 ACK 1258335781} 15(2198) DEBUG: siptrace [siptrace_hep.c:183]: trace_send_hep3_duplicate(): setting up the socket_info
{1 20 ACK 1258335781} 15(2198) exec: *** cfgtrace:request_route=[RELAY] c=[/etc/kamailio/kamailio.cfg] l=557 a=39 n=setflag
{1 20 ACK 1258335781} 15(2198) exec: *** cfgtrace:request_route=[RELAY] c=[/etc/kamailio/kamailio.cfg] l=562 a=16 n=if
{1 20 ACK 1258335781} 15(2198) exec: *** cfgtrace:request_route=[RELAY] c=[/etc/kamailio/kamailio.cfg] l=559 a=24 n=t_relay
{1 20 ACK 1258335781} 15(2198) DEBUG: tm [t_lookup.c:1319]: t_newtran(): msg id=1 , global msg id=0 , T on entrance=0xffffffffffffffff
{1 20 ACK 1258335781} 15(2198) DEBUG: tm [t_lookup.c:476]: t_lookup_request(): start searching: hash=11341, isACK=1
{1 20 ACK 1258335781} 15(2198) DEBUG: tm [t_lookup.c:435]: matching_3261(): RFC3261 transaction matching failed
{1 20 ACK 1258335781} 15(2198) DEBUG: tm [t_lookup.c:659]: t_lookup_request(): no transaction found
{1 20 ACK 1258335781} 15(2198) DEBUG: tm [t_funcs.c:284]: t_relay_to(): forwarding ACK statelessly
{1 20 ACK 1258335781} 15(2198) DEBUG: <core> [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: 307e4757bd94a80e26f17adb5260cb13
{1 20 ACK 1258335781} 15(2198) DEBUG: <core> [core/forward.c:557]: forward_request(): Sending:
Received ACK is mirrored but relayed ACK is not mirrored.
Full log in attached file kamailio.log
kamailio.log
SIP messages and mirrored traffic in attached pcap file.
Packet 19 is not mirrored.
kamailio-ack.zip
Not know
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 on 03:24:34 Nov 23 2018 with gcc 8.2.0
Alpine Linux edge
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.0
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.