Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-20801

PJSIP trunk contexts written to pjsip_identify.conf always match by IP, do not honor Endpoint Identifier Order specified in the Chan PJSIP Settings or trunk-specific "Match Inbound Authentication" setting



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: No Feedback
    • Affects Version/s:
    • Fix Version/s: None
    • Component/s: Core - Trunks/Routing
    • Labels:
    • Asterisk Version:
    • Distro:


      For background please see https://community.freepbx.org/t/pjsip-fails-when-extension-and-trunk-s-are-both-at-same-local-ip-address-as-from-obihai-device/62676

      This was observed in FreePBX 14.  The problem is that when you create a trunk (but NOT when you create an extension), it always creates an entry in pjsip_identify.conf that looks like this:


      The problem is that it appears this is causing incoming traffic from the "sip server" address (particularly an address on the same local network) to match to a trunk even if you also have an extension coming from that same IP address.  Thus if you are using a VoIP adapter to service an extension but also to act as a gateway to other services, the above generated context appears to keep the extension from working because you can't specify that the trunk should match on Auth Username or Username rather than IP address.  It seems to me that there should either be a way to prevent generation of this context altogether, or to specify what it is supposed to match on, or to follow the settings in the Endpoint Identifier Order specified in the Chan PJSIP Settings and/or trunk-specific "Match Inbound Authentication" setting.  But it should not default to matching on the server address because in some corner cases this will result in incorrect detection of an extension vs. a trunk, when both are on the same IP address.

      Note that Chan_SIP handles this same situation just fine; it is only PJSIP that appears to have this issue.

      As a side note, would it be possible to have better documentation for the pjsip_identify.conf settings (showing how to match on something other than an address) and also the use of the pjsip_identify_custom.conf and pjsip_identify_custom_override.conf files?

        Gliffy Diagrams




              • Assignee:
                Wanderer Wanderer
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:
                  Feedback Requested:


                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.