I created a setup on my LAN with that works great and forwards BYE all the way to the soft phone. I verified via tcpdump that RTP is flowing via the proxy. When I move this setup to the public Internet, it works as well, except the BYE isn't getting forwarded. The config file is attached.
<br><br><br><br><div><span class="gmail_quote">On 3/10/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>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Add</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">if
(!method==&quot;REGISTER&quot;) record_route();&nbsp;&nbsp;&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">Somewhere in ur route (before relay but
after loose_route)</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">do u have loose_route anyway
?</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> Thursday, March 09, 2006
6:44 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></span></font></p></div><div style="direction: ltr;">
<span class="q"><font face="Tahoma" size="2"><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Users] forcing
rtpproxy on a call</font></span></div><div style="direction: ltr;"><span lang="EN-US"></span><p></p>

</div>

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

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Now that my rtpproxy
actually passes traffic I stumbled on another problem. When the called party
hangs up the call (asterisk command Hangup()) the soft phone remains connected.
Yet, when I click the Hangup button on the softphone, SER receives BYE
messages. </span></font></p>

</span></div><div style="direction: ltr;"><div>

</div><div style="direction: ltr;"><span class="q"><p><span><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On 3/9/06, <b><span style="font-weight: bold;">Vitaly
Nikolaev</span></b> &lt;<a href="mailto:vnikolaev@intermedia.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vnikolaev@intermedia.net</a>&gt;
wrote:</span></font></span></p>

</span></div><div style="direction: ltr;"><div>

<div></div><div style="direction: ltr;"><span class="q">

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US">Looks like forward includes relay in it. And by
putting force_rtpproxy AFTER forward you does not give it a chance </span></font><font color="navy" face="Wingdings" size="2"><span style="font-size: 10pt; font-family: Wingdings; color: navy;" lang="EN-US">J</span></font>
<font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-US"> on_reply route is also MUST be there.</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>

</span></div><div style="direction: ltr;"><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</span></font></p></div><div style="direction: ltr;"><span class="q"><font face="Tahoma" size="2"><br>
<b><span style="font-weight: bold;">Sent:</span></b> Thursday, March 09, 2006
12:59 PM<br></font></span></div><div style="direction: ltr;">
<font face="Tahoma" size="2"><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></font></div>
<font face="Tahoma" size="2"></font><div style="direction: ltr;"><span class="q"><font face="Tahoma" size="2"><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Users] forcing
rtpproxy on a call</font></span></div><div style="direction: ltr;"><p></p>

</div>

</div>

<div><span>

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

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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</span></font></p>

</span></div><div style="direction: ltr;"><div></div><div style="direction: ltr;"><span class="q">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On
3/9/06, <b><span style="font-weight: bold;">Vitaly Nikolaev</span></b> &lt;<a href="mailto:vnikolaev@intermedia.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vnikolaev@intermedia.net</a>&gt;
wrote:</span></font></p>

</span></div><div style="direction: ltr;"><div>

<div></div><div style="direction: ltr;"><span class="q">

<ol 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(&quot;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>

</span></div><div style="direction: ltr;"><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</span></font></p></div><font face="Tahoma" size="2"></font><div style="direction: ltr;"><span class="q"><font face="Tahoma" size="2"><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</font></span></div><div style="direction: ltr;"><p></p>

</div>

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

</div></div><div style="direction: ltr;"><span class="q">

<div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hello everyone,<br>
<br>
I am trying to debug why my rtpproxy isn't working. I have the following setup,
on my LAN. </span></font></p>

</div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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>)</span></font></p>

</div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><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;) {</span></font></p>

</div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&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);</span></font></p>

</div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><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;) {</span></font></p>

</div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&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);</span></font></p>

</div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><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</span></font></p>

</div>

</span></div><div style="direction: ltr;"></div>

</div>

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

</div>

</div>

</div>



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

</div>





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