I am trying to configure Mediaproxy 4.0.4 (mediaproxy.ag-projects.com) with OpenSIPS 3.1 to handle RTP traffic coming from outside our local network. Here's the setup:
UAC ---> IPA ---> IPB ---> Mediaproxy / OpenSIPS ---> Asterisk
- IPA (a public IP address 4x.xxx.xxx.xxx) maps ports 5060 and
10000 to 65535 to IPB (local IP address 192.168.xxx.xxx). IPB is actually a Virtual IP managed by keepalived.
- UAC is MizuDroid app running on my Android phone connected to my home network (NATed) with a public IP of 5.xxx.xxx.xxx. Everything else relates to our office network.
- OpenSIPS is running as a mid-registrar (OpenSIPS 3.1 on Debian Buster)
- Mediaproxy Dispatcher and Relay are both running on the same server as OpenSIPS
SIP conversation between UAC and Asterisk via OpenSIPS seems to be working fine. Endpoints connect, exchange data, and hangup. The problem is with SDP addressing (NAT problem) causing no audio either way, which is what I want Mediaproxy to handle.
In opensips.cfg I'm passing control for calls arriving at IPA to
Mediaproxy...
if (is_method("INVITE")) {
if (!has_totag()) {
if ($fd == "4x.xxx.xxx.xxx") {
xlog("Passing control to Mediaproxy...");
engage_media_proxy();
}
}
}
In /etc/mediaproxy/config.ini all settings are defaults except for setting
dispatcher as IPB...
dispatchers = 192.168.xxx.xxx
...and I've tried it with and without advertised_ip set to IPA...
advertised_ip = 4x.xxx.xxx.xxx
I can see that Mediaproxy is taking control of calls as instructed and making changes to SDP but it's not solving my audio problems. What am I doing wrong????
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…