<div dir="ltr"><div>I just tried to modify my onreply route with remove/append hf, it didn&#39;t help. The call is now hanging on &#39;connecting&#39; state in alex softphone and the media channel is not established . And bob get&#39;s the same timed out eror.<br><br></div><div>here is route:<br><br>onreply_route[handle_nat] {<br>        remove_hf(&quot;Contact:&quot;);<br>        append_hf(&quot;Contact: &lt;bob@xx.xx.xx.xx:5061&gt;;transport=tls&gt;\r\n&quot;);<br>        if (nat_uac_test(&quot;1&quot;))<br>                fix_nated_contact();<br>        if ( isflagset(NAT) )<br>                rtpproxy_answer(&quot;ro&quot;);<br>        xlog(&quot;incoming reply\n&quot;);<br>}<br><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-14 6:58 GMT+02:00 John Mathew <span dir="ltr">&lt;<a href="mailto:john.mathew@divoxmedia.com" target="_blank">john.mathew@divoxmedia.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Semen,<br><br></div>After looking into the issue, i think you are not using TLS transport in your onreply_route function. On reply function still sending messages to alex on udp, which is been rejected by alex and waiting for reply on tls. Here alex is missing 200Ok.<br><br></div>You have to make sure you are sending the right contact header to the A-Party with transport=tls.<br><br></div>Try rewriting your contact header from bob by<br>remove_hf(&quot;Contact:&quot;);<br>append_hf(&quot;Contact: &lt;bob@opensipsIP:port&gt;;transport=tls&gt;\r\n&quot;);<br><br><br><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Sat, Feb 14, 2015 at 9:37 AM, Semen Golubcov <span dir="ltr">&lt;<a href="mailto:thegolub4@gmail.com" target="_blank">thegolub4@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hello. Here is the result of the ifconfig eth0 | grep &#39;inet&#39;:<br><br>inet addr:190.32.5.8  Bcast:190.32.5.255  Mask:255.255.255.0<br>inet6 addr: (my_ipv6):5990/64 Scope:Link<br><br></div>My server is basically a virtual dedicated server, i think you are right about my network scenario.<br></div>I looked up the patch, and re-checked the rtpproxy source from git, it loooks like it is ok with supporting -A option. I ran the proxy like so:<br><br>sudo rtpproxy -d DBUG:LOG_LOCAL5 -f -s udp:localhost:12221 -u rtpproxy:rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -A 185.48.5.9 -m 16384 -M 32768<br><br></div>And the same problem still remains, here is the debug output:<br><div><br>DBUG:get_command:GLOBAL: received command &quot;3165_12 Lc113,101 b45b04f432f140b1bca5bf048d035871 10.10.10.108 50937 6217f250d0f8490f9cbe4b37059cf82a;1 89c29c90c08940d8b7e155978a1d0fbb;1&quot;<br>INFO:rtpp_command_ul_handle:b45b04f432f140b1bca5bf048d035871: lookup on ports 26094/21578, session timer restarted<br>INFO:rtpp_command_ul_handle:b45b04f432f140b1bca5bf048d035871: pre-filling callee&#39;s address with <a href="http://10.10.10.108:50937" target="_blank">10.10.10.108:50937</a><br>DBUG:rtpc_doreply:GLOBAL: sending reply &quot;21578<br>&quot;<br>INFO:rxmit_packets:b45b04f432f140b1bca5bf048d035871: callee&#39;s address filled in: 152.xx.xx.xx:50937 (RTP)<br>INFO:rxmit_packets:b45b04f432f140b1bca5bf048d035871: guessing RTCP port for callee to be 50938<br>INFO:rxmit_packets:b45b04f432f140b1bca5bf048d035871: callee&#39;s address filled in: 152.xx.xx.xx:50941 (RTCP)<br>INFO:rxmit_packets:b45b04f432f140b1bca5bf048d035871: caller&#39;s address filled in: 152.xx.xx.xx:50921 (RTP)<br>INFO:rxmit_packets:b45b04f432f140b1bca5bf048d035871: guessing RTCP port for caller to be 50922<br>INFO:rxmit_packets:b45b04f432f140b1bca5bf048d035871: caller&#39;s address filled in: 152.xx.xx.xx:50925 (RTCP)<br>INFO:process_rtp:4758975202dd42c194b3ece85af6feea: session timeout<br>INFO:remove_session:4758975202dd42c194b3ece85af6feea: RTP stats: 250 in from callee, 241 in from caller, 491 relayed, 0 dropped<br>INFO:remove_session:4758975202dd42c194b3ece85af6feea: RTCP stats: 4 in from callee, 5 in from caller, 9 relayed, 0 dropped<br>INFO:remove_session:4758975202dd42c194b3ece85af6feea: session on ports 22646/17854 is cleaned up<br><br></div><div>I guess now that it&#39;s some sort of ACK packet issue on opensips side ( only using tls , using the udp,tcp evrything works fine).<br></div><div><div><div><div><div><br><div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-14 4:38 GMT+02:00 Babil <span dir="ltr">&lt;<a href="mailto:gsbabil@gmail.com" target="_blank">gsbabil@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Semen,<br>
what is your network configuration? If the RTP-Proxy machine is an<br>
Amazon EC-2 (or alike) instance where an &quot;elastic&quot; public IP is attached<br>
to the Ethernet interface which has a different internal DHCP provided<br>
address (or you have a port-forwarding scenario), you&#39;d need to use a<br>
patched version of RTP-Proxy.<br>
<br>
The RTP-Proxy patch, as shown here [0], will allow you to have an<br>
additional &#39;-A&#39; option to modify the advertised IP address (external<br>
publicly visible IP address) by RTP-Proxy which should resolve the<br>
timeout issues you are experiencing. This version [1] on Github also<br>
seems to have the patch integrated. You&#39;ll find a longer discussion on<br>
the RTP-Proxy and NAT problem here [2].<br>
<br>
Hope this helps. Good luck.<br>
<br>
P.S.<br>
In order to check your network address dissimilarities, you may try the<br>
following commands. I&#39;m considering your external interface is `eth0`:<br>
<br>
```<br>
ifconfig eth0 | grep &#39;inet&#39;<br>
## or,<br>
#ip addr show dev eth0 | grep &#39;inet&#39;<br>
## followed by<br>
curl &#39;<a href="http://ipinfo.io/ip" target="_blank">ipinfo.io/ip</a>&#39;<br>
```<br>
<br>
You may run RTP-Proxy as:<br>
<br>
```<br>
sudo rtpproxy -d DBUG:LOG_LOCAL5 -f -s udp:<a href="http://127.0.0.1:12221" target="_blank">127.0.0.1:12221</a> -u<br>
rtpproxy:rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -A 54.111.222.123 -l<br>
10.0.0.2 -m 16384 -M 32768<br>
```<br>
<br>
[0] <a href="http://bit.ly/1KUS9bx" target="_blank">http://bit.ly/1KUS9bx</a><br>
[1] <a href="https://github.com/sippy/rtpproxy" target="_blank">https://github.com/sippy/rtpproxy</a><br>
[2] <a href="http://bit.ly/1CpQXe9" target="_blank">http://bit.ly/1CpQXe9</a><span><br>
<br>
</span><span><font color="#888888">--<br>
Regards,<br>
Babil (Golam Sarwar)<br>
<br>
PGP Key Fingerprint : D3A1 EED0 5BA0 72D3 A011 75CB 8EA6 7D99 F433 E92D<br>
PGP Key Download URL: <a href="http://bit.ly/gsbabil-pgp-key" target="_blank">http://bit.ly/gsbabil-pgp-key</a></font></span></div><div class="gmail_extra"><br clear="all"><div><div>Regards,<br>Babil (Golam Sarwar)<br><br>PGP Key Fingerprint : D3A1 EED0 5BA0 72D3 A011 75CB 8EA6 7D99 F433 E92D<br>PGP Key Download URL: <a href="http://bit.ly/gsbabil-pgp-key" target="_blank">http://bit.ly/gsbabil-pgp-key</a></div></div>
<br><div class="gmail_quote"><div><div>On Fri, Feb 13, 2015 at 10:27 AM, Semen Golubcov <span dir="ltr">&lt;<a href="mailto:thegolub4@gmail.com" target="_blank">thegolub4@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr">Hello! I&#39;m using the latest opensips with latest rtpproxy :<br><br>Basic version: 20040107<br>Extension 20050322: Support for multiple RTP streams and MOH<br>Extension 20060704: Support for extra parameter in the V command<br>Extension 20071116: Support for RTP re-packetization<br>Extension 20071218: Support for forking (copying) RTP stream<br>Extension 20080403: Support for RTP statistics querying<br>Extension 20081102: Support for setting codecs in the update/lookup command<br>Extension 20081224: Support for session timeout notifications<br>Extension 20090810: Support for automatic bridging<br><br>i
 did setup the secure tls connection between clients in the opensips, it
 uses the client certificate verification. But the interaction with rtpproxy is getting messed up somehow. I&#39;m
 using the blink softphone to test on. So i have 2 accounts: bob and 
alex. When i do <b>call</b> <b>bob</b> <b>from</b> <b>alex</b> i get this kind of behaviour in the <b>bob&#39;s softphone</b>:<br><img src="cid:ii_i63wh3hr0_14b842b40226eeab" height="37" width="404"><br>​So it hangs on &quot;starting media&quot;, but in the same time the actual 
connection is established, me and my partner can hear each other and we 
can talk perfectly, so i assume the actual stream is allright. It hangs 
for exactly 15 seconds then we get:<br><img src="cid:ii_i63wj7qq1_14b842cc331ba96a" height="23" width="404"><br>​<br><p style="text-align:left;clear:both"><b>&quot;media stream timed out while starting&quot; in the bob&#39;s softphone</b>.</p><p style="text-align:left;clear:both"> <b>On the alex softphone side</b>:</p><p style="text-align:left;clear:both"><img src="cid:ii_i63wk7972_14b842d76c419fe7" height="26" width="404"><br>​<br></p><p style="text-align:left;clear:both"> &quot;call ended by remote&quot;. <br></p><p style="text-align:left;clear:both">The
 icon indicating that rtp stream is encrypted is not shown on bob&#39;s side, 
but the stream is working. I tried to disable tls, and use plain tcp, 
and it&#39;s working fine without tls, call is not getting stuck and automatically terminate. <br></p><p style="text-align:left;clear:both">My rtpproxy is running like so:</p><p style="text-align:left;clear:both">rtpproxy -u rtpproxy -s udp:localhost:12221</p><p style="text-align:left;clear:both">And my opensips config is generated by osipconfig utility (i didn&#39;t modify the routes at all)  see attached opensips.cfg<br></p><p style="text-align:left;clear:both">I looked up the syslog for rtpproxy entries, apparently there is no entries from rtpproxy or opensips with any error, other than</p><p style="text-align:left;clear:both">Feb 13 04:00:24 user /usr/local/sbin/opensips[17535]: ERROR:rtpproxy:force_rtp_proxy: Unable to parse body</p><p style="text-align:left;clear:both">Feb 13 04:00:22 user /usr/local/sbin/opensips[17535]: DBG:tm:matching_3261: RFC3261 transaction matching failed<br></p>
 I hope someone can help me to solve this problem, i&#39;am hanging on this 
for  a week. If necessary i can post the syslog and blink softphone sip traces, of our test conversation. Maybe the problem is with ACK? <br></div>
<br></div></div><span>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">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></span></blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">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></blockquote></div><br></div></div></div></div></div></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">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></blockquote></div><br><br clear="all"><br></div></div><span class="">-- <br><div><div dir="ltr"><div><span style="color:rgb(102,102,102)"><br>Regards,</span></div>
<div><span style="color:rgb(102,102,102)">John Mathew</span></div>
<div><span style="color:rgb(102,102,102)">CEO/Director</span><br><span style="color:rgb(255,102,0)">Divox</span> <span style="color:rgb(102,102,102)">International Inc.</span><br><font color="#666666">Contact: <a href="tel:%2B91-9037100001" value="+919037100001" target="_blank">+91-9037100001</a><br>Email/MSN: <a href="mailto:John.Mathew@divoxmedia.com" target="_blank">John.Mathew@divoxmedia.com</a><br>WEB: <a href="http://www.divoxmedia.com/" target="_blank">www.divoxmedia.com</a><br></font><span style="color:rgb(102,102,102)"></span><br></div>
<div><font color="#666666"><span></span><span></span></font><br style="color:rgb(255,153,0)"><font style="color:rgb(255,153,0)" size="6"><br></font></div>
<div style="display:inline"></div><div style="display:inline"></div><div style="display:inline"></div><div style="display:inline"></div><div style="display:inline"></div><div></div></div></div>
</span></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" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div>