<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>the interface selection is based on the conditions met at a
specific moment, depending also on the operations done in the code
case by case. If you want to enforce a specific one, then you have
to specify it via modparam.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 04.05.21 12:36, pwerspire wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAA4m=sHtX6QA9O8Nbn7-H8YHryqPEPusyB8Na3Xg2xi62BSa8A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I captured a tcpdump on this scenario and saw that in fact,
the siptrace is sending the 403 Forbidden towards Homer.</div>
<div>The issue is that for this local reply, Kamailio instead of
using the private interface as it does for the other messages,
is choosing the public interface, so the local reply doesn't
arrive on heplify side.</div>
<div><br>
</div>
<div>After forcing the socket with send_sock_addr, the reply
appears on Homer.</div>
<div>modparam("siptrace", "send_sock_addr", <a class="moz-txt-link-rfc2396E" href="sip:x.x.x.x:xxxx">"sip:x.x.x.x:xxxx"</a>)<br>
</div>
<div><br>
</div>
<div>From the documentation, I saw that if we don't use
the send_sock_addr Kamailio will choose the interface, but
shouldn't it choose always the same interface?</div>
<div><br>
</div>
<div>Thanks for the help finding the issue.</div>
<div>Regards,</div>
<div>Tiago</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>
escreveu no dia segunda, 3/05/2021 à(s) 21:58:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello,</p>
<p>logs indicate that the siptrace is engaged when the reply
is sent out:</p>
<p>May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG: siptrace
[siptrace_hep.c:496]: pipport2su(): the port string is
5060<br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG: siptrace
[siptrace_hep.c:496]: pipport2su(): the port string is
58530<br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG:
<core> [core/proxy.c:264]: mk_proxy(): doing DNS
lookup...<br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG: siptrace
[siptrace_hep.c:184]: trace_send_hep3_duplicate(): setting
up the socket_info<br>
</p>
<p>Can you watch the network traffic with ngrep/wireshark
and check if the reply is actually sent over?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 03.05.21 19:16, pwerspire wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>So I tested with the following configuration: </div>
<div><br>
</div>
<div>modparam("siptrace", "duplicate_uri", <a
moz-do-not-send="true">"sip:x.x.x.x:9060"</a>)<br>
modparam("siptrace", "hep_mode_on", 1)<br>
modparam("siptrace", "trace_to_database", 0)<br>
#modparam("siptrace", "trace_flag", FLT_SIPTRACE)<br>
modparam("siptrace", "trace_on", 1)<br>
modparam("siptrace", "trace_mode", 1)<br>
modparam("siptrace", "hep_version", 3)<br>
modparam("siptrace", "hep_capture_id", 2040)<br>
</div>
<div><br>
</div>
<div>I can see this on the logs: </div>
<div><br>
</div>
<div>May 03 15:40:30 kamailio[6259]: ) 5(6267) DEBUG:
sl [sl_funcs.c:554]: sl_run_callbacks(): execute
callback for event type 1<br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG:
siptrace [siptrace.c:1842]: trace_sl_onreply_out():
trace off...<br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG:
<core> [core/parser/msg_parser.c:620]:
parse_msg(): SIP Reply (status):<br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG:
<core> [core/parser/msg_parser.c:622]:
parse_msg(): version: <SIP/2.0><br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG:
<core> [core/parser/msg_parser.c:624]:
parse_msg(): status: <403><br>
May 03 15:40:30 kamailio[6259]: 5(6267) DEBUG:
<core> [core/parser/msg_parser.c:626]:
parse_msg(): reason: <Forbidden><br>
</div>
<div><br>
</div>
<div>In attach is the log, I changed some of the values
to mask the original values.</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Regards,</div>
<div>Tiago</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Daniel-Constantin
Mierla <<a href="mailto:miconda@gmail.com"
target="_blank" moz-do-not-send="true">miconda@gmail.com</a>>
escreveu no dia segunda, 3/05/2021 à(s) 17:25:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello,</p>
<p>local replies should be captured with
trace_mode=1. Run with debug=3 in kamailio.cfg and
attach all log/debug messages printed by Kamailio
for such case (from the INVITE to the ACK
processing).</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 03.05.21 16:31, pwerspire wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>Thanks for your reply.</div>
<div><br>
</div>
<div>We had the modparam("siptrace",
"trace_mode", 1) but the issue with that is
that local error answers from kamailio doesn't
appear.</div>
<div><br>
</div>
<div>For example, when Kamailio receives the
INVITE and replies with a forbidden, the
Invite and the ACK is there but the Forbidden
is not.</div>
<div><br>
</div>
<div>So with "trace_mode" 1 , everything works
fine except this messages missing and this was
the problem that we tried to solve messing
around with the functions and flags.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Tiago</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Daniel-Constantin
Mierla <<a href="mailto:miconda@gmail.com"
target="_blank" moz-do-not-send="true">miconda@gmail.com</a>>
escreveu no dia segunda, 3/05/2021 à(s) 15:39:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
On 03.05.21 11:02, pwer spire wrote:<br>
> Hi,<br>
><br>
> Any one have some idea about this? Or how
it should be configured in order to still have
the original response received in kamailio
instead of the mapping one?<br>
<br>
If you want all the traffic mirrored, then
look at:<br>
<br>
*<br>
<a
href="https://www.kamailio.org/docs/modules/stable/modules/siptrace.html#siptrace.p.trace_mode"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://www.kamailio.org/docs/modules/stable/modules/siptrace.html#siptrace.p.trace_mode</a><br>
<br>
It is simpler that the use of functions and
flags to select what<br>
messages should be mirrored.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a
href="http://www.asipto.com"
rel="noreferrer" target="_blank"
moz-do-not-send="true">www.asipto.com</a><br>
<a href="http://www.twitter.com/miconda"
rel="noreferrer" target="_blank"
moz-do-not-send="true">www.twitter.com/miconda</a>
-- <a
href="http://www.linkedin.com/in/miconda"
rel="noreferrer" target="_blank"
moz-do-not-send="true">www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - Online<br>
May 17-20, 2021 (Europe Timezone) - June 7-10,
2021 (America Timezone)<br>
* <a
href="https://www.asipto.com/sw/kamailio-advanced-training-online/"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a><br>
<br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank" moz-do-not-send="true">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</body>
</html>