With the, deprecated, chan_sip, you can use allowguest to allow all incoming calls (from phones a well as other switches). With chan_pjsip, you have to define an endpoint with anonymous caller matching. chan_pjsip needs a token endpoint to be able to make outgoing calls, as well.
In practice people are very reluctant to do this as they will get 100s or 1,000s of attempted toll fraud calls every day, once the internet underworld discovers them.
(When people talk about SIP trunks, they generally mean an endpoint that can accept outgoing calls with many different user field values, covering the whole PSTN, or at least the whole of a business site, and can typically hand large numbers of simultaneous calls, although the latter isn’t a critical part of the definition. There may also be an implication of outgoing registration and authentication or IP authentication.)