How Asterisk can record audio when RTP isn't passed thru her

Hi there. In O’Relly book, I’ve read that when it possible rtp traffic goes peer-to-peer, bypassing sip proxy. So I have question, how Aserisk can record audio (using MixMonitor) when peer’s are inside local network for example?

It can’t. Enabling audiohooks (MixMonitor) disables native bridging for the call.

Got it. Thanks.