<div><div dir="ltr">Hi Federico,<div><br></div><div>This given sample work as well. Thanks for your help.</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto">Salah</div></div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2019 at 9:56 AM Salah Ahmed <<a href="mailto:txrubel@gmail.com" target="_blank">txrubel@gmail.com</a>> wrote:<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 dir="ltr">Hello Daniel,<div><br></div><div>This is correct, we can get the forwarding message with $snd(buf) on the onsend_route. But unfortunately, there have no any sip_trace version to do log with a given message as method argument. </div><div><br></div><div>Actually right now, we using trace_mode=1 setup. But we need to do log only for Kamailio to UAC side, not to do log for both side.</div><div><br></div><div>Thanks,</div><div>Salah </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2019 at 2:54 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<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 bgcolor="#FFFFFF">
<p>Hello,</p>
<p>the $mb and $msg(buf) still point to incoming message, even in
the onsend_route. The content of the outgoing buffer is in
$snd(buf).</p>
<p>Isn't trace_mode=1 giving what you need?</p>
<p> - <a href="https://www.kamailio.org/docs/modules/stable/modules/siptrace.html#siptrace.p.trace_mode" target="_blank">https://www.kamailio.org/docs/modules/stable/modules/siptrace.html#siptrace.p.trace_mode</a></p>
<p>Or do you still want to filter some SIP message, not mirror
everything?</p>
<p>On the other hand, I expected sip_trace() to take the outgoing
buffer in onsend_route when mirroring, maybe it is not doing it
for response...</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779moz-cite-prefix">On 25.08.19 18:50, Salah Ahmed wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Henning,
<div><br>
</div>
<div>I have tried with $msg(buf) in the onsend_route, got those
replies received from UAS, but didn't found any replies what
kamailio forwarded to UAC. The sip_trace doing same, that's my
concern, I think onsend_route we suppose to get those reply
messages which kamailio forwarded to UAC.</div>
<div><br>
</div>
<div>For sip_trace use, we call sip_trace in the onsend_route,
and didn't set siptrace flag(22) anywhere in the script.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Salah </div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Aug 25, 2019 at 11:41
AM Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> wrote:<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 bgcolor="#FFFFFF">
<p>Hello Salah,</p>
<p>add some logging (e.g. print the $mb PV) to see what is
captured from the onsend_route. Then you can compare
against siptrace content and see if they match or is there
something different captured.</p>
<p>You need to call sip_trace() in the onsend_route, the
trace_flag capture method does not work there.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-cite-prefix">Am
25.08.19 um 18:01 schrieb Salah Ahmed:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Daniel,
<div><br>
</div>
<div>Thanks for your reply. We want this not to modify
the reply message, we just want to invoke sip_trace
from onsend_route. Actually we want to trace all sip
messages in between Kamailio and UAC. Right now we can
easily grab all requests using onsend_route. We also
set the core parameter <span>onsend_route_reply = yes
,</span><span style="background-color:rgb(251,250,249);color:rgb(51,51,51);font-size:14px"><font face="arial, sans-serif">This started capturing
replies, but those</font></span> are UAS to
Kamailio side replies. For debug I added xlog in the
onsend_route and print the reply messages. I am not
sure, is that sip_trace method issue or the
onsend_route issue. Please guide me is there anything
else I can do for it.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Salah </div>
</div>
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Aug 23, 2019
at 2:29 PM Salah Ahmed <<a href="mailto:txrubel@gmail.com" target="_blank">txrubel@gmail.com</a>>
wrote:<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>
<div dir="auto">Hello Henning,</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Is there anything wrong what we want
to do?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks,</div>
<div dir="auto">Salah</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Aug 22,
2019 at 2:56 PM Salah Ahmed <<a href="mailto:txrubel@gmail.com" target="_blank">txrubel@gmail.com</a>>
wrote:<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 dir="ltr">Hello Henning,
<div><br>
</div>
<div>Yes this is correct, this reply came from
UAS. We got this correctly. But we want to
get, which kamailio sent to UAC side.</div>
<div><br>
</div>
<div>This following reply, we want to get by
onreply_route</div>
<div><br>
</div>
<div> 3(23) DEBUG: <core>
[core/msg_translator.c:2306]:
generate_res_buf_from_sip_res(): copied
size: orig:130, new: 16, rest: 773 msg=<br>
SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP
172.32.100.100:5055;branch=z9hG4bK-254-1-0<br>
Record-Route:
<a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779moz-txt-link-rfc2396E"><sip:172.32.0.6:5060;lr;ftag=1></a><br>
Call-ID: T1_MYSER<br>
From: <<a href="mailto:sip%3Acaller@172.32.100.100" target="_blank">sip:caller@172.32.100.100</a>>;tag=1<br>
To: "callee" <<a href="mailto:sip%3A3228090000@172.32.0.6" target="_blank">sip:3228090000@172.32.0.6</a>>;tag=6fb31703-d630-4140-a41b-7270cdcae85b<br>
CSeq: 1 INVITE<br>
Server: MYX Callcontrol<br>
Contact: <sip:<a href="http://172.32.10.70:5060" target="_blank">172.32.10.70:5060</a>><br>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH,
INVITE, ACK, BYE, CANCEL, UPDATE, REGISTER,
MESSAGE, REFER<br>
Supported: timer, replaces, norefersub<br>
Remote-Party-ID: <<a href="mailto:sip%3As@172.32.0.6" target="_blank">sip:s@172.32.0.6</a>>;privacy=off;screen=no<br>
Content-Type: application/sdp<br>
Content-Length: 178<br>
<br>
v=0<br>
o=- 53655765 2353687639 IN IP4 172.32.10.70<br>
s=session<br>
c=IN IP4 172.32.10.70<br>
t=0 0<br>
m=audio 10006 RTP/AVP 0<br>
a=rtpmap:0 PCMU/8000<br>
a=ptime:20<br>
a=maxptime:150<br>
a=sendrecv<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Salah</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Aug
22, 2019 at 2:52 PM Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>
wrote:<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 bgcolor="#FFFFFF">
<p>(moved the discussion to user list)</p>
<p>Hello Salah,</p>
<p>I see the this output in the log
message:</p>
<p> 6(26) INFO: <script>:
on_reply_route [SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP
172.32.0.6;rport=5060;received=172.32.0.6;branch=z9hG4bKe68a.99dc492fe74dcfe1017828521a5fa362.0<br>
</p>
<p> 2(22) INFO: <script>:
on_reply_route [SIP/2.0 100 Trying<br>
Via: SIP/2.0/UDP
172.32.0.6;rport=5060;received=172.32.0.6;branch=z9hG4bK178a.79cddb135aabfc42736fd9e9fd826ba8.0</p>
<p>and so on.. So you are seeing the
replies correctly, or I wrong?</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-cite-prefix">Am
22.08.19 um 21:29 schrieb Salah Ahmed:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Henning,
<div><br>
</div>
<div>We already added xlog in the
onreply_route and found all messages
in between kamailio and UAS. The
attached log files in first email
has those logs. If any other
specific log needed I am here to
provide them.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Salah</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On
Thu, Aug 22, 2019 at 2:24 PM Henning
Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>
wrote:<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 bgcolor="#FFFFFF">
<p>Hello Salah,</p>
<p>ok, see if you are able to
output some easy log with "xlog"
in this route, to make sure
there is no cfg problem
somewhere.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-cite-prefix">Am
22.08.19 um 21:15 schrieb Salah
Ahmed:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Henning,
<div><br>
</div>
<div>Thanks for quick reply,
We armed the t_on_reply just
before t_relay() in the
route block. </div>
<div><br>
</div>
<div>
t_on_reply("LOGRPL");<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
}<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Salah</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu,
Aug 22, 2019 at 2:03 PM
Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>
wrote:<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 bgcolor="#FFFFFF">
<p>Hello Salah,</p>
<p>the replies are going
from the UAS to the UAC
over Kamailo as a proxy,
with the exception of
the hop-by-hop 100.<br>
</p>
<p>So you should see the
200 OK in the Kamailio
in reply_route and
onreply_route. Maybe you
can check if you armed
the onreply_route with
t_on_reply for the
INVITE routing.</p>
<p>Cheers,</p>
<p>Henning</p>
<div class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-cite-prefix">Am
22.08.19 um 19:50
schrieb Salah Ahmed:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>We facing an
issue on capturing
sip message in
Kamailio(Version:
5.2.3). The scenario
is very simple.</div>
<div><br>
</div>
<div><font face="monospace">UAC
Kamailio
UAS</font></div>
<div><font face="monospace"> |--------INVITE--------->|
|</font></div>
<div><font face="monospace"> |
|-------INVITE------->|</font></div>
<div><font face="monospace"> |
|<------100
Trying----|</font></div>
<div><font face="monospace"> |<-------100
Trying------|
|</font></div>
<div><font face="monospace"> |
|<------200
Ok--------|</font></div>
<div><font face="monospace"> |<-------200
Ok----------|
|</font></div>
<div><br>
</div>
<div>In this simple
scenario, we can't
catch any reply
messages in between
the Kamailio and
UAC. We have tried <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px">reply_route, </span>onreply_route,
and onsend_route.
But no one work to
grep that reply on
that side.
onsend_route was bad
try as its only for
forwarded reply
message. Is there
any other magic to
capture those
replies. A debug=3
log message attached
here. </div>
<div><br>
</div>
<div>Thanks,</div>
<div>Salah</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058mimeAttachmentHeader"></fieldset>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-quote-pre">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-txt-link-abbreviated" href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a>
<a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-signature" cols="72">--
Henning Westerholt - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-signature" cols="72">--
Henning Westerholt - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-signature" cols="72">--
Henning Westerholt - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192mimeAttachmentHeader"></fieldset>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-signature" cols="72">--
Henning Westerholt - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779gmail-m_9167484853131831192moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_6281587521951215277gmail-m_-7004081832394327001gmail-m_1125879661765732779moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a></pre>
</div>
</blockquote></div>
</blockquote></div>
</div>