On 22 April 2020 20:34:21 "Joshua C. Colp" <jc...@sangoma.com> wrote:
On Wed, Apr 22, 2020 at 4:24 PM Roger James <ro...@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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
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.
Roger
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev