[OpenSIPS-Users] Mediaproxy configuration

Donat Zenichev donat.zenichev at gmail.com
Wed Jan 20 08:03:10 EST 2021


Good day Mark,
you have an interesting case actually.

How does the mapping at (IPA-IPB setup) work, when traffic goes back from
Media proxy to your user agent?
Let's imagine that the media proxy starts sending RTP/RTCP from
192.168.xxx.xxx,
then it reaches the map server, and which ports are then allocated for the
public side? Is that the same as the Media proxy allocated? (and advertised
in SDP as well)
And what if these ports for UDP transport are already engaged, how IPA-IPB
setup then manages this?

On the other hand, let's imagine your user agent sends an SDP offer in the
initial request.
Even though it advertised not a private address and there is no NAT problem
at UAC's side,
the contact information given in the SDP body will be the address which
should be reachable for your Media proxy server,
since this is what your Media proxy sees when receiving the offer.
(if I understand your description properly, then there is no entity which
would fix SDP body coming from IPA-IPB setup to Media Proxy)

If Media proxy received the local address of your test user agent (which is
even a public address), then it should have a possibility to reach it over
the IP network.
How does the RTP/RTCP flow go in this case? (from Media proxy of course)

Another good question, did you take a look at SDP bodies of both user agent
and Media proxy?
It's always a good thing to investigate media attributes, and other basic
information.




On Thu, Jan 7, 2021 at 2:57 PM Mark Allen <mark at allenclan.co.uk> wrote:

> Sorry... should have added that OpenSIPS box is acting as mid-registrar
>
> On Thu, 7 Jan 2021, 12:12 Mark Allen, <mark at allenclan.co.uk> wrote:
>
>> I wonder if anyone can help me with this? I am trying to configure
>> Mediaproxy 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 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.
>> Mediaproxy Dispatcher and Relay are both running on the same (OpenSIPS)
>> system
>>
>> SIP conversation between UAC and Asterisk via OpenSIPS looks 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????
>>
>>
>>
>>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 

Best regards,
Donat Zenichev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210120/4d2eb91c/attachment.html>


More information about the Users mailing list