Asterisk TLS configuration Issue

HI,
I am using Asterisk 13 am trying to configure TLS in my asterisk I am configuring from one asterisk and trying to connect to other asterisk[domainname.com] .I generated self-signed certificate .The following are the configuration am using

[general]
tlsenable=yes
tlsbindaddr=0.0.0.0:5061
register =>tls://7001:pass@domainname.com:5061

tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscafile=/etc/asterisk/keys/ca.crt
tlsdontverifyserver=yes
transport=tls
tlscipher=ALL
tlsclientmethod=tlsv1

[7001]
type=peer
context=default
fromuser=7001
secret=pass
host=domainname.com
port=5061
qualify=yes
username=7001
secret=pass123

I couldnt able to register peer[7001] with other asterisk ,it remains unreachable,Its not getting connected to other asterisk

What is the error message?

Note that Asterisk 13 only receives fixes for security vulnerabilities, and chan_sip is community supported and is disabled in the latest version, by default - in practice it is unsupported.

Thanks for your reply!
'I have tried the same in asterisk 16 am facing the same issue .Do I need to map the host asterisk certificate file here ? in configurations

This is the error message which I am getting

ERROR[27903]: tcptls.c:1139 ast_tcptls_client_start: Unable to connect SIP socket to “domainname.com

That sounds like a basic TCP error, not a TLS one.

It works with tcp and udp transport but when it comes to TLS its not getting connected

I assume that is because there is nothing listening on 5061, so the underlying TCP connection fails to establish.

Thanks for the info ,let me check that .I have one more doubt Do I need to map the host asterisk certificate file here in configurations?

HI,

I tried connecting my asterisk to other asterisk(domainname.com) am facing the following issue

ERROR[30285]: tcptls.c:753 handle_tcptls_connection: Problem setting up ssl connection with peer ‘13.234.186.81:5060’: error:00000005:lib(0):func(0):DH lib, System call EOF
WARNING[30285]: tcptls.c:845 handle_tcptls_connection: FILE * open failed from peer ‘domainname.com:5060’!

can you help me in resolving this?

Error 5 seems to be an I/O error. I would guess the other side reset the connection.