example_1 can authenticate with no problems even without a type = identify definition. example_2 cannot. Without the type = identify for it, trying to REGISTER fails with:
[May 28 12:29:41] WARNING[21265]: res_pjsip_registrar.c:1080 find_registrar_aor: AOR 'example_2' not found for endpoint 'example_2'
Why the difference in how these two endpoints are being handled?
As well, that identify is incomplete. It won’t actually match anything because an identify matches based on IP address or header. I’d also advise looking at the console when PJSIP loads to see if there’s any configuration issues.
Have you examined things as I said when PJSIP loads or looked at the CLI commands that inspect what is loaded to confirm your assumptions about configuration?
Reloading PJSIP wouldn’t result in such a thing anyway, because things only reload if they change so you’d have to do extra work to make them happen.
I don’t have anything in particular - but if there are configuration errors or issues then they will be output when PJSIP loads. As it is, the message means that it believes there is no AOR named “example_2” configured.
I’m telling you that that’s what happens. pjsip reload → crash. Have to restart Asterisk. That aside:
I was able to do:
server*CLI> module unload app_voicemail_imap.so
Unloaded app_voicemail_imap.so
Unloading app_voicemail_imap.so
== Unregistered application 'VoiceMail'
== Unregistered application 'VoiceMailMain'
== Unregistered application 'VMAuthenticate'
== Unregistered application 'VoiceMailPlayMsg'
== Unregistered application 'VMSayName'
== Unregistered custom function VM_INFO
== Manager unregistered action VoicemailUsersList
== Manager unregistered action VoicemailUserStatus
== Manager unregistered action VoicemailRefresh
server*CLI> pjsip reload
Module 'res_pjsip.so' reloaded successfully.
Module 'res_pjsip_authenticator_digest.so' reloaded successfully.
Module 'res_pjsip_endpoint_identifier_ip.so' reloaded successfully.
Module 'res_pjsip_mwi.so' reloaded successfully.
Module 'res_pjsip_notify.so' reloaded successfully.
Module 'res_pjsip_outbound_publish.so' reloaded successfully.
Module 'res_pjsip_publish_asterisk.so' reloaded successfully.
Module 'res_pjsip_outbound_registration.so' reloaded successfully.
-- Reloading module 'res_pjsip.so' (Basic SIP resource)
[May 28 13:04:22] ERROR[25231]: config_options.c:780 aco_process_var: Could not find option suitable for category 'example_2' named 'debug' at line 1442 of
[May 28 13:04:22] ERROR[25231]: res_sorcery_config.c:418 sorcery_config_internal_load: Could not create an object of type 'aor' with id 'example_2' from configuration file 'pjsip.conf'
which was due to my uncommenting/setting:
debug=[redacted] ; Enable/Disable SIP debug logging. Valid options include yes|no
Without also uncommenting the:
;[global]
above it.
So ultimately your suggestion to look at pjsip reload’s output was very helpful. I would have noticed this a very long time ago if it were not for the pjsip reload crashing Asterisk.
Your help is much appreciated, as always, regardless. Thank you!
I meant reloading PJSIP wouldn’t result in PJSIP reloading unless something in the PJSIP configuration changed. It doesn’t needlessly reload if the underlying configuration files are unchanged under normal conditions. If something fails to load for some reason, then it may still try to reload (I forget if I wrote that in or not).