PJSIP: multiple aors to match different endpoints from same IP?


Hi all,

I am running Asterisk 13.17.1. My router (AVM Fritzbox) is to be used to provide a trunk for outbound (and inbound) phone calls as well as it is a DECT base station. This means that the router also registers at the Asterisk server to use it for DECT endpoints.

I think I figured out how to configure both types, as when used separately, both (trunk and DECT phone) work fine.
The problem is that when activating both, registration for the DECT handset doesn’t work

Here is the relevant part of my pjsip_wizard.conf:

type = wizard
transport = transport-udp

sends_auth = yes
sends_registrations = yes
remote_hosts =


aor/qualify_frequency = 60

registration/retry_interval = 60

outbound_auth/username = astuser
outbound_auth/password = pass
endpoint/from_user = astuser

language = de

accepts_registrations = yes
sends_registrations = no
accepts_auth = yes 
sends_auth = no

aor/max_contacts = 3
aor/default_expiration = 600




When I try to set a call from the DECT handset, the following error occurs twice:

WARNING[13448] res_pjsip_registrar.c: AOR ‘decta’ not found for endpoint ‘fb12345’

It looks like registrations from the router for the DECT handset are mismatched to the trunk endpoint. I did have a look at the generated PJSIP configuration (with pjsip export config_wizard primitives ) but didn’t see any mess so far. In fact, nearly every time the IP address of the router ( is set, it is used with the full sip uri. The only exception is the following identify-block:

type = identify
match =
srv_lookups = true
@pjsip_wizard = fb12345
endpoint = fb12345

Any hints?


So, I did some further reading.
A SIP INVITE from both decta as well as fb12345 has a correctly und fully set Contact header element. So there should be enough information to distinguish between them.

Is it possible that the identify section, i.e. the pure IP address match, is preferred as soon as it exists?


The order for endpoint identifiers is configured in pjsip.conf:

            ; The order by which endpoint identifiers are given priority.
            ; Currently, "ip", "username", "auth_username" and "anonymous" are valid
            ; identifiers as registered by the res_pjsip_endpoint_identifier_* modules.
            ; Some modules like res_pjsip_endpoint_identifier_user register more than
            ; one identifier. Use the CLI command "pjsip show identifiers" to see the
            ; identifiers currently available.
            ; (default: ip,username,anonymous)

With a default of ip,username,anonymous as it states. The identify section is strictly based on the source IP address, the SIP message itself is not used. As well no endpoint identifier uses the Contact header to match.


Thanks for the hint, it works now!