<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Ihor,<br>
<br>
So, you say OpenSIPS picks the IPv6 address as destination
(confirmed by the err log), but you are not sure what interface is
to be used (even if you forced the ipv4 one, it may be discarded by
the internal fwd logic).<br>
<br>
Could you provide debug level logs for the relaying part ?<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 10.12.2025 17:58, Ihor Olkhovskyi
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJTkRNt8iYZhAUWoy77b905bAC65R2OxLYcyBiG1iquCnX1b1g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hello!</div>
<div><br>
</div>
<div>I'm trying to build ipv4/ipv6 bridge with OpenSIPS 3.6.2.</div>
<div>I've declared the sockets like this:</div>
<div><span style="font-family:monospace"><br>
</span></div>
<div><span style="font-family:monospace"># v4 addresses<br>
socket=tls:OPENSIPS_IPV4_ADDR:TLS_PORT<br>
socket=wss:OPENSIPS_IPV4_ADDR:WSS_PORT<br>
# v6 addresses<br>
socket=tls:[OPENSIPS_IPV6_ADDR]:TLS_PORT<br>
socket=wss:[OPENSIPS_IPV6_ADDR]:WSS_PORT<br>
dns_try_ipv6=yes<br>
# Always listen on localhost v4<br>
socket=tls:127.0.0.1:TLS_PORT</span></div>
<div><br>
</div>
<div>Means explicit to start on v4 and v6 addresses for lately
to change address family explicitly</div>
<div><br>
</div>
<div>OpenSIPS starts without any issues, but when I try to do
socket forcing with</div>
<div><br>
</div>
<div><span style="font-family:monospace">$socket_out =
"wss:OPENSIPS_IPV4_ADDR:WSS_PORT";</span></div>
<div><span style="font-family:monospace">t_relay();</span></div>
<div><br>
</div>
<div>I'm getting</div>
<div><br>
</div>
<div><span style="font-family:monospace">ERROR:proto_<a class="moz-txt-link-freetext" href="wss:ws_sync_connect">wss:ws_sync_connect</a>:
bind failed (22) Invalid argument<br>
ERROR:proto_<a class="moz-txt-link-freetext" href="wss:ws_connect">wss:ws_connect</a>: connect failed<br>
ERROR:proto_<a class="moz-txt-link-freetext" href="wss:proto_wss_send">wss:proto_wss_send</a>: connect failed</span></div>
<div><span style="font-family:monospace">tm:msg_send: send() to
EXTERNAL_IPV6(sic!) for proto wss/6 failed<br>
tm:t_forward_nonack: sending request failed</span></div>
<div><br>
</div>
<div>So OpenSIPS is trying to send over IPv6. I guess that is
cause network address of RURI is v6 already, but DNS answers
in dual-stack. If I remove `<span
style="font-family:monospace">dns_try_ipv6</span>` it works,
but how than I should work with v6?</div>
<div><br>
</div>
<div>What am I missing?</div>
<div><br>
</div>
<div>Thanks in advance!</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">Best regards,
<div>Ihor (Igor)<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>