<div dir="ltr">Hello<div><br></div><div style>I checked it. It don't to go to the route[nat_fixups]. </div><div style>But My UACs both behind the same NAT.</div><div style><br></div><div style>How to check why not go to the route[nat_fixups]??</div>
<div style><br></div><div style>Thanks</div><div style>Nick</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/18 Nick Khamis <span dir="ltr"><<a href="mailto:symack@gmail.com" target="_blank">symack@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It will change it if fired. Make sure that you get to<br>
"route[nat_fixups]" for the call. And for testing, try removing the<br>
flags" (isflagset(5) || isbflagset(6))" etc... xlog("Why me god:<br>
$ru\n") always seems to have mercy on our souls. ;)<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Nick.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 3/18/13, Nick <<a href="mailto:nick.chang@kland.com.tw">nick.chang@kland.com.tw</a>> wrote:<br>
> Hello<br>
><br>
> I modify my config.<br>
><br>
> route[nat_fixups] {<br>
> xlog("L_NOTICE","4 NAT FIXED - $fu call $ru ");<br>
> #---- RTP Proxy handling ---#<br>
> if (is_method("BYE|CANCEL")) {<br>
> unforce_rtp_proxy();<br>
> } else if (is_method("INVITE")){<br>
> #---- Activates the RTP Proxy for the CALLEE ---#<br>
> rtpproxy_offer("c","61.67.128.46");<br>
> };<br>
> # catch and fix replies<br>
> t_on_reply("2");<br>
> }<br>
><br>
> onreply_route[2] {<br>
> #xlog("incoming reply\n");<br>
><br>
> #---- Handling of the SDP for the 200 or 183 reply ----#<br>
> #---- If behind nat (flags 5 or 6) start RTP Proxy ----#<br>
> #---- Activates the RTP Proxy for the CALLER ----#<br>
> if ( is_method("INVITE") &&<br>
> (isflagset(5) || isbflagset(6)) &&<br>
> has_body("application/sdp") ){<br>
> rtpproxy_answer("c","61.67.128.46");<br>
> }<br>
><br>
> #---- If the CALLEE is behind NAT, fix the CONTACT HF ----#<br>
> if (isbflagset(6)) {<br>
> fix_nated_contact();<br>
> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');<br>
> }<br>
> exit;<br>
> }<br>
><br>
> Then, I used ngrep get packet.<br>
><br>
> Connection Information still not Opensips SERVER of IP.<br>
> It's not change to my setting.<br>
><br>
> Do you have any suggestion??<br>
><br>
> Thanks<br>
> Nick<br>
><br>
><br>
><br>
> 2013/3/15 Nick Khamis <<a href="mailto:symack@gmail.com">symack@gmail.com</a>><br>
><br>
>> Hello Nick,<br>
>><br>
>> As Bogdan pointed out please look at the important parts of your SDP<br>
>> payload:<br>
>><br>
>> <a href="http://sip:55688@61.67.128.46:5060" target="_blank">sip:55688@61.67.128.46:5060</a><br>
>> Contact: <<a href="http://sip:55688@211.75.166.164:5060" target="_blank">sip:55688@211.75.166.164:5060</a>><br>
>> c=IN IP4 211.75.166.164<br>
>><br>
>> <a href="mailto:sip%3A9999@61.67.128.46">sip:9999@61.67.128.46</a><br>
>> Contact: <<a href="http://sip:9999@192.168.4.197:5060" target="_blank">sip:9999@192.168.4.197:5060</a>><br>
>> c=IN IP4 192.168.4.197<br>
>><br>
>> Kind Regards,<br>
>><br>
>> Nick.<br>
>><br>
>> On 3/15/13, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br>
>> > Hi Nick,<br>
>> ><br>
>> > But in the SDP-s received by the UACs, in the "c" line, you see the IP<br>
>> > of the other UAC and not the IP of OpenSIPS, right ?<br>
>> ><br>
>> > Regards,<br>
>> ><br>
>> > Bogdan-Andrei Iancu<br>
>> > OpenSIPS Founder and Developer<br>
>> > <a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a><br>
>> ><br>
>> ><br>
>> > On 03/15/2013 03:28 AM, Nick Chang wrote:<br>
>> >><br>
>> >> Hello Bodgan<br>
>> >><br>
>> >> 2 UACs behind the same nat, I check my routing.<br>
>> >><br>
>> >> UAC don't route to nat_fixups.<br>
>> >><br>
>> >> But UACs checked My OpenSIPS private IP (10.10.12.111), Not Public IP.<br>
>> >><br>
>> >> I don't know why? Do you have any suggestion??<br>
>> >><br>
>> >> My Config<br>
>> >><br>
>> >> route[generic_relay] {<br>
>> >><br>
>> >> xlog("L_NOTICE","3 invite $si");<br>
>> >><br>
>> >> # for INVITEs enable some additional helper routes<br>
>> >><br>
>> >> #---- Helper route, if nat=yes in the R-URI set flag 6 ----#<br>
>> >><br>
>> >> #---- This is used to Process REINVITES ----#<br>
>> >><br>
>> >> if (subst_uri('/((sip:.*)||(sip:.*:.*));nat=yes/\1/')){<br>
>> >><br>
>> >> setbflag(6);<br>
>> >><br>
>> >> };<br>
>> >><br>
>> >> #---- If caller(flag 5) or callee(flag 6) are behind NAT ---#<br>
>> >><br>
>> >> #---- Call the route(6) to force the use of the RTP Proxy ---#<br>
>> >><br>
>> >> if (isflagset(5) || isbflagset(6)) {<br>
>> >><br>
>> >> route(nat_fixups);<br>
>> >><br>
>> >> };<br>
>> >><br>
>> >> if (!t_relay()) {<br>
>> >><br>
>> >> sl_reply_error();<br>
>> >><br>
>> >> };<br>
>> >><br>
>> >> exit;<br>
>> >><br>
>> >> }<br>
>> >><br>
>> >> route[nat_fixups] {<br>
>> >><br>
>> >> xlog("L_NOTICE","4 NAT FIXED - $fu call $ru ");<br>
>> >><br>
>> >> #---- RTP Proxy handling ---#<br>
>> >><br>
>> >> if (is_method("BYE|CANCEL")) {<br>
>> >><br>
>> >> unforce_rtp_proxy();<br>
>> >><br>
>> >> } else if (is_method("INVITE")){<br>
>> >><br>
>> >> #---- Activates the RTP Proxy for the CALLEE ---#<br>
>> >><br>
>> >> rtpproxy_offer();<br>
>> >><br>
>> >> };<br>
>> >><br>
>> >> # catch and fix replies<br>
>> >><br>
>> >> t_on_reply("2");<br>
>> >><br>
>> >> }<br>
>> >><br>
>> >> Thanks<br>
>> >><br>
>> >> Nick<br>
>> >><br>
>> >> *From:*Bogdan-Andrei Iancu [mailto:<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>]<br>
>> >> *Sent:* Friday, March 15, 2013 12:32 AM<br>
>> >> *To:* OpenSIPS users mailling list<br>
>> >> *Cc:* Nick Chang<br>
>> >> *Subject:* Re: [OpenSIPS-Users] two UACs behind the same nat<br>
>> >><br>
>> >> Hi Nick,<br>
>> >><br>
>> >> Assuming routing is possible between the 2 UACs, you need to double<br>
>> >> check that the IPs in SDP are not changed by proxy and points to the<br>
>> >> actual UACs.<br>
>> >><br>
>> >> Regards,<br>
>> >><br>
>> >> Bogdan-Andrei Iancu<br>
>> >> OpenSIPS Founder and Developer<br>
>> >> <a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a><br>
>> >><br>
>> >><br>
>> >> On 03/11/2013 11:40 AM, Nick Chang wrote:<br>
>> >><br>
>> >> Hello<br>
>> >><br>
>> >> I have two UACs behind the same nat.<br>
>> >><br>
>> >> A call B is OK. But it's not voice.<br>
>> >><br>
>> >> Can everyone give me a suggestion??<br>
>> >><br>
>> >> Thanks<br>
>> >><br>
>> >> Nick<br>
>> >><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> Users mailing list<br>
>> >> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
>> >> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>> ><br>
>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>><br>
><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>