SIP Trunks can not get RTP in media link

Hello,
during call RTP is present in signal link from MGW side, because incorrect IP is provided in SDP invite mesage “Connection Information (c): IN IP4 172.30.151.154”,
i use for signal 172.30.151.154 and for media 172.30.151.161,
how to change “Connection Information” ip to 172.30.151.161

That’s a weird configuration, given that Asterisk has signalling and media relay functions on the same machine. I assume you have some sort of weird NAT configuration, in which the public addresses differ.

chan_pjsip, which you should now be using, as chan_sip is deprecated, has separate options for public versions of the signalling and media addresses.

If this is not some sort of weird NAT configuration, you need to explain in more detail. You certainly need to say which channel driver you are using.

Also, please avoid using abbreviations. I guess MGW is something like media gateway, which in turn is some sort of session border controller, but I don’t really understand the implications of that, and you may need to provide fairly detailed information on network topology.