Nat traversal problem in asterisk?

The name of your problem is NAT traversal just as you said.

You have to be routed through the two segments, not translated (conventionally known as NAT). If you are routed then the SIP stack must have a way of identifying that NAT correction is not needed for that subnet.

in chan_sip the data structure is called chan_sip.localnet (or localnet in Sip General Settings) I do not know PJSIP so I can’t speak directly to how to make it aware of attached network segments.