PJSIP Endpoints Unavailable

Hello everyone, I am setting up Asterisk for a personal project and I have been stuck on one single issue for two weeks now. For some reason, I cannot get these endpoints to run on my new server. I had another server setup awhile back and it was working fine, but I cannot get these endpoints to register. When I run the command to show endpoints, they show as “unavailable” and of course, they do not work when I try to test them. Any input would be appreciated. If more information or lines from my configuration files is necessary, please let me know.

[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0
local_net=192.168.0.0/16
cert_file=###
priv_key=###

[1000]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw,gsm
auth=auth1000
aors=1000_aor
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
transport=transport-wss

[2000]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw,gsm
auth=auth2000
aors=2000_aor
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
transport=transport-wss

[auth1000]
type=auth
auth_type=userpass
password=pass
username=1000

[auth2000]
type=auth
auth_type=userpass
password=pass
username=2000

[1000_aor]
type=aor
max_contacts=1

[2000_aor]
type=aor
max_contacts=1

[1000_identify]
type=identify
endpoint=1000

[2000_identify]
type=identify
endpoint=2000

Are they actually using a websocket…? What is the setup/arrangement for them? Is the HTTP server set up in http.conf for TLS with certificate?

At that moment, I was trying the websocket route, but I have also tried UDP and TCP without success; same issue. The logs show registration attempts, but nothing else. I have them set to maximum verbosity as well as far as I understand. I set them to level 5.

Other than the Asterisk configuration files and my firewall settings, is there anything else that could be affecting this? I don’t have any software, libraries, or plugins such as fail2ban that would potentially be blocking the connections.

Start with UDP, and then provide the logs to show what is going on. Asterisk console log with “pjsip set logger on”.

Thank you for the quick reply, @jcolp. I appreciate it. I was pretty busy with work, so that delayed my response. Below is a log I just took while trying to run it with a UDP configuration.

[Oct 20 20:28:49] NOTICE[329426] loader.c: 307 modules will be loaded.
[Oct 20 20:28:49] NOTICE[329426] cdr.c: CDR simple logging enabled.
[Oct 20 20:28:49] NOTICE[329426] indications.c: Default country for indication tones: us
[Oct 20 20:28:49] NOTICE[329426] indications.c: Setting default indication country to ‘us’
[Oct 20 20:28:49] DEBUG[329426] res_pjsip/config_transport.c: TCP Keepalive enabled for transport ‘transport-tcp’. Idle Time: 30, Interval: 1, Count: 5
[Oct 20 20:28:49] DEBUG[329426] res_pjsip/config_transport.c: TCP Keepalive enabled for transport ‘transport-tls’. Idle Time: 30, Interval: 1, Count: 5
[Oct 20 20:28:49] WARNING[329426] res_pjsip/config_transport.c: TLS certificate values ignored for websocket transport as they are configured in http.conf
[Oct 20 20:28:49] NOTICE[329426] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Oct 20 20:28:49] WARNING[329426] res_phoneprov.c: Unable to find a valid server address or name.
[Oct 20 20:28:49] ERROR[329426] ari/config.c: No configured users for ARI
[Oct 20 20:28:49] NOTICE[329426] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[Oct 20 20:28:49] NOTICE[329426] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Oct 20 20:28:49] WARNING[329426] loader.c: Some non-required modules failed to load.
[Oct 20 20:28:49] WARNING[329426] loader.c: Module ‘res_adsi’ has been loaded but may be removed in a future release.
[Oct 20 20:28:49] WARNING[329426] loader.c: Module ‘app_getcpeid’ has been loaded but may be removed in a future release.
[Oct 20 20:28:49] WARNING[329426] loader.c: Module ‘app_adsiprog’ has been loaded but may be removed in a future release.
[Oct 20 20:28:49] ERROR[329426] loader.c: cel_sqlite3_custom declined to load.
[Oct 20 20:28:49] ERROR[329426] loader.c: cdr_sqlite3_custom declined to load.

Below is for TLS…

[Oct 20 20:43:40] NOTICE[331085] loader.c: 307 modules will be loaded.
[Oct 20 20:43:40] NOTICE[331085] cdr.c: CDR simple logging enabled.
[Oct 20 20:43:40] NOTICE[331085] indications.c: Default country for indication tones: us
[Oct 20 20:43:40] NOTICE[331085] indications.c: Setting default indication country to ‘us’
[Oct 20 20:43:40] DEBUG[331085] res_pjsip/config_transport.c: TCP Keepalive enabled for transport ‘transport-tcp’. Idle Time: 30, Interval: 1, Count: 5
[Oct 20 20:43:40] DEBUG[331085] res_pjsip/config_transport.c: TCP Keepalive enabled for transport ‘transport-tls’. Idle Time: 30, Interval: 1, Count: 5
[Oct 20 20:43:40] WARNING[331085] res_pjsip/config_transport.c: TLS certificate values ignored for websocket transport as they are configured in http.conf
[Oct 20 20:43:40] NOTICE[331085] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Oct 20 20:43:40] WARNING[331085] res_phoneprov.c: Unable to find a valid server address or name.
[Oct 20 20:43:40] ERROR[331085] ari/config.c: No configured users for ARI
[Oct 20 20:43:40] NOTICE[331085] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[Oct 20 20:43:40] NOTICE[331085] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Oct 20 20:43:40] WARNING[331085] loader.c: Some non-required modules failed to load.
[Oct 20 20:43:40] WARNING[331085] loader.c: Module ‘res_adsi’ has been loaded but may be removed in a future release.
[Oct 20 20:43:40] WARNING[331085] loader.c: Module ‘app_getcpeid’ has been loaded but may be removed in a future release.
[Oct 20 20:43:40] WARNING[331085] loader.c: Module ‘app_adsiprog’ has been loaded but may be removed in a future release.
[Oct 20 20:43:40] ERROR[331085] loader.c: cel_sqlite3_custom declined to load.
[Oct 20 20:43:40] ERROR[331085] loader.c: cdr_sqlite3_custom declined to load.
[Oct 20 20:44:11] WARNING[331115] res_pjsip_registrar.c: AOR ‘’ not found for endpoint ‘1000’ (:51539)
[Oct 20 20:44:15] WARNING[331115] res_pjsip_registrar.c: AOR ‘’ not found for endpoint ‘1000’ (
:51539)
[Oct 20 20:44:19] WARNING[331115] res_pjsip_registrar.c: AOR ‘’ not found for endpoint ‘1000’ (****:51539)

pjsip set logger on is not n effect.

1 Like

The AOR in pjsip.conf should be named the same as the AOR in the REGISTER request. In the REGISTER request I’m guessing it is “1000” while in pjsip.conf it is “1000_aor”. Rename it in pjsip.conf to “1000”.

1 Like

@jcolp, @david551, thank you both for your input. The change suggested by @jcolp fixed it for me.

It is interesting, a tutorial I ready said to name the aor entry differently and even though I had correctly pointed to that in the endpoint itself, it was not working. Changing its name to match the endpoint and also changing the aors property in the endpoint to match fixed the issue for me.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.