Thanks a lot.<br>-kamal<br><br><div class="gmail_quote">On Fri, Nov 16, 2012 at 7:46 PM, Olle E. Johansson <span dir="ltr">&lt;<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div>16 nov 2012 kl. 12:18 skrev Kamal Palei &lt;<a href="mailto:palei.kamal@gmail.com" target="_blank">palei.kamal@gmail.com</a>&gt;:</div><div class="im"><br><blockquote type="cite">
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></blockquote></div>THe onreply_route {} is executed for every response. If you want to trigger your own reply route, like your onreply_route[REPLY_ONE] {} you have to do it with the TM module funcition</div><div>t_on_reply().</div>
<div><br></div><div>/O</div><div><div class="h5"><div><br></div><div><blockquote type="cite"><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/" target="_blank">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/" target="_blank">115.114.48.75:443</a>&quot;);<br>

                exit();</span><br>        }<br><br></i></blockquote></div><br></div></div><div>
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div style="word-wrap:break-word"><div style="word-wrap:break-word"><div>--</div><div><div style="font-size:medium">* Olle E. Johansson - <a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a><br>* Kamailio &amp; SIP Masterclass Miami FL December 2012</div>
<div style="font-size:medium">* <a href="http://edvina.net/training/" target="_blank">http://edvina.net/training/</a></div></div><div><br></div></div></div></div></span><br><br>
</div>
<br></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br>