[asterisk-dev] pjsip_resolve not querying for ipv6 addresses

Joshua C. Colp jcolp at sangoma.com
Wed Apr 22 14:33:25 CDT 2020


On Wed, Apr 22, 2020 at 4:24 PM Roger James <roger at beardandsandals.co.uk>
wrote:

> Hi,
>
> 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.
>
> if ((type == PJSIP_TRANSPORT_UNSPECIFIED &&
> sip_transport_is_available(PJSIP_TRANSPORT_UDP6)) ||
> sip_transport_is_available(type + PJSIP_TRANSPORT_IPV6)) {
> res |= sip_resolve_add(resolve, host, T_AAAA, C_IN, (type ==
> PJSIP_TRANSPORT_UNSPECIFIED ? PJSIP_TRANSPORT_UDP6 : type +
> PJSIP_TRANSPORT_IPV6), target->addr.port);
> }
> 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.
>
> What am I missing here?
>

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.

[1] https://issues.asterisk.org/jira/browse/ASTERISK-26780

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200422/ed0d43b7/attachment.html>


More information about the asterisk-dev mailing list