<div dir="ltr"><div><div>Hello Travis, <br><br></div><div>I miss rtpproxy and I miss Nat handling. <br></div><div><br></div>see if this helps : <a href="http://opensips.org/pipermail/users/2011-January/016130.html">http://opensips.org/pipermail/users/2011-January/016130.html</a><br><br></div>BR <br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-14 17:36 GMT+01:00 Travis Manson-Drake <span dir="ltr"><<a href="mailto:travism@simplybits.com" target="_blank">travism@simplybits.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div>
<p class="MsoNormal">Hello Everyone!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Quick question, it seems the proxy is trying to forward request’s to my Host’s private IP addresses versus the IP of the router their behind. Is there something I have to add to my routing logic to have it route to the host’s public IP
versus private? I was thinking of a rewrite host port but don’t know how I would do that dynamically per transaction.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Any suggestions would be incredibly appreciated!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Also for reference here’s my routing logic.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">#default routing logic<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">route<u></u><u></u></p>
<p class="MsoNormal">{<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (!mf_process_maxfwd_header("10"))<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> sl_send_reply("483","Too Many Hops");<u></u><u></u></p>
<p class="MsoNormal"> exit;<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (cache_fetch("local",'$fU',$avp(PBX)))<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> $rd = $avp(PBX);<u></u><u></u></p>
<p class="MsoNormal"> xlog("this is the Value of the Cache_local r-uri domain: $avp(PBX) for $fU");<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"> else<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> avp_db_query("select Servers.ipaddress from Servers where Servers.ID in (select phone.ServerID from phone where phone.mac in (select MAC FROM `phone_registrations` where auth_userid = '$(fU{s.escape.common})'))",
"$avp(PBX)");<u></u><u></u></p>
<p class="MsoNormal"> cache_store("local",'$fU',"$avp(PBX)");<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> xlog("this is the Value of the AVP_DB_Querry r-uri domain: $rd for $fU");<u></u><u></u></p>
<p class="MsoNormal"> xlog("this is the Value of the AVP_DB_Querry pseudo variable: $avp(PBX) for $fU");<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if ($ct.fields(expires) == '0')<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> cache_remove("local",'$fU');<u></u><u></u></p>
<p class="MsoNormal"> exit;<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (is_method("OPTIONS"))<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> record_route();<u></u><u></u></p>
<p class="MsoNormal"> t_relay();<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (is_method("REGISTER"))<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> record_route();<u></u><u></u></p>
<p class="MsoNormal"> route(register);<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (is_method("INVITE")) && ($rd=="67.212.192.82")<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> record_route();<u></u><u></u></p>
<p class="MsoNormal"> route(inbound);<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (is_method("INVITE")) && (!$rd=="67.212.192.82")<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> record_route();<u></u><u></u></p>
<p class="MsoNormal"> route(outbound);<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (is_method("CANCLE"))<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> if (t_check_trans())<u></u><u></u></p>
<p class="MsoNormal"> t_relay();<u></u><u></u></p>
<p class="MsoNormal"> exit;<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> if (is_method("TRANSFER"))<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> record_route();<u></u><u></u></p>
<p class="MsoNormal"> route(xfer);<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">}<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">#ROutes Below<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">route[register]<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> $rU = $fU;<u></u><u></u></p>
<p class="MsoNormal"> $rd = $avp(PBX);<u></u><u></u></p>
<p class="MsoNormal"> t_relay();<u></u><u></u></p>
<p class="MsoNormal"> xlog("this is what were sending as our R-URI to the PBX for REGISTER: $ru ");<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">route[inbound]<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> #$rU = $fU;<u></u><u></u></p>
<p class="MsoNormal"> #$rd =$avp(PBX);<u></u><u></u></p>
<p class="MsoNormal"> t_relay();<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal">route[outbound]<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> #$rU = $fU;<u></u><u></u></p>
<p class="MsoNormal"> #$rd =$avp(PBX);<u></u><u></u></p>
<p class="MsoNormal"> t_relay();<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">route[xfer]<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> $rU = $fU;<u></u><u></u></p>
<p class="MsoNormal"> $rd = $avp(PBX);<u></u><u></u></p>
<p class="MsoNormal"> t_relay();<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<table style="width:3.25in" border="0" cellpadding="0" cellspacing="3" width="312">
<tbody>
<tr>
<td style="width:231.0pt;padding:0in 0in 0in 0in" valign="top" width="308">
<p class="MsoNormal" style="line-height:105%"><span style="font-size:13.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1884c6;letter-spacing:-.75pt">Travis Manson-Drake<br>
</span><span style="font-size:13.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#f79321;letter-spacing:-.75pt">Voice Systems Analyst<u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Segoe UI",sans-serif"><u></u> <u></u></span></p>
<table style="width:3.25in;border:none;border-top:solid windowtext 2.25pt" border="1" cellpadding="0" cellspacing="3" width="312">
<tbody>
<tr style="height:1.35pt">
<td style="width:231.0pt;border:none;padding:.75pt .75pt .75pt .75pt;height:1.35pt" width="308">
<p class="MsoNormal" style="line-height:105%"><span style="font-size:13.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1884c6;letter-spacing:-.75pt">Simply Bits, LLC<br>
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:black;letter-spacing:1.0pt">T:</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1f497d;letter-spacing:1.0pt">
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1b84c7;letter-spacing:1.0pt"><a href="tel:520.545.0311" value="+15205450311" target="_blank">520.545.0311</a>
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#2d2d2d;letter-spacing:1.0pt">F:</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1f497d;letter-spacing:1.0pt">
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1b84c7;letter-spacing:1.0pt"><a href="tel:520.545.7252" value="+15205457252" target="_blank">520.545.7252</a><br>
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:black;letter-spacing:1.0pt">E:</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1f497d;letter-spacing:1.0pt">
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:#1b84c7;letter-spacing:1.0pt"><a href="mailto:travism@simplybits.com" target="_blank"><span style="color:blue">travism@simplybits.com</span></a> <br>
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI",sans-serif;color:black">5225 N. Sabino Canyon Road<br>
Tucson, AZ 85750<br>
</span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI Semibold",sans-serif;color:black">Support Hotline: <a href="tel:520.545.0333" value="+15205450333" target="_blank">520.545.0333</a></span><span style="font-size:10.0pt;line-height:105%;font-family:"Segoe UI Semibold",sans-serif;color:#767171"><u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<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" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>