<div dir="ltr">Dear Community,<div><br></div><div>I have a problem with rtpproxy not changing the SDP IP in connection information in following scenario:<br><br><br>SIP1 -> kamailio1 + rtpproxy1 -> kamailio2 + rtpproxy2 -> SIP2<br><br>The first kamailio put SDP IP correctly (from rtpproxy) then the second kamailio does not change SDP connection information.<br><br>I think its related to SDP body which has: </div><div><br></div><div>a=nortpproxy:yes </div><div><br></div><div>line added by kamailio1.<br><br>So i tried to remove the a=nortpproxy:yes line from SDP before calling rtpproxy_manage.<br>But it looks like no difference in working - i think the SDP sent to rtpproxy is still having the line even when i removed it.<br><br>The issue is not happening when i remove kamailio1 + rtpproxy1. In that case my IP is put correctly in SDP in INVITE and in 200 OK.<br><br>In case of two kamailio with rtpproxy (kamailio1 and kamailio2) in signalling path i am getting:<br><br>rtpproxy [rtpproxy.c:2586]: force_rtp_proxy(): incorrect port 0 in reply from rtp proxy<br><br>for replies (SIP2 IP address in 200OK SDP is present instead of kamailio2 IP address).<br>For request INVITE i am not getting the error but the IP in SDP doesn't change.<br><br>kamailio2 config is now like below (but the attempt to remove a=nortpproxy:yes, did not work for me)</div><div><br></div><div># RTPProxy control and signaling updates for NAT traversal<br>route[NATMANAGE] {<br>#!ifdef WITH_NAT<br>        if (is_request()) {<br>                if(has_totag()) {<br>                        if(check_route_param("nat=yes")) {<br>                                setbflag(FLB_NATB);<br>                        }<br>                }<br>        }<br>#       if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return; -- commented this out because sometimes rtpproxy was not used and i wanted to use it always<br><br># added below code to remove a=nortpproxy:yes from SDP before rtpproxy_manage but its still not working </div><div><br>        if( has_body("application/sdp") && (1 == sdp_get_line_startswith("$avp(nortpproxy)", "a=nortpproxy" )) ){<br>                sdp_remove_line_by_prefix("a=nortpproxy:yes");<br>                xlog("removed nortpproxy:yes from SDP");<br>        }<br><br>        if(nat_uac_test("8")) {<br>                xlog("rtpproxy CO");<br>                rtpproxy_manage("co","MY_PUBLIC_IP_HERE");<br>        } else {<br>                xlog("rtpproxy COR");<br>                rtpproxy_manage("cor","

MY_PUBLIC_IP_HERE

");<br>        }<br><br>        if (is_request()) {<br>                if (!has_totag()) {<br>                        if(t_is_branch_route()) {<br>                                add_rr_param(";nat=yes");<br>                        }<br>                }<br>        }<br>        if (is_reply()) {<br>                if(isbflagset(FLB_NATB)) {<br>                        if(is_first_hop())<br>                                set_contact_alias();<br>                }<br>        }<br><br>        if(isbflagset(FLB_NATB)) {<br>                # no connect message in a dialog involving NAT traversal<br>                if (is_request()) {<br>                        if(has_totag()) {<br>                                set_forward_no_connect();<br>                        }<br>                }<br>        }<br>#!endif<br>        return;<br>}<br></div><div><br></div><div>Best regards,<br>Tom<br><br>PS. thanks for any hints to resolve the issue.</div></div>