Endpoints don't register correctly after upgrade (anonymous)

After I upgraded my freepbx box I got problems with registering some endpoints. The strange thing is, as far as I see, each endpoint is configured exactly the same one, but some can register, others don’t. In the logs it says:

[2016-07-26 14:31:10] WARNING[2467] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs

So I tried to delete the endpoint and create a new one. In the beginning it worked again. But after a short time, the endpoint (Aastra 6737i) says “no service”.

Can anyone give me a hint on how to solve this problem? Maybe something with permissions? Authentification?

Thanks so much in advance
Pasco

Please post a reasonable snippet of /var/log/asterisk/full showing the extension connecting and then not connecting.

We need both parts of the conversation, but not all the stuff in between - please try to trim it down so that it doesn’t take all day to find the problem.

Based on your description, I’m pretty sure you’re running into a few misconfigured places, any one of which would be enough to stop your system from working. Also, you need to make sure that your integrated firewall is set up correctly.

OK, I try:

[2016-07-27 10:28:43] WARNING[5132] res_pjsip_registrar.c: Endpoint 'anonymous' has no configured AORs [2016-07-27 10:28:43] SECURITY[2747] res_security_log.c: SecurityEvent="FailedACL",EventTV="2016-07-27T10:28:43.538+0200",Severity="Error",Service="PJSIP",EventVersion="1",AccountID="anonymous",SessionID="[email protected]_168_1_45",LocalAddress="IPV4/UDP/192.168.1.40/5060",RemoteAddress="IPV4/UDP/192.168.1.45/5060",ACLName="registrar_attempt_without_configured_aors"

There is nothing else helpful as far as I can see. If I create a new extension with a new number, it works. If I delete it and the corresponding user, create a new extension and user with the old number, it doesn’t work.

I switched the pjsip logger on and get now:

[2016-07-28 09:30:40] VERBOSE[3116] res_pjsip_logger.c: <— Received SIP request (634 bytes) from UDP:192.168.1.10:5060 —>
REGISTER sip:192.168.1.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bKb74ec779a5790f66b
Max-Forwards: 70
From: sip:[email protected]:5060;tag=96e5f3081d
To: sip:[email protected]:5060
Call-ID: 5286d50080a6eaab
CSeq: 1032455805 REGISTER
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, UPDATE, PRACK, SUBSCRIBE, INFO, PUBLISH
Allow-Events: talk, hold, conference, LocalModeStatus
Contact:

sip:[email protected]:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-1000-8000-00085D3F7CAE”;expires=300
Supported: path, gruu
User-Agent: Aastra 6737i/3.3.1.8202
Content-Length: 0
[2016-07-28 09:30:40] VERBOSE[30969] res_pjsip_logger.c: <— Transmitting SIP response (339 bytes) to UDP:192.168.1.10:5060 —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.1.10:5060;rport=5060;received=192.168.1.10;branch=z9hG4bKb74ec779a5790f66b
Call-ID: 5286d50080a6eaab
From: sip:[email protected];tag=96e5f3081d
To: sip:[email protected];tag=z9hG4bKb74ec779a5790f66b
CSeq: 1032455805 REGISTER
Server: FPBX-13.0.163(12.8.1)
Content-Length: 0

[2016-07-28 09:30:40] WARNING[30969] res_pjsip_registrar.c: Endpoint ‘anonymous’ has no configured AORs

I found this one in addition, maybe that’s the real problem:

[2016-07-28 09:56:31] ERROR[18897]: config_options.c:703 aco_process_var: Could not find option suitable for category ‘5100’ named ‘media_encryption_optimistic’ at line 361 of /etc/asterisk/pjsip.endpoint.conf
[2016-07-28 09:56:31] ERROR[18897]: res_sorcery_config.c:277 sorcery_config_internal_load: Could not create an object of type ‘endpoint’ with id ‘5100’ from configuration file ‘pjsip.conf’

My issue is the same as yours… and i need a solution

Most likely you’ve configured your extensions as Chan_SIP, and your endpoints are still using the default SIP port of 5060. When you upgrade, pjSIP takes over 5060 and Chan_SIP is moved to 5160, which causes endpoints attempting to authenticate as chan_SIP to show anonymous. To correct this there are two options:
Option 1: Change all extenstions from chan_sip to pjsip
Options 2 Update the Listening ports to set chan_sip back to 5060
To do this:
Settings - Advanced SIP Settings, then click the PJSIP tab.
Scroll down to “Port to Listen on” and change it from 5060 to anything but (important you must change this first or you will not be able to use 5060 for chan_sip)
Once PJSIP has updated, click on the Chan_SIP tab
Scroll down to “Bind Port” and change it to 5060, then change TLS to 5061
Save and Apply, then your problem should be resolved.