Asterisk config for using media ip difference signal ip

Hi all,
I have 2 IP, one for signal and other for media.
My provider tell me that use signal ip for listen signal but use media ip for RTP.
I configure sip.conf:
bindaddr= --> signal ip

How can i configure to use the media ip for RTP?

just try to let through the firewall asterisk will take care of the rest on one server

thanks for response but i dont understand what you mean :frowning: sorry, iam newbie in sip and asterisk

The ITSP tells you which media address ot use in the SDP. Also, if you use comedia, Asterisk will learn it from the incoming RTP, even if something is changing it from what was in the SDP . All you have to do is to ensure that your firewall will actually pass the media, which doesn’t involve any Asterisk configuration.

rpt you don’t need to set just let it through the fire wall like in iptables put it in it should be clear and also in fail2 ban jail conf file

thanks for response, let me explain more:
i have IP X for bindaddr in sip.conf, IP Y for using when create RTP channels.
in INVITE message, it send an ip for RTP, like this: IN IP4 x.x.213.46
i think the ITSP want me to use IP Y to create channels to IP x.x.213.46 (Y <-> x.x.213.46)

Sorry for my bad english.

There is no valid reason for the ITSP to require you do use different addreses at your end. As such, we were replying for the case where the ITSP’s end uses different addreses.

chan_sip doesn’t support that. I believe there is a media address option on pjsip, but I don’t know if that is the local or the remote adress.

It is the local IP address that is placed into the SDP.

The remote address is always negotiated using the received SDP from the remote side, unless comedia is enabled as you mentioned in which case it is used until the remote address is learned.

yeap, the remote address is learned in INVITE SDP message, but can i specify the source address? how can i do it? iam using asterisk 1.8

The chan_sip module does not support such a thing, media and signaling use the same, as David mentioned.

Hi all, i have resolved this issue.
Add this config to sip.conf: media_address=IP_Y

Thanks for support!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.