Well ...
this is really a question of setup -- it could be so about gateways that voice traffic (RTP media) passes through the PBX always. It depends definitely on extension's settings like 'PBX delivers audio', like the same settings for the provider / gateway (which is 'ON' by default). In most cases passing the voice traffic through the PBX may be desirable, otherwise issues like one way audio may appear.
The easiest thing may be is playing with this parameter, both for gateway and extensions, incoming and outgoing calls, transfers, forwards, etc., and to see whether the result is satisfactory while analyzing the traffic with wireshark