Asterisk Separate The Signaling SIP IP From Media IP

Hello, I need to separate the signaling SIP IP from Media IP in asterisk. I tried to set the Media IP through PJSIP by using “media_address” and “bind_rtp_to_media_address” options,
now the RTP is being sent from the correct Media IP, however, in SDP (183 session in progress) the Connection Information (c) option is still the Signaling IP.
any suggestion in order to set the Media IP in Connection Information (c) option too.

Asterisk does most of it’s magic because it can see the media so what is the purpose of your need ? are you using same asterisk server with 2 IPs ? or trying to use an external media server ? or this is an external firewall ip that will then forward to internal asterisk ?

Thanks for your reply. yes, I’m using the same asterisk server with 2 IPs, one for the media and the other for the signaling. The RTP is being sent from the correct Media IP, but the Connection Information (c) option is still the signaling IP. is there any way to set the Media IP to this option too?

I believe this goes into the transport part of pjsip configuration. so create

[transport-X]
type=transport
protocol=udp
bind=my_second_ip:port
local_net=my_net/24
external_media_address=IP_1
external_signaling_address=IP_2
external_signaling_port=5060

then in your trunk definition you have to specify this newly created transport-X

Thank you for your support. it seems working fine now !!

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