Please help newbie to figure routing

I am newbie to FreePBX/Asteris. What i try to set is PC VPS with some pjsip extensions, connected using pjsip trunk to Raspberry PI with chan-quectel and SIM7800G-H usb dongle.
On the PC calls from local numbers on the PC that filter-match real world numbers use outgoing route to the PI trunk. For incoming calls from the PI trunk i set inbound route that DID matches my SIM card number (it is received, can be seen in logs) and sends to a ring group. Unfortunately with “pjsip set logger on” i can see that calls from the PI dongle being routed back to the PI instead of being forwarded to the ring group. Is it possible that outgoing routes have precedence to incoming ones, or am i missing something else?

What context is associated with the Pi? It needs to be a PSTN type one.

This happens exactly with the default context, from-ptsn. Right now i run around by setting custom context in the trunk and rules for it in extensions_custom.conf, but i want to figure the standard freepbx way to set this.

Outgoing routes should not be touched, in such cases, unless the incoming routes matches a destination which is outgoing. Allowing outgoing routes to match calls from providers would be a godsend to toll fraudsters.