No, not the dialplan, but your SIP profiles. In your external profile set "ext-rtp-ip" and "sip_rtp_ip" to "autonat:your_pbx_public_ip" (without the quotes ofcourse). If this is cloud install, then you'll probably need to do the same for your internal profile as well so that phones/endpoint...