Dear All<br>When I get INVITE (received in UDP), I send it to another proxy in TLS.<br>For this purpose I have modified kamailio.cfg route section , please refer the lines in red.<br>Just before sending in TLS, I modify the IP address in SDP, so that media packets will pass through RTP proxy running <br>
When INVITE is reached the next proxy, I see the IP address is changed . So far so good.<br><br>Next I am trying to modify the IP address in 200 OK to INVITE.<br>However it is not taking effect.<br><br>I hope we need to modify in onreply_route function. Something is wrong here. I am receiving 200 OK for INVITE in TLS. Next I am sending 200 OK for INVITE to endpoints using UDP. Not sure if onreply_route is being executed or not. Can somebody give me pointer whats wrong here.<br>
<br><i># Sample onreply route<br>onreply_route[REPLY_ONE] {<br><br>        xdbg(&quot;incoming reply\n&quot;);<br>#!ifdef WITH_NAT<br>        if ((isflagset(FLT_NATS) || isbflagset(FLB_NATB))<br>                        &amp;&amp; status=~&quot;(183)|(2[0-9][0-9])&quot;) {<br>
                force_rtp_proxy(&quot;r&quot;);<br>        }<br>        if (isbflagset(FLB_NATB)) {<br>                fix_nated_contact();<br>        }<br>#!endif<br>}<br></i><br><br><i><br># Main SIP request routing logic<br>
# - processing of any incoming SIP request starts with this route<br>route {<br><br>        # per request initial checks<br>        route(REQINIT);<br>        setflag(FLT_NATS);<br>        # NAT detection<br>        route(NAT);<br>
<br>        if(is_method(&quot;PUBLISH&quot;))<br>        {<br>                loose_route();<br>                t_relay();<br>                exit;<br>        }<br><br><br>        if(is_method(&quot;REGISTER&quot;))<br>        {<br>
                t_relay_to(&quot;tls:<a href="http://115.114.48.75:443">115.114.48.75:443</a>&quot;);<br>                exit();<br>        }<br><br>        if(is_method(&quot;INVITE|BYE|CANCEL|SUBSCRIBE|REFER|NOTIFY&quot;))<br>
        {<br>                xdbg(&quot;incoming request\n&quot;);<br><span style="color:rgb(255,0,0)"><br>                route(RTPPROXY);<br>                t_relay_to(&quot;tls:<a href="http://115.114.48.75:443">115.114.48.75:443</a>&quot;);<br>
                exit();</span><br>        }<br><br></i>Thannks<br>Kamal<br>