Was using autodomain in sip.conf, now in PJSIP how do I direct calls to a context by domain name when they come from the same location

In sip.conf I used to use:

context = sip-in
bindport = 5060
bindaddr = x.x.x.x

;sip domain settings
autodomain = yes
domain = sip1.domain.com,sip1-in
domain = sip2.domain.com,sip2-in

However, in PJSIP I can’t understand how to do this. Calls come through one endpoint with one IP. Do I create multiple endpoints for this using a different “match” in the identify sections and work with it as though its more than just one endpoint with different set contexts for each? Must I handle it in the dialplan (which I don’t want to do)?

I might be overlooking something really simple, as I’m very new to this PJSIP. Any help, ideas, or advice would be greatly appreciated. Thanks everyone who reads this!!