res_pjsip.so has configuration option i.e. "endpoint_identifier_order" to determine how res_pjsip will match the incoming SIP request against present endpoints.
This order configuration is useful in PJSIP scenario where we have PJSIP extensions and trunks are coming from the same IP.
FreePBX Configuration:
SipSetting module(v14.0.27.11+ Or v15.0.6.6+) FreePBX GUI has an option to configure the endpoint identification order.
FreePBX->Settings -> asterisk SIP settings ->Chan PJSIP settings
Drag and drop the blocks to decides the priorities.
References :
1) - FREEPBX-17803Getting issue details... STATUS
2) https://blogs.asterisk.org/2018/02/07/identifying-endpoint-pjsip/