PJSIP non standard asterisk port?

I’m transferring from SIP to PJSIP. Mostly everything working, except:

In sip.conf, if I need to ask Asterisk to listen for connections on an non-standard port, then in the general section I ask for “bindport = 5061” or other port and asterisk complies nicely. What would be the same request in a PJSIP config file?

The intention here is to avoid having all and sundry trying in vain to connect to my box and it is very effective as a countermeasure. Is there the same need with respect to PJSIP + Asterisk?

PJSIP accepts the port as part of the “bind” option. It’s not a separate option.

Example:
bind=172.16.1.1:5070

Thanks again, Joshua, works like a charm.

One other little detail which may be of use to someone is that where you need to specify a realm for a device such as a smartphone, I find that specifying the “realm=xxxxxx” in the auth section of the extension section of pjsip.conf seems to work.