That is incorrect. Each side (your ARI application AND Asterisk) have independent IP address and port. The IP address and port to send packets to Asterisk can be determined either:
- The source IP address/port of the media you get from Asterisk
- The UNICASTRTP_RTP_LOCAL_PORT and UNICAST_RTP_LOCAL_ADDRESS channel variables which are returned when the external media channel is created