Re: [OpenSIPS-Users] Mediaproxy configuration
Further to this - as I said the relay_ip overcame the immediate audio problem, but on testing it timed out after just over 60 seconds. Looking at the traffic in Wireshark and the SDP in SIP messages the cause seems to be that Asterisk is sending RTP direct to the 46.xxx.xxx.xxx address rather than via the relay, while traffic in the other direction is coming via the relay - so after about a minute Mediaproxy thinks one end is dead and aborts the connection. This is obviously the issue you flagged up John where you said "You need the address in the SDP to be the public IP 4x.xxx.xxx.xxx when it is sending packets to the UAC but you need it to use its LAN address when sending to the Asterisk server." Looks like I'll have to use RTPEngine bridging mode instead. Thanks for the help again :) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy configuration
Hi John and Johan - thanks for your replies. I'll have a look at RTPEngine to see if it makes things simpler for me. I have managed to get audio working both ways with Mediaproxy - the problem I was encountering was with config.ini settings. I had to explicitly set "relay_ip" and restarted Mediaproxy relay, dispatcher, and OpenSIPS after which audio worked both ways. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy configuration
I totally agree with the rtpengine suggestion Outlook voor iOS<https://aka.ms/o0ukef> downloaden Van: Users namens John Quick Verzonden: Thursday, January 21, 2021 10:40:18 AM Aan: users@lists.opensips.org Onderwerp: Re: [OpenSIPS-Users] Mediaproxy configuration Mark, I recommend using rtpproxy (or possibly rtpengine) rather than mediaproxy for your situation. You need the address in the SDP to be the public IP 4x.xxx.xxx.xxx when it is sending packets to the UAC but you need it to use its LAN address when sending to the Asterisk server. This is what bridge mode (or bridging mode) is used for, although the last time I built a solution like this I didn't use bridge mode and instead passed the relevant IP address as an argument when calling the rtpproxy activation functions. Unfortunately, the latter approach means your opensips.cfg script will need to be much more complicated. I suspect your problem when using mediaproxy and advertised_ip = 4x.xxx.xxx.xxx is that it will pass that address to Asterisk in the SDP. In which case, you might be able to get audio if you look at the network route Asterisk would use to reach/connect to 4x.xxx.xxx.xxx and make sure the mediaproxy relay is reachable. However, that does not sound like a good solution to me - much better if Asterisk talks to the relay directly over the LAN. John Quick Smartvox Limited Web: www.smartvox.co.uk<http://www.smartvox.co.uk> ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy configuration
Mark, I recommend using rtpproxy (or possibly rtpengine) rather than mediaproxy for your situation. You need the address in the SDP to be the public IP 4x.xxx.xxx.xxx when it is sending packets to the UAC but you need it to use its LAN address when sending to the Asterisk server. This is what bridge mode (or bridging mode) is used for, although the last time I built a solution like this I didn't use bridge mode and instead passed the relevant IP address as an argument when calling the rtpproxy activation functions. Unfortunately, the latter approach means your opensips.cfg script will need to be much more complicated. I suspect your problem when using mediaproxy and advertised_ip = 4x.xxx.xxx.xxx is that it will pass that address to Asterisk in the SDP. In which case, you might be able to get audio if you look at the network route Asterisk would use to reach/connect to 4x.xxx.xxx.xxx and make sure the mediaproxy relay is reachable. However, that does not sound like a good solution to me - much better if Asterisk talks to the relay directly over the LAN. John Quick Smartvox Limited Web: www.smartvox.co.uk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy configuration
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 wrote: > Sorry... should have added that OpenSIPS box is acting as mid-registrar > > On Thu, 7 Jan 2021, 12:12 Mark Allen, 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 1 >> 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@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best regards, Donat Zenichev ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy configuration
Sorry... should have added that OpenSIPS box is acting as mid-registrar On Thu, 7 Jan 2021, 12:12 Mark Allen, 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 1 > 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@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Mediaproxy configuration
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 1 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@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] mediaproxy configuration
Can anybody share your mediaproxy configuration? I am using mediaproxy to work with ice. I modify the script from rtpproxy. Finally it turns out it breaks some invite relay logic. The route logic configuration is very hard. The original rtpproxy is generated from menuconfig. Since there is no option in the menuconfig to generate mediaproxy, I am wondering anyone has a working mediaproxy to share? Thanks very much. George ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users