PJSIP multi tenancy and transport name?

I hoped, that new PJSIP driver will be more multi tenant friendly, but doesn’t seem like it.

  1. Can an endpoint be restricted to a single transport?
    Simply separate one department/office from the other.
    As far as I can see, you can register to any of the available transports.
    ACL doesn’t seem to be the answer either, unless you have a fixed IP/range for your endpoints.

  2. Can you have multiple usernames on different transports?
    So you have John in Office1, and John in Office2, and you can create two users bound to different transports. Doesn’t seem like it.

  3. How do you get transport name or ip:port for the current channel?
    Since users can register on any of the transports, how can I retrieve the name of the transport used to originate the call?
    None of the CHANNEL(pjsip,*) vars seem to contain the name or at least the ip and port combination. No answer here as well wiki.asterisk.org/wiki/display/ … on_CHANNEL.

If anybody runs into the same issue of not being able to get the local_addr, @file on irc spotted a solution. It happens on UDP, and a workaround until fix is to set a specific ip address instead of e.g. bind=