My server has been up and running for the past year without any issues and it is configured to use both IPv4 and IPv6 but I’m struggling to set up several trunks over IPv6 and hoping someone here will help point me in the right direction…
First, a little info about my server:
It’s a cloud-based VPS running Debian with the following FreePBX/Asterisk versions installed:
- FreePBX 18.104.22.168
- Asterisk Version 16.2.1
We use CHAN_PJSIP and we have the following extensions setup:
200, 201, 203, 204, 205, 206, 207, 208, 209, 210
Every extension except 203 utilises TLS over port 5061 with call encryption enabled. Extension 203 connects via IPv6 and utilises UDP over port 5060. Extensions work just fine, no issues there.
We have five trunks all setup, working and they register over IPv4, UDP and use port 5060.
Our pjsip.transports_custom file contains the following:
[ipv6-udp] type=transport protocol=udp bind=[::]:5060 allow_reload=no tos=cs3 cos=3 [ipv6-tls] type=transport protocol=tls bind=[::]:5061 ca_list_file=/etc/ssl/certs/ca-certificates.crt cert_file=/etc/asterisk/keys/domain.pem priv_key_file=/etc/asterisk/keys/domain.key method=tlsv1_2 verify_client=no verify_server=yes allow_reload=no tos=cs3 cos=3
Our pjsip.endpoint_custom_post file contains the following:
If we change the pjsip.endpoint_custom_post file to the following:
(+) transport=ipv6-udp [TRUNKNAME](+) transport=ipv6-udp
The trunk TRUNKNAME fails to register. There is nothing in the log, it’s as if it’s not trying to register at all.
If we ping the SIP Server from our FreePBX server, we get a successful IPv6 result:
PING domain(domain (2001:8b0:0:30::5060:1)) 56 data bytes
Our pjsip show transports result is:
Transport: 0.0.0.0-tls tls 3 96 0.0.0.0:5061
Transport: 0.0.0.0-udp udp 3 96 0.0.0.0:5060
Transport: ipv6-tls tls 3 96 [::]:5061
Transport: ipv6-udp udp 3 96 [::]:5060
Extension 203 works just fine over IPv6 but no trunk will register if configured to use IPv6. I will try and grab some more data using tcpdump and pjsip set logger on but so far, am I missing something obvious?