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("incoming reply\n");<br>#!ifdef WITH_NAT<br> if ((isflagset(FLT_NATS) || isbflagset(FLB_NATB))<br> && status=~"(183)|(2[0-9][0-9])") {<br>
force_rtp_proxy("r");<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("PUBLISH"))<br> {<br> loose_route();<br> t_relay();<br> exit;<br> }<br><br><br> if(is_method("REGISTER"))<br> {<br>
t_relay_to("tls:<a href="http://115.114.48.75:443">115.114.48.75:443</a>");<br> exit();<br> }<br><br> if(is_method("INVITE|BYE|CANCEL|SUBSCRIBE|REFER|NOTIFY"))<br>
{<br> xdbg("incoming request\n");<br><span style="color:rgb(255,0,0)"><br> route(RTPPROXY);<br> t_relay_to("tls:<a href="http://115.114.48.75:443">115.114.48.75:443</a>");<br>
exit();</span><br> }<br><br></i>Thannks<br>Kamal<br>