<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div dir="auto">
<div dir="auto"><br></div><div dir='auto'><br></div>
<div id="aqm-original" style="color: black;">
<!-- body start -->
<div class="aqm-original-body">
<div style="color: black;">
<p style="color: black; font-size: 10pt; font-family: sans-serif; margin: 8pt 0;">On 22 April 2020 20:34:21 "Joshua C. Colp" <jcolp@sangoma.com> wrote:</p>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="ltr"><div dir="ltr">On Wed, Apr 22, 2020 at 4:24 PM Roger James <<a href="mailto:roger@beardandsandals.co.uk">roger@beardandsandals.co.uk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

<div>
<div dir="auto">
Hi,<div dir="auto"><br></div><div dir="auto">A very long time since I Iast posted on here. I have recently moved to Asterisk 16 and have encountered a problem trying to connect via ipv6-udp transports. Looking at the traffic it seems that Asterisk only ever queries for DNS A records. Stepping through sip_resolve in pjsip_resolve.c I get to line 592. The code looks like this. I apologise for the formatting. I cannot work out how to get this mail client to do preformatted text.</div><div dir="auto"><p dir="ltr">if ((type == PJSIP_TRANSPORT_UNSPECIFIED && sip_transport_is_available(PJSIP_TRANSPORT_UDP6)) ||<br>
                sip_transport_is_available(type + PJSIP_TRANSPORT_IPV6)) {<br>
                res |= sip_resolve_add(resolve, host, T_AAAA, C_IN, (type == PJSIP_TRANSPORT_UNSPECIFIED ? PJSIP_TRANSPORT_UDP6 : type + PJSIP_TRANSPORT_IPV6), target->addr.port);<br>
        }<br></p></div><div dir="auto">At this point only a A type record query has been added. The transport type is already set to PJSIP_TRANSPORT_UDP6. So adding PJSIP_TRANSPORT_IPV6 to it results in a nonsense transport type. As PJSIP_TRANSPORT_IPV6 is 128 surely it would be better if this was a bitwise OR instead of an ADD.</div><div dir="auto"><br></div><div dir="auto">What am I missing here?<br></div></div></div></blockquote><div><br></div><div>You're not missing anything. There is an existing JIRA issue[1] for this. It requires an explicit transport which most people do not set, and noone has taken a fix for it through code review to inclusion as of yet.</div></div><div><br></div>[1] <a href="https://issues.asterisk.org/jira/browse/ASTERISK-26780">https://issues.asterisk.org/jira/browse/ASTERISK-26780</a><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><span style="color: #073763;">Joshua C. Colp</span></div><div style="font-family:tahoma,sans-serif"><span style="color: #073763;">Asterisk Technical Lead</span></div><div style="font-family:tahoma,sans-serif"><span style="color: #073763;">Sangoma Technologies</span></div><div style="font-family:tahoma,sans-serif"><span style="color: #073763;">Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></span><br></div></div></div></div></div></div></div></div></div></div></div>

<div>-- </div>
<div>_____________________________________________________________________</div>
<div>-- Bandwidth and Colocation Provided by <a class="aqm-autolink aqm-autowrap" href="http://www.api-digital.com">http://www.api-digital.com</a> --</div>
<div><br></div>
<div>asterisk-dev mailing list</div>
<div>To UNSUBSCRIBE or update options visit:</div>
<div>   <a class="aqm-autolink aqm-autowrap" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div>
</blockquote>
</div>
</div>
<!-- body end -->

</div><div dir="auto">Thanks for the quick response. The explicit transport setting in the conf is result of a dirty hack I did to get ipv6 working in a Freepbx system a few years ago (Asterisk 13 I think). I will remove it and see if I can make progress that way. If I get time I will have a look at the suggested fix for handling situations when no srv records etc. are provided(that is what I am hitting). If that works I will submit a patch for review.</div><div dir="auto"><br></div><div dir="auto">Roger</div>
</div></body>
</html>