<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" 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="moz-cite-prefix">Am 25.08.19 um 18:01 schrieb Salah Ahmed:<br>
</div>
<blockquote type="cite" cite="mid:CABr3=w0-3oaVL2t7KrTT5MS=zXvjbtC+076OgoDY37_SAzKO8w@mail.gmail.com">
<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 style="background-color:rgb(251,250,249);color:rgb(51,51,51);font-family:Consolas,"Andale
            Mono WT","Andale Mono","Bitstream Vera
            Sans Mono","Nimbus Mono
            L",Monaco,"Courier
            New",monospace;font-size:14px">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" moz-do-not-send="true">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" moz-do-not-send="true">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: <sip:172.32.0.6:5060;lr;ftag=1><br>
Call-ID: T1_MYSER<br>
From: <<a href="mailto:sip%3Acaller@172.32.100.100" target="_blank" moz-do-not-send="true">sip:caller@172.32.100.100</a>>;tag=1<br>
To: "callee" <<a href="mailto:sip%3A3228090000@172.32.0.6" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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="gmail-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" moz-do-not-send="true">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="gmail-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" moz-do-not-send="true">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="gmail-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="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058mimeAttachmentHeader">
</fieldset>
<pre class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-quote-pre">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="gmail-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" moz-do-not-send="true">sr-dev@lists.kamailio.org</a>
<a class="gmail-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" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<pre class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-signature" cols="72">-- 
Henning Westerholt - <a class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788gmail-m_-2461096923036265058moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank" moz-do-not-send="true">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-signature" cols="72">-- 
Henning Westerholt - <a class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681gmail-m_-1677847443540144788moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank" moz-do-not-send="true">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-signature" cols="72">-- 
Henning Westerholt - <a class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="gmail-m_-2613943984810777120gmail-m_4657903105470472571gmail-m_-5678239731757909091m_211963924823906007gmail-m_5539960722982470681moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank" moz-do-not-send="true">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>