<p>I am trying to relay a SUBSCRIBE message onwards to another proxy using the force_send_socket() function to force the use of TLS.</p>
<p>The relay is working as expected, however OpenSIPS is not populating the Record-Route headers correctly on relay. Instead of using the TLS port it is putting the TCP listen port into the Record-Route:</p>
<p>e.g.</p>
<p>OpenSIPS is configured thusly:</p>
<pre><code>listen=udp:1.2.3.4:5060
listen=tcp:1.2.3.4:5060
listen=ws:1.2.3.4:10080
listen=tls:1.2.3.4:5061
</code></pre>
<p>I am using force_send_socket to ensure the relay uses tls:</p>
<pre><code>force_send_socket(tls:1.2.3.4:5061);
</code></pre>
<p>OpenSIPS sends out the request from port 5061(and via TLS) as expected</p>
<pre><code>T 2015/11/04 12:14:30.294673 1.2.3.4:5061 -> 5.6.7.8:41904
</code></pre>
<p>However the Record-Route that OpenSIPS adds is seemingly using the incorrect port, and indeed I see inbound TLS requests to port 5060 afterwards</p>
<pre><code>Record-Route: <sip:1.2.3.4:5060;transport=tls;r2=on;lr;ftag=79mm8laopq>.
</code></pre>
<p>Is this a misunderstanding on my part about how to use force_send_socket, or a potential bug?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/690">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcieaJ4Zv8shncXtRAZxUPY5A1BMUiks5pCeO0gaJpZM4Gbqwr.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/690"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>