Thank you guys, it's working now.<br><br>Apparently, rewritehostport(&quot;&lt;ip&gt;:&lt;port&gt;&quot;) works great with rptproxy while forward does exactly that, forwards the call to the destination bypassing the force_rtp_proxy request. This should be documented somewhere.
<br><br>ScriptHead<br><br><div><span class="gmail_quote">On 3/9/06, <b class="gmail_sendername">Vitaly Nikolaev</b> &lt;<a href="mailto:vnikolaev@intermedia.net">vnikolaev@intermedia.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">











<div>

<ol style="margin-top: 0in;" start="1" type="1">
 <li style="color: navy;"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-US">I never used forward, see my example, I do not know if it actually
     relay call or not</span></font></li>
 <li style="color: navy;"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-US">if you do not have NAT between client and server you do not need force_rport,
     and try to avoid any nat_uac_test, etc if you are actually working on
     private ips without nat</span></font></li>
 <li style="color: navy;"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-US">you MUST enable proxy also for reply</span></font></li>
</ol>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">route[x] {</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">…..</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">force_rtp_proxy();</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">t_on_reply(&quot;1&quot;);</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">rewritehostport("x.x.x.x:5060&quot;);</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">if (!t_relay()) {</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sl_reply_error();</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">};</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">}</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">onreply_route[1] {</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if
(!(status=~&quot;183&quot; || status=~&quot;200&quot;))</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy(&quot;&quot;);</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">}</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN-US">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;" lang="EN-US">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="EN-US">

<a href="mailto:users-bounces@openser.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users-bounces@openser.org</a> [mailto:<a href="mailto:users-bounces@openser.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
users-bounces@openser.org</a>] <b><span style="font-weight: bold;">On Behalf Of </span></b>Script Head<br>
<b><span style="font-weight: bold;">Sent:</span></b> Wednesday, March 08, 2006
6:29 PM<br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:users@openser.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users@openser.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> [Users] forcing rtpproxy
on a call</span></font><span lang="EN-US"></span></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"></span></font></p></div><font face="Times New Roman" size="3"></font><div style="direction: ltr;"><span class="q"><font face="Times New Roman" size="3">
Hello everyone,<br>
<br>
I am trying to debug why my rtpproxy isn't working. I have the following setup,
on my LAN. <br>
<br></font></span></div><div style="direction: ltr;">
<font face="Times New Roman" size="3">softphone (<a href="http://192.168.1.100" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.100</a>) -&gt;
openser/rtpproxy (<a href="http://192.168.1.10" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 192.168.1.10</a>) -&gt;
asterisk (<a href="http://192.168.1.12" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.12</a>)</font></div><div style="direction: ltr;"><span class="q"><font face="Times New Roman" size="3">
<br>
<br>
The rtpproxy is running and I see commands flying thru it.<br>
<br>
the following route works<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(method==&quot;INVITE&quot;) { <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if(uri=~&quot;^sip:[0-9]{6}1[0-9]*{10}@&quot;) {<br></font></span></div><div style="direction: ltr;">
<font face="Times New Roman" size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
forward(<a href="http://192.168.1.12" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.12</a>,5060);</font></div><font face="Times New Roman" size="3"></font><div style="direction: ltr;"><span class="q">
<font face="Times New Roman" size="3"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
};<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
<br>
when I replace it with this route <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(method==&quot;INVITE&quot;) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if(uri=~&quot;^sip:[0-9]{6}1[0-9]*{10}@&quot;) {<br></font></span></div><div style="direction: ltr;">
<font face="Times New Roman" size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
forward(<a href="http://192.168.1.12" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.12</a>,5060);</font></div><div style="direction: ltr;"><span class="q"><font face="Times New Roman" size="3">
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
force_rport();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
<br>
I get dead air while asterisk logs show that my test message is playing. How
should I proceed to debug this?<br>
<br>
ScriptHead</font></span></div><div style="direction: ltr;"><p></p>

</div>





</div></blockquote></div><br>