Hi – sent this earlier but realized that didn’t send it from the mail address associated with my user.
Sorry about that. Trying again ![]()
I have now for 3 days in a row experienced that a SIP trunk is deemed unreachable due to a DNS lookup failure.
Happens every time when trying to send OPTIONS request. Qualify frequency is set to 60 seconds.
The customer is using TLS.
The log outputs this:
res_pjsip.c: Error 320047 ‘No answer record in the DNS response (PJLIB_UTIL_EDNSNOANSWERREC)’ sending OPTIONS request to endpoint [name of endpoint]
Restarting Asterisk makes it work again – using core restart now. No change to the machine running Asterisk.
Do you know any possible reasons for this?
Asterisk is running in Azure and network glitches can happen, but it seems that once a DNS lookup fails, all subsequent lookups fail as well, and it and never recovers until Asterisk is restarted.
I have for now set outbound_proxy for the endpoint to the IP behind the AOR contact.
Would that make Asterisk survive another DNS lookup failure, so the OPTIONS requests can be sent?
Is there another thing I can do to reset the DNS lookup somehow without having to restart the entire Asterisk?
Simple core reload does not change anything.
This is the transport and the SIP trunk configuration from pjsip.conf
[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5143
tos=cs3
cos=3
allow_reload=false
method=tlsv1_2
external_media_address=20.8.xxx.xx
external_signaling_address=20.8.xxx.xx
local_net=10.0.0.0/8
local_net=172.16.0.0/12
local_net=172.18.0.0/12
local_net=172.19.0.0/12
local_net=192.168.0.0/16
external_signaling_port=5143
cert_file=/var/lib/asterisk/certs/novus.crt
priv_key_file=/var/lib/asterisk/certs/novus.key
[trunk1]
type=aor
contact=sip:[hostname]:5061
qualify_frequency=60
[trunk1]
type=endpoint
transport=transport-tls
media_encryption=sdes
outbound_proxy=sip:77.234.xxx.xx:5061;transport=tls;lr
force_rport=yes
rewrite_contact=no
disallow=all
allow=alaw
allow=ulaw
user_eq_phone=yes
dtmf_mode=rfc4733
connected_line_method=invite
direct_media_method=invite
direct_media=no
trust_id_inbound=yes
trust_id_outbound=yes
100rel=no
context=from_trunk1
tos_audio=ef
cos_audio=5
timers=yes
timers_min_se=90
timers_sess_expires=1800
auth=
aors=trunk1
[trunk1]
type=identify
endpoint=trunk1
match=77.234.xxx.xx
Kind regards
Morten Sølvberg
+4524240113