Hi everyone, I would like to have a suggestion from the community about what I am seeing on my Asterisk 22.1.0
It’s very likely that I’m missing something in my configuration.
I’m using realtime (for architectural constraints) with postgresql. The issue that I’m having is the following:
When I create a new endpoint (and the corresponding aor and auth) while asterisk is running, its status remain “Unavailable" after a successful REGISTER, even though the Contact is updated and can be Dialed inside the dialplan successfully. If I reload asterisk, the endpoint behaves as expected, correctly updating the endpoint status. I want to point out that also from the ARI/endpoints the status remains “offline”, and no AMI events of type “PeerStatus“,”DeviceStatus” and “DeviceStateChange“ are generated.
sorcery.conf
[res_pjsip]
endpoint=realtime,ps_endpoints
endpoint=config,pjsip.conf,criteria=type=endpoint
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact=realtime,ps_contacts
[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips
[res_pjsip_pubsub]
resource_list=realtime,ps_resource_list
[res_pjsip_outbound_registration]
registration=realtime,ps_registrations
endpoint configuration:
100rel : yes
accept_multiple_sdp_answers : false
accountcode :
acl :
aggregate_mwi : true
allow : (ulaw)
allow_overlap : true
allow_subscribe : true
allow_transfer : true
allow_unauthenticated_options : false
aors : 10100108
asymmetric_rtp_codec : false
auth : 10100108
bind_rtp_to_media_address : false
bundle : false
call_group :
callerid : 10100108
callerid_privacy : allowed_not_screened
callerid_tag :
codec_prefs_incoming_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_incoming_offer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_offer : prefer:pending, operation:union, keep:all, transcode:allow
connected_line_method : invite
contact_acl :
context : sip-context
cos_audio : 0
cos_video : 0
device_state_busy_at : 0
direct_media : false
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false
dtls_auto_generate_cert : No
dtls_ca_file :
dtls_ca_path :
dtls_cert_file :
dtls_cipher :
dtls_fingerprint : SHA-256
dtls_private_key :
dtls_rekey : 0
dtls_setup : active
dtls_verify : No
dtmf_mode : rfc4733
fax_detect : false
fax_detect_timeout : 0
follow_early_media_fork : true
force_avp : false
force_rport : true
from_domain :
from_user :
g726_non_standard : false
geoloc_incoming_call_profile :
geoloc_outgoing_call_profile :
ice_support : false
identify_by : username,ip
ignore_183_without_sdp : false
inband_progress : false
incoming_call_offer_pref : local
incoming_mwi_mailbox :
language :
mailboxes :
max_audio_streams : 1
max_video_streams : 1
media_address :
media_encryption : no
media_encryption_optimistic : false
media_use_received_transport : false
message_context :
moh_passthrough : false
moh_suggest : default
mwi_from_user :
mwi_subscribe_replaces_unsolicited : no
named_call_group :
named_pickup_group :
notify_early_inuse_ringing : false
one_touch_recording : false
outbound_auth :
outbound_proxy :
outgoing_call_offer_pref : remote_merge
overlap_context :
pickup_group :
preferred_codec_only : false
record_off_feature : automixmon
record_on_feature : automixmon
refer_blind_progress : true
rewrite_contact : false
rpid_immediate : false
rtcp_mux : false
rtp_engine : asterisk
rtp_ipv6 : false
rtp_keepalive : 0
rtp_symmetric : false
rtp_timeout : 0
rtp_timeout_hold : 0
sdp_owner : -
sdp_session : Asterisk
security_negotiation : no
send_aoc : false
send_connected_line : yes
send_diversion : true
send_history_info : false
send_pai : false
send_rpid : false
set_var :
srtp_tag_32 : false
stir_shaken : no
stir_shaken_profile :
sub_min_expiry : 0
subscribe_context :
suppress_moh_on_sendonly : false
suppress_q850_reason_headers : false
t38_bind_udptl_to_media_address : false
t38_udptl : false
t38_udptl_ec : none
t38_udptl_ipv6 : false
t38_udptl_maxdatagram : 0
t38_udptl_nat : false
tenantid :
timers : yes
timers_min_se : 90
timers_sess_expires : 1800
tone_zone :
tos_audio : 0
tos_video : 0
transport : transport-udp
trust_connected_line : yes
trust_id_inbound : false
trust_id_outbound : false
use_avpf : false
use_ptime : false
user_eq_phone : false
voicemail_extension :
webrtc : no
aor configuration
authenticate_qualify : false
contact : sip:10100108@192.168.9.165:5060
default_expiration : 60
mailboxes :
max_contacts : 1
maximum_expiration : 60
minimum_expiration : 60
outbound_proxy :
qualify_frequency : 0
qualify_timeout : 3.000000
remove_existing : true
remove_unavailable : false
support_path : false
voicemail_extension :
Here are the logs that I collected (level 15) during the endpoint REGISTER where the endpoint configuration already exists while reloading asterisk: (Starting from the auth challenge):
endpoint_already_present.txt (19.0 KB)
The exact same endpoint configuration created on the DB while asterisk is already running:
endpoint_created_at_runtime.txt (13.9 KB)
From a first glance analysis There is an entire section of res_pjsip/pjsip_options.c that is missing. I can’t understand why, but after a core reload, the behaviour is as expected.
I tried to use authenticate_qualify=true in the AOR, without effect.
Thank you in advance for your time.