Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
783 views
in Technique[技术] by (71.8m points)

sip - Mediaproxy with OpenSIPS 3.1 as mid-registrar not solving lack of audio due to NATed SDP

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????


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...