Associating inbound registrations from SBC to internal endpoints

I’m trying to understand at a high level what options I have in Asterisk for enabling my internal endpoints to also register from external networks through our SBC. The SBC is currently configured as an identify-type endpoint classified by IP and calls work both inbound / outbound as expected. What I’m not understanding is how the SBC endpoint can be seen as proxy/server in the sense that the endpoints beyond the SBC are the true endpoints and their AORs can be utilized separately from the AOR of the SBC itself. Ideally, I want an additional AOR record for my internal endpoints that points back to user@sbc and that can be rung in conjunction with the internal phone. Please, any help seeing how this might be configured in Asterisk would be helpful. The documentation (see below) unfortunately seems to just say “you’re on your own”.

To expand on this a bit further, I think the main question boils down to this:

Can the same SBC IP or endpoint be used for both the trunking (inbound / outbound calling from registered endpoints) and proxying registrations to the Asterisk PBX? I see that there is a “line=” section that can be used for outbound registrations to segment the same IP address into different endpoints, but I am not sure if this is possible for the “endpoint” type. Or, is it required that I build another interface / IP address on the SBC so that Asterisk does not classify the REGISTER to the SBC trunking endpoint based on its IP and therefore Asterisk can associate the AOR to the context and endpoint as usual?

The PJSIP functionality has multiple ways of matching an endpoint to an incoming request. It can use the From user, authentication username, it can be based on a header, it can be based on the source IP address. These don’t care about the message type as it occurs early in the process. Depending on the contents of the packet you may be able to make it work by changing the ordering (have From user preferred first, then fallback to IP for example) which is configurable in pjsip.conf using the “endpoint_identifier_order” option.

Thanks for the info. I am looking for the proper syntax for this configuration section but no luck so far. I tried this in my pjsip.conf:


…but “pjsip show identifiers” still shows this:

CLI> pjsip show identifiers
Identifier Names:
name not specified

I’m going to keep trying different things but if you can tell what is the problem in the meanwhile, that would be very helpful!

Thanks again.

Depending on version you also need a “type=global” in the global section to be recognized.

Thanks very much, this solved it! I’m able to do inbound registrations now without creating a second interface on the SBC.