<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">When client register, m_dump sent message to host from header "TO" in stored message, instead to send to AOR.</p>
<h3 dir="auto">Troubleshooting</h3>
<p dir="auto">modparam("msilo", "db_url", DBURL)<br>
modparam("msilo", "from_address", "sip:<a href="mailto:registrar@kamailio.org">registrar@kamailio.org</a>")<br>
modparam("msilo", "content_type_hdr", "Content-Type: text/plain\r\n")<br>
modparam("msilo", "offline_message", "*** User $rU is offline!")</p>
<p dir="auto">route[REGISTRAR] {<br>
xlog("(REGISTRAR) =============================================================================\n");<br>
if (!is_method("REGISTER")) return;</p>
<pre class="notranslate"><code class="notranslate">    if(isflagset(FLT_NATS)) {
            setbflag(FLB_NATB);
</code></pre>
<p dir="auto">#!ifdef WITH_NATSIPPING<br>
# do SIP NAT pinging<br>
setbflag(FLB_NATSIPPING);<br>
#!endif<br>
}<br>
if (!save("location")) {<br>
sl_reply_error();<br>
}</p>
<pre class="notranslate"><code class="notranslate">    xlog("L_NOTICE", "REGISTER received -> dumping messages with MSILO\n");

    # MSILO - dumping user's offline messages
    if (m_dump()) {
            xlog("L_NOTICE", "MSILO: offline messages dumped - if they were\n");
    }
    else {
            xlog("L_NOTICE", "MSILO: no offline messages dumped\n");
    };

    exit;
</code></pre>
<p dir="auto">}</p>
<h4 dir="auto">Log Messages</h4>
<p dir="auto">Message which kamailio tried to sent:</p>
<p dir="auto">INSERT INTO <code class="notranslate">silo</code> (<code class="notranslate">id</code>, <code class="notranslate">src_addr</code>, <code class="notranslate">dst_addr</code>, <code class="notranslate">username</code>, <code class="notranslate">domain</code>, <code class="notranslate">inc_time</code>, <code class="notranslate">exp_time</code>, <code class="notranslate">snd_time</code>, <code class="notranslate">ctype</code>, <code class="notranslate">body</code>, <code class="notranslate">extra_hdrs</code>, <code class="notranslate">callid</code>, <code class="notranslate">status</code>) VALUES<br>
(4, 'sip:<a href="mailto:1867@sbc.test.org">1867@sbc.test.org</a>', 'sip:<a href="mailto:1404@sbc.test.org">1404@sbc.test.org</a>', '1404', 'sbc.test.org', 1657654135, 1657913335, 0, 'text/html', 0x3c5350414e205354594c453d22464f4e542d46414d494c593a417269616c3b20464f4e542d53495a453a3130707420223e7171717171717171717171713c2f5350414e3e0d0a, '', '', 0);</p>
<pre class="notranslate"><code class="notranslate">[kamailio.log](https://github.com/kamailio/kamailio/files/9096693/kamailio.log)

</code></pre>
<h4 dir="auto">SIP Traffic</h4>
<p dir="auto">3.127.6.184 is public IP of EC2<br>
172.31.3.158 is private IP of same instance<br>
So you can see that kamailio tried to sent SIP MESSAGE to self</p>
<pre class="notranslate"><code class="notranslate">19:59:52.341870 IP 17.74.26.179.50038 > 172.31.3.158.5060: SIP: REGISTER sip:sbc.test.org SIP/2.0
19:59:52.381456 IP 172.31.3.158.5060 > 17.74.26.179.50038: SIP: SIP/2.0 200 OK
19:59:52.538450 IP 17.74.26.179.50038 > 172.31.3.158.5060: SIP: SUBSCRIBE sip:1404@sbc.test.org SIP/2.0
19:59:52.577632 IP 172.31.3.158.5060 > 17.74.26.179.50038: SIP: SIP/2.0 407 Proxy Authentication Required
19:59:52.724509 IP 172.31.3.158.5060 > 3.127.6.184.5060: SIP: MESSAGE sip:1404@sbc.test.org SIP/2.0
19:59:52.724597 IP 3.127.6.184.5060 > 172.31.3.158.5060: SIP: MESSAGE sip:1404@sbc.test.org SIP/2.0
19:59:52.754379 IP 17.74.26.179.50038 > 172.31.3.158.5060: SIP: SUBSCRIBE sip:1404@sbc.test.org SIP/2.0
19:59:52.813768 IP 172.31.3.158.5060 > 3.127.6.184.5060: SIP: SIP/2.0 407 Proxy Authentication Required
19:59:52.813865 IP 3.127.6.184.5060 > 172.31.3.158.5060: SIP: SIP/2.0 407 Proxy Authentication Required
</code></pre>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li><strong>Kamailio Version</strong> - output of <code class="notranslate">kamailio -v</code></li>
</ul>
<pre class="notranslate"><code class="notranslate">version: kamailio 5.7.0-dev0 (x86_64/linux) 0d9380
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: 0d9380
compiled on 14:06:32 May 26 2022 with gcc 11.2.0

</code></pre>
<ul dir="auto">
<li><strong>Operating System</strong>:</li>
</ul>

<pre class="notranslate"><code class="notranslate">Linux ip-172-31-3-158 5.15.0-1013-aws #17-Ubuntu SMP Fri Jun 10 10:40:12 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3185">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKD4YXGCX5NADYHAHDVTXLNTANCNFSM53MKQ2JA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZNRAVIKTW4HQOORNNDVTXLNTA5CNFSM53MKQ2JKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4TNEI5KA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3185</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3185",
"url": "https://github.com/kamailio/kamailio/issues/3185",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>