AOR '' not found for endpoint '200'

I am having a trouble for days to figure out how to configure pjsip trunk. I gave up on further searching and I know that this may be asked often but I am in a dead end.

Asterisk still showing this error:

 WARNING[29555]: res_pjsip_registrar.c:1068 find_registrar_aor: AOR '' not found for endpoint '200' (<ip address of other PBX>)

So the blank AOR is causing the problem, but how to I assign proper AOR for 200 endpoint?

My trunk Setting:

Trunk Name : 200
Authentication:  None
Registration : None
SIP Server: <ip address of other PBX>

So what else I need to fill

Thanks for guiding

I could well be wrong, but I suspect the endpoint is behaving as though you had Registration: Inbound. and also not passing a user part in the To header. However, without reading the code, or seeing the relevant pjsip set logger on output, I could be wildly wrong.

It doesn’t make sense to me to have the IP address, unless it is reacting to something inbound, and the only inbound operation that deals with AORs is registration.

If a bad configuration has been generated, I think I’d want to see the generated type=endpoint and type=aor sections, to understand what is going on.

Ok, as I read your comments on this forum, you probably have right, so how to I can fix it?

Now, when I try to capture theese logs I enabled this trunk and for a while it is worked perfectly fine and after few minutes the AOR warning appears

pjsip aor conf:

[200]
type=aor
qualify_frequency=60
contact=sip:<ip address of other PBX>

pjsip endpoint.conf:

[200]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,alaw,gsm,g726,g722,h264,mpeg4
aors=200
send_connected_line=false
language=en
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto

LOG:

AdamFreePBX*CLI> pjsip set logger on
PJSIP Logging enabled
<--- Received SIP request (451 bytes) from UDP:<ip address of other PBX>:5060 --->
REGISTER sip:<FreePBX_IP_TRUNK_VLAN>:5060 SIP/2.0
Via: SIP/2.0/UDP <ip address of other PBX>:5060;branch=z9hG4bKb888aac4fc3e97962
Max-Forwards: 70
From: <sip:300@<FreePBX_IP_TRUNK_VLAN>:5060>;tag=bf08ee9843
To: <sip:300@<FreePBX_IP_TRUNK_VLAN>:5060>
Call-ID: 3e1faba6b606fd2a
CSeq: 26439 REGISTER
Contact: <sip:300@<ip address of other PBX>:5060>
Expires: 3600
User-Agent: Patton SN4114 2JS2JO EUI 00A0BA0BEB19 R6.T 2016-04-04_RFE2523 H323 SIP FXS FXO M5T SIP Stack/4.2.14.18
Content-Length: 0


<--- Transmitting SIP response (333 bytes) to UDP:<ip address of other PBX>:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP <ip address of other PBX>:5060;rport=5060;received=<ip address of other PBX>;branch=z9hG4bKb888aac4fc3e97962
Call-ID: 3e1faba6b606fd2a
From: <sip:300@<FreePBX_IP_TRUNK_VLAN>>;tag=bf08ee9843
To: <sip:300@<FreePBX_IP_TRUNK_VLAN>>;tag=z9hG4bKb888aac4fc3e97962
CSeq: 26439 REGISTER
Server: FPBX-15.0.23.17(16.20.0)
Content-Length:  0


[2022-08-05 23:22:17] WARNING[29555]: res_pjsip_registrar.c:1068 find_registrar_aor: AOR '' not found for endpoint '200' (<ip address of other PBX>:5060)
<--- Transmitting SIP request (421 bytes) to UDP:<some_Phone_IP>:5060 --->
OPTIONS sip:102@<some_Phone_IP>:5060 SIP/2.0
Via: SIP/2.0/UDP <FreePBX_IP_phone_VLAN>:5060;rport;branch=z9hG4bKPjd5948aef-fc78-4553-a369-fa6149136329
From: <sip:102@<FreePBX_IP_internet_VLAN>>;tag=5d9dd842-ca73-4e53-a300-02011aadd823
To: <sip:102@<some_Phone_IP>>
Contact: <sip:102@<FreePBX_IP_phone_VLAN>:5060>
Call-ID: eec0c698-2018-475a-b339-6febcd390d91
CSeq: 55461 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-15.0.23.17(16.20.0)
Content-Length:  0


<--- Received SIP response (487 bytes) from UDP:<some_Phone_IP>:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP <FreePBX_IP_phone_VLAN>:5060;rport=5060;branch=z9hG4bKPjd5948aef-fc78-4553-a369-fa6149136329
From: <sip:102@<FreePBX_IP_internet_VLAN>>;tag=5d9dd842-ca73-4e53-a300-02011aadd823
To: <sip:102@<some_Phone_IP>>;tag=378243937
Call-ID: eec0c698-2018-475a-b339-6febcd390d91
CSeq: 55461 OPTIONS
Supported: replaces, path, timer
User-Agent: Grandstream GXP2170 1.0.11.54
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP request (451 bytes) from UDP:<ip address of other PBX>:5060 --->
REGISTER sip:<FreePBX_IP_TRUNK_VLAN>:5060 SIP/2.0
Via: SIP/2.0/UDP <ip address of other PBX>:5060;branch=z9hG4bK8c2ca43726c55eec8
Max-Forwards: 70
From: <sip:300@<FreePBX_IP_TRUNK_VLAN>:5060>;tag=cb24a21003
To: <sip:300@<FreePBX_IP_TRUNK_VLAN>:5060>
Call-ID: 1ed1cbddcdffdfc7
CSeq: 29607 REGISTER
Contact: <sip:300@<ip address of other PBX>:5060>
Expires: 3600
User-Agent: Patton SN4114 2JS2JO EUI 00A0BA0BEB19 R6.T 2016-04-04_RFE2523 H323 SIP FXS FXO M5T SIP Stack/4.2.14.18
Content-Length: 0


<--- Transmitting SIP response (333 bytes) to UDP:<ip address of other PBX>:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP <ip address of other PBX>:5060;rport=5060;received=<ip address of other PBX>;branch=z9hG4bK8c2ca43726c55eec8
Call-ID: 1ed1cbddcdffdfc7
From: <sip:300@<FreePBX_IP_TRUNK_VLAN>>;tag=cb24a21003
To: <sip:300@<FreePBX_IP_TRUNK_VLAN>>;tag=z9hG4bK8c2ca43726c55eec8
CSeq: 29607 REGISTER
Server: FPBX-15.0.23.17(16.20.0)
Content-Length:  0


[2022-08-05 23:22:27] WARNING[16530]: res_pjsip_registrar.c:1068 find_registrar_aor: AOR '' not found for endpoint '200' (<ip address of other PBX>:5060)


<--- Received SIP request (449 bytes) from UDP:<ip address of other PBX>:5060 --->
REGISTER sip:<FreePBX_IP_TRUNK_VLAN>:5060 SIP/2.0
Via: SIP/2.0/UDP <ip address of other PBX>:5060;branch=z9hG4bK9e92436aaef56357a
Max-Forwards: 70
From: <sip:300@<FreePBX_IP_TRUNK_VLAN>:5060>;tag=2ecba33e83
To: <sip:300@<FreePBX_IP_TRUNK_VLAN>:5060>
Call-ID: ca8b708586523547
CSeq: 787 REGISTER
Contact: <sip:300@<ip address of other PBX>:5060>
Expires: 3600
User-Agent: Patton SN4114 2JS2JO EUI 00A0BA0BEB19 R6.T 2016-04-04_RFE2523 H323 SIP FXS FXO M5T SIP Stack/4.2.14.18
Content-Length: 0


<--- Transmitting SIP response (331 bytes) to UDP:<ip address of other PBX>:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP <ip address of other PBX>:5060;rport=5060;received=<ip address of other PBX>;branch=z9hG4bK9e92436aaef56357a
Call-ID: ca8b708586523547
From: <sip:300@<FreePBX_IP_TRUNK_VLAN>>;tag=2ecba33e83
To: <sip:300@<FreePBX_IP_TRUNK_VLAN>>;tag=z9hG4bK9e92436aaef56357a
CSeq: 787 REGISTER
Server: FPBX-15.0.23.17(16.20.0)
Content-Length:  0


[2022-08-05 23:22:37] WARNING[16530]: res_pjsip_registrar.c:1068 find_registrar_aor: AOR '' not found for endpoint '200' (<ip address of other PBX>:5060)
AdamFreePBX*CLI> pjsip set logger off

It’s attempting to register to AOR “300”, not “200” as specified in your configuration. That is why it fails.

But his registration also doesn’t support registration; it has the contact hard coded, as you would expect from setting Registration to none in FreePBX.

The OP should turn off registration in the device or set FreePBX for inbound registration and dynamic hosts.

(It’s also just possible that there are two potential endpoints, on the same machine, one for 300, set to register, and one for 200, set not to register. Because they have the same IP address, Asterisk will, depending on the match order and the existence of an entry for 300, match 300 based on the IP address.)

Aye, that as well. My brain glossed over the AOR definition apparently.

David has right - on Other PBX (PATTON as you can see in messages) there is one registration 300 for analog and its working with PBX correct (300 is as classic endpoint so no problem here)
but 200 is also on PATTON but withnout any registration needed.

It works with old Asterisk 1.8 where were this settings:

[200]
type=peer
allow=alaw
username=200
host=<ip address of other PBX>
context=contextP
qualify=yes
nat=no

And dialing was due SIP/200/

So I need to transfer it somehow into PJSIP language

As David mentioned, should I turn FreePBX to inbound registration?
And where exactly allow dynamic hosts?

Thank you for hints

Dynamic hosts are the normal arrangement for extensions.

Having multiple endpoints for the same machine is always going to be a problem. The better solution here is likely to be to change it into a trunk, at both ends.

I wouldn’t consider anything but a single trunk in such circumstances unless I was creating a test rig where one side was simulating extensions. As such I’ve never thought through what you would have to do to ensure both sides recognize two distinct endpoints.

However, you really need to step back and get a clear understanding of what you are really trying to achieve, before you consider how that might be implemented in FreePBX/Asterisk, or even extensions and trunks.

It would seem this is an ongoing issue with people switching over without really digging into the documents for Chan_PJSIP. There is an authentication order in chan_pjsip and the order is: ip, username, anonymous, auth_user, header.

This means if you have devices A and B with endpoint A’s config having a match/permit set to an IP while B is set to register via a username but both are behind the same IP…A is always going to match against both because IP is priority and A has a match setting to an IP.

Good news is this authentication can be prioritized meaning you can sort username first followed by IP which will then check for an endpoint matching the username first then match against an match=IP on endpoints.

So if 200 is set with Permit (Match) setting with the IP of the Patton then when 300 (or any other user account) tries to register from the Patton, they will always match on 200 first. Once you change the priority order, 200 should still match against the IP but 300 will be able to register.

Hello guys,
many thanks for your advices. I decided to use different approach and now it works.
So very good point was with prioritizing authentication.

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