<div dir="ltr">I don't know if it's the right  way but with modparam("rr", "enable_double_rr", 1)  adds both rr and topoh shows the correct one.<div><br></div><div><br></div><div><div>U 2016/12/23 09:58:23.818391 xxx.xxx.xxx.01:5060 -> xxx.xxx.xxx.02:5060</div><div>INVITE sip:11111111111@xxx.xxx.xxx.02 SIP/2.0.</div><div>Via: SIP/2.0/UDP xxx.xxx.xxx.01:5060;branch=z9hG4bK637b1bca.</div><div>Max-Forwards: 70.</div></div><div><br></div><div>U 2016/12/23 09:58:24.031593 <a href="http://172.16.213.38:5060">172.16.213.38:5060</a> -> <a href="http://172.16.208.11:5060">172.16.208.11:5060</a><br></div><div><div>INVITE sip:1153526112@172.16.208.11:5060;user=phone SIP/2.0.</div><div>---> Record-Route: <sip:172.16.213.38;r2=on;lr;ftag=as74a2be20;did=828.389>.<---</div><div>Record-Route: <sip:127.0.0.8;line=sr-N6IAzBFsMGZLM>.</div></div><div><br></div><div>So, it;s working now!</div><div><br></div><div>Cheers,</div><div><br></div><div>Diego</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-22 12:20 GMT-03:00 Diego Nadares <span dir="ltr"><<a href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:13px">Hi list,</span><div style="font-size:13px"><br><div>We have two eth,  one with a private ip and the other with a public ip. We have MHOMED configured. The call comes from private network and then is routed to a public network via rtjson routing. The call is routed but the thing is that the record route is being set with the private one (It's the same when calls come from public and is routed to a private network, record route has the public and not the private).</div><div><br></div><div>With mhomed configured shouldn't Record Route be updated as VIA header?</div><div><br></div><div>"....<span style="color:rgb(0,0,0);font-family:sans-serif"> </span><span style="color:rgb(0,0,0);font-family:sans-serif">When activated, sip-router will select a socket that can reach the destination (to be able to connect to the remote address). (sip-router opens a UDP socket to the destination, then it retrieves the local IP which was assigned by the operating system to the new UDP socket. Then this socket will be closed and the retrieved IP address will be used as IP address in the Via/Record-Route headers)..."</span></div><div><br></div><div>This is part of ngrep</div><div><br></div><div><div>U 2016/12/22 11:24:15.019643 <a href="http://172.16.213.21:5060/" target="_blank">172.16.213.21:<wbr>5060</a> -> <a href="http://172.16.213.38:5060/" target="_blank">172.16.213.38:5060</a></div><div>INVITE <a href="http://sip:11111111111@172.16.213.38:5060/" target="_blank">sip:11111111111@172.16.<wbr>213.38:5060</a> SIP/2.0.</div><div>Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG<wbr>4bK-13024-1-0.</div><div>From: "Test" <<a href="mailto:sip%3A2222222222@172.16.213.21" target="_blank">sip:2222222222@172.16.213.21</a>:<wbr>5060;user=phone>;tag=1.</div><div>To: <<a href="http://sip:1111111111@172.16.213.38:5060/" target="_blank">sip:1111111111@172.16.213.38:<wbr>5060</a>>.</div><div>Call-ID: <a href="mailto:1-13024@172.16.213.21" target="_blank">1-13024@172.16.213.21</a><wbr>.</div><div>CSeq: 1 INVITE.</div><div>Contact: "2222222222 <<a href="http://sip:2222222222@172.16.213.21:5060/" target="_blank">sip:2222222222@172.16.213.21:<wbr>5060</a>>.</div></div><div>....</div><div><br></div><div><div>U 2016/12/22 11:24:15.023923 <a href="http://172.16.213.38:5060/" target="_blank">172.16.213.38:<wbr>5060</a> -> <a href="http://172.16.213.21:5060/" target="_blank">172.16.213.21:5060</a></div><div>SIP/2.0 100 trying -- your call is important to us.</div><div>Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG<wbr>4bK-13024-1-0.</div></div><div>....</div><div><br></div><div><div>U 2016/12/22 11:24:15.038695 XXX.XXX.XXX.01:5060 -> XXX.XXX.XXX.02:5060</div><div>INVITE sip:<a href="tel:011%201111-1111" value="+541111111111" target="_blank">1111111111</a>@XXX.XXX.XXX.02:<wbr>5060 SIP/2.0.</div><div><b>-----> Record-Route: <sip:172.16.213.38;lr;ftag=1;d<wbr>id=1111>. <----</b></div><div>Via: SIP/2.0/UDP XXX.XXX.XXX.01;branch=z9hG4bKc<wbr>09f</div><div>Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4I<wbr>POlV7MGQKatycM.NLOBF6</div></div><div><br></div><div>This is my cfg</div><div><br></div><div>mhomed=1</div><div><br></div><div><div>request_route {</div><div><br></div><div><br></div><div>        # per request initial checks</div><div>        route(REQINIT);</div><div><br></div><div>        # NAT detection</div><div>        #route(NATDETECT);</div><div><br></div><div>        # CANCEL processing</div><div>        if (is_method("CANCEL")) {</div><div>                if (t_check_trans()) {</div><div>                        route(RELAY);</div><div>                }</div><div>                exit;</div><div>        }</div><div><br></div><div>        # handle requests within SIP dialogs</div><div>        route(WITHINDLG);</div><div><br></div><div>        ### only initial requests (no To tag)</div><div><br></div><div>        # handle retransmissions</div><div>        if(t_precheck_trans()) {</div><div>                t_check_trans();</div><div>                exit;</div><div>        }</div><div>        t_check_trans();</div><div><br></div><div>        # authentication</div><div>        route(AUTH);</div><div><br></div><div>        # record routing for dialog forming requests (in case they are routed)</div><div>        # - remove preloaded route headers</div><div>        remove_hf("Route");</div><div>        if (is_method("INVITE|SUBSCRIBE")<wbr>) {</div><div>                record_route();</div><div>        }</div></div></div><div style="font-size:13px">....</div><div style="font-size:13px"><br></div><div style="font-size:13px">Thanks in advance.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Diego</div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-22 12:08 GMT-03:00 Diego Nadares <span dir="ltr"><<a href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi list,<div><br><div>We have two eth,  one with a private ip and the other with a public ip. We have MHOMED configured. The call comes from private network and then is routed to a public network via rtjson routing. The is routed but the thing is that the record route is being set with the private one (It's the same when calls come from public and is routed to a private network, record route has the public and not the private).</div><div><br></div><div>With mhomed configured shouldn't Record Route be updated as VIA header </div><div><br></div><div>"....<span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:sans-serif;font-size:13px">When activated, sip-router will select a socket that can reach the destination (to be able to connect to the remote address). (sip-router opens a UDP socket to the destination, then it retrieves the local IP which was assigned by the operating system to the new UDP socket. Then this socket will be closed and the retrieved IP address will be used as IP address in the Via/Record-Route headers)..."</span></div><div><br></div><div>This is part of ngrep</div><div><br></div><div><div>U 2016/12/22 11:24:15.019643 <a href="http://172.16.213.21:5060" target="_blank">172.16.213.21:5060</a> -> <a href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a></div><div>INVITE <a href="http://sip:11111111111@172.16.213.38:5060" target="_blank">sip:11111111111@172.16.213.38:<wbr>5060</a> SIP/2.0.</div><div>Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG<wbr>4bK-13024-1-0.</div><div>From: "Test" <<a href="mailto:sip%3A2222222222@172.16.213.21" target="_blank">sip:2222222222@172.16.213.21</a>:<wbr>5060;user=phone>;tag=1.</div><div>To: <<a href="http://sip:1111111111@172.16.213.38:5060" target="_blank">sip:1111111111@172.16.213.38:<wbr>5060</a>>.</div><div>Call-ID: <a href="mailto:1-13024@172.16.213.21" target="_blank">1-13024@172.16.213.21</a>.</div><div>CSeq: 1 INVITE.</div><div>Contact: "2222222222 <<a href="http://sip:2222222222@172.16.213.21:5060" target="_blank">sip:2222222222@172.16.213.21:<wbr>5060</a>>.</div></div><div>....</div><div><br></div><div><div>U 2016/12/22 11:24:15.023923 <a href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a> -> <a href="http://172.16.213.21:5060" target="_blank">172.16.213.21:5060</a></div><div>SIP/2.0 100 trying -- your call is important to us.</div><div>Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG<wbr>4bK-13024-1-0.</div></div><div>....</div><div><br></div><div><div>U 2016/12/22 11:24:15.038695 XXX.XXX.XXX.01:5060 -> XXX.XXX.XXX.02:5060</div><div>INVITE sip:<a href="tel:011%201111-1111" value="+541111111111" target="_blank">1111111111</a>@XXX.XXX.XXX.02:<wbr>5060 SIP/2.0.</div><div><b>-----> Record-Route: <sip:172.16.213.38;lr;ftag=1;d<wbr>id=1111>. <----</b></div><div>Via: SIP/2.0/UDP XXX.XXX.XXX.01;branch=z9hG4bKc<wbr>09f</div><div>Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-j4I<wbr>POlV7MGQKatycM.NLOBF6</div></div><div><br></div><div>This is my cfg</div><div><br></div><div>mhomed=1</div><div><br></div><div><div>request_route {</div><div><br></div><div><br></div><div>        # per request initial checks</div><div>        route(REQINIT);</div><div><br></div><div>        # NAT detection</div><div>        #route(NATDETECT);</div><div><br></div><div>        # CANCEL processing</div><div>        if (is_method("CANCEL")) {</div><div>                if (t_check_trans()) {</div><div>                        route(RELAY);</div><div>                }</div><div>                exit;</div><div>        }</div><div><br></div><div>        # handle requests within SIP dialogs</div><div>        route(WITHINDLG);</div><div><br></div><div>        ### only initial requests (no To tag)</div><div><br></div><div>        # handle retransmissions</div><div>        if(t_precheck_trans()) {</div><div>                t_check_trans();</div><div>                exit;</div><div>        }</div><div>        t_check_trans();</div><div><br></div><div>        # authentication</div><div>        route(AUTH);</div><div><br></div><div>        # record routing for dialog forming requests (in case they are routed)</div><div>        # - remove preloaded route headers</div><div>        remove_hf("Route");</div><div>        if (is_method("INVITE|SUBSCRIBE")<wbr>) {</div><div>                record_route();</div><div>        }</div></div></div><div><br></div><div><br></div><div>Thanks in advance.</div><span class="m_-8348965370306492452HOEnZb"><font color="#888888"><div><br></div><div>Diego.</div><div><br></div></font></span></div>
</blockquote></div><br></div></div>
</blockquote></div><br></div>