Direct RTP between phones behind same firewall

I have 2 phones (A and B) behind the same NAT firewall. I have Asterisk on a public IP not on my network.
When I call from A to B, I find that the RTP goes to my Asterisk box IP.

I have set canreinvite=yes for bot these SIP phone accounts. Does it work only with Asterisk also behind the same NAT? How to make it work in my scenario?

Try to make a call with SIP debugging enabled on asterisk. I’d like to see the console output before trying to help you figure out the best way to achieve the end result.