HOW TO USE RTP PROXY WITH WEBRTC TO AVOID THE USE OF STUN and TURN SERVER

1,479 views
Skip to first unread message

Abhisek Panda

unread,
Aug 18, 2015, 5:56:46 AM8/18/15
to discuss-webrtc
For an auido call from a google chorme to google chrome or mozilla to mozilla many servers are coming in picture. Like NAT (Both Static / Symmetric NAT) , STUN server , ICE , TURN Server .
By using RTP Proxy can the use of NAT , STUN .,TURN be avoided ??
How to use RTP proxy for this.
What will be the call flow here by using RTP Proxy
i've these below 
client A , clent B , Sip Server.

Iñaki Baz Castillo

unread,
Aug 18, 2015, 7:28:28 AM8/18/15
to discuss...@googlegroups.com
2015-08-18 11:56 GMT+02:00 Abhisek Panda <abhise...@gmail.com>:
> For an auido call from a google chorme to google chrome or mozilla to
> mozilla many servers are coming in picture. Like NAT (Both Static /
> Symmetric NAT) , STUN server , ICE , TURN Server .

NAT and ICE are not servers.
STUN and TURN server may be the same (a TURN server is also a STUN
server). So just one server.


> By using RTP Proxy can the use of NAT , STUN .,TURN be avoided ??

So instead of letting direct audio/video between endpoints (STUN helps
on that) you want to force the media through a server yes or yes.


> How to use RTP proxy for this.
> What will be the call flow here by using RTP Proxy
> i've these below
> client A , clent B , Sip Server.

Use a TURN server. That's what you are looking for. And note that
there is no a "universal RTP Proxy".




--
Iñaki Baz Castillo
<i...@aliax.net>

Abhisek Panda

unread,
Aug 18, 2015, 8:31:55 AM8/18/15
to discuss-webrtc
Hi Castillo ,
          Thanks for the reply.
           I've tried using TURN server earlier , by using which i'm able to do audio call from one client to other but it is always not working because of bandwidth of turn server i guess. When ever ports are free then only the audio call is working it seems. On the other hand i've used open source turn server from numb/viagenie (numb.viagenie.ca/) using this turn server is a risk as my audio data is not secure for going in the public turn server.
Hence i'm avoiding to use turn server , instead want to use RTP Proxy which can be helpful to avoid stun/turn.

I've found RTP Proxy below,

Which we have compiled & RTP Proxy is ready as well. So now i want to use this RTP proxy with WEBRTC . I'm using Huawei SIp Server.
I want to know how to use the RTP Proxy to avoide turn & stun server.
What should be the call flow & how RTP Proxy will  be able to avoid TURN / STUN uses & can help for flowing RTP between end points.

Regards,
Abhisek 

Iñaki Baz Castillo

unread,
Aug 18, 2015, 10:21:49 AM8/18/15
to discuss...@googlegroups.com
2015-08-18 14:31 GMT+02:00 Abhisek Panda <abhise...@gmail.com>:
> Hi Castillo ,
> Thanks for the reply.
> I've tried using TURN server earlier , by using which i'm able to
> do audio call from one client to other but it is always not working because
> of bandwidth of turn server i guess. When ever ports are free then only the
> audio call is working it seems. On the other hand i've used open source turn
> server from numb/viagenie (numb.viagenie.ca/) using this turn server is a
> risk as my audio data is not secure for going in the public turn server.
> Hence i'm avoiding to use turn server , instead want to use RTP Proxy which
> can be helpful to avoid stun/turn.

Why don't you deploy your own TURN server?



> I've found RTP Proxy below,
> git clone git://sippy.git.sourceforge.net/gitroot/sippy/rtpproxy
>
> Which we have compiled & RTP Proxy is ready as well. So now i want to use
> this RTP proxy with WEBRTC . I'm using Huawei SIp Server.
> I want to know how to use the RTP Proxy to avoide turn & stun server.
> What should be the call flow & how RTP Proxy will be able to avoid TURN /
> STUN uses & can help for flowing RTP between end points.

You cannot use RTP Proxy for WebRTC.

Calvin Walton

unread,
Aug 18, 2015, 11:03:01 AM8/18/15
to discuss...@googlegroups.com
Hi,

On Tue, 2015-08-18 at 05:31 -0700, Abhisek Panda wrote:
> Hi Castillo ,
> Thanks for the reply.
> I've tried using TURN server earlier , by using which i'm
> able
> to do audio call from one client to other but it is always not
> working
> because of bandwidth of turn server i guess. When ever ports are free
> then
> only the audio call is working it seems. On the other hand i've used
> open
> source turn server from numb/viagenie (numb.viagenie.ca/) using this
> turn
> server is a risk as my audio data is not secure for going in the
> public
> turn server.
> Hence i'm avoiding to use turn server , instead want to use RTP Proxy
> which
> can be helpful to avoid stun/turn.

This is not entirely true - with WebRTC, the media is encrypted (with
DTLS) end-to-end, so the TURN server can't see the audio packet
contents.

This relies on the fingerprints in the signalling path being sent over
a secure connection (verified HTTPS/WSS connection, for example).

> I've found RTP Proxy below,
> git clone git://sippy.git.sourceforge.net/gitroot/sippy/rtpproxy
>
> Which we have compiled & RTP Proxy is ready as well. So now i want to
> use
> this RTP proxy with WEBRTC . I'm using Huawei SIp Server.
> I want to know how to use the RTP Proxy to avoide turn & stun server.
> What should be the call flow & how RTP Proxy will be able to avoid
> TURN /
> STUN uses & can help for flowing RTP between end points.

Rather than run your own RTP proxy, please just run your own TURN
server.
https://github.com/coturn/rfc5766-turn-server/
and
https://github.com/coturn/coturn
are some well-known open-source TURN servers that you can run yourself,
there may be others as well.

Setting up an RTP proxy designed for SIP would be very difficult, sinceWebRTC does not natively use SIP for signalling.

--
Calvin Walton <calvin...@kepstin.ca>

Abhisek Panda

unread,
Aug 20, 2015, 1:16:49 AM8/20/15
to discuss-webrtc, calvin...@kepstin.ca, i...@aliax.net
Hi All ,
                 Thanks for your input regarding using TURN instead of RTP Proxy.
                  I've installed turn server in the below way , please give inputs if it is fine ??
 1. Downloaded Code from 

      https://github.com/coturn/rfc5766-turn-server/

 2.  Deployed in a local server (172.xx.xx.51) inside root path

      (Not Sure if turn server should be placed before firewall/NAT or after firewall/NAT  -- please conform this )

      

 3.  While running  ./configure found an issue as ,

      ERROR: Libevent2 development libraries are not installed properly in required location

      I've checked for the issue, which said Libevent2 by default present in Fedora OS but not in Cent OS , which I am using.

      For Cent OS Libevent2  need to be installed manually.

 4.  Manual Installation i did by downloading libevent-2.0.22-stable.tar.gz  from http://libevent.org/

       and installing in the path /usr/ports/devel/libevent2/

       I've run ./configure -- > Make --> Make Install .

       libevent2 installed properly without any error.

 5. Again tried to run ./configure of Turnserver, Which was error free but 1 warning was there

      HIREDIS DEVELOPMENT LIBRARY (libhiredis.*) AND/OR HEADERS (hiredis/*.h)

      ARE NOT INSTALLED PROPERLY ON THIS SYSTEM.

      THAT'S OK BUT THE TURN SERVER IS BUILDING WITHOUT REDIS SUPPORT.

 

      This message i have ignored as i'm not sure if it will be an issue & installed Turn Server by Make & Make Install Command.

      Turn Server Got Installed .

 6.  Created a configuration file ,

       /etc/turnserver.conf & added the below , with a random port 5555. (not sure if this way it will work)

       

 #setting static accounts

# Remember, "static" accounts are not dynamically checked by the turn server process.

user=username:password


# listen ports

listening-port=5555

listening-ip=172.16.6.51


       

 7.  I've tried to Run The TURN Server with the below command 

      turnserver -v -r  172.16.6.51:5555 -a -b turnuserdb.conf -c turnserver.conf -u custom-username -r 172.16.6.51:5555 -p   custom-password 

      With this i was able to make the turn server up. 

      [root@localhost rfc5766-turn-server-3.2]# ps -el | grep turn

      0 S     0 12147 32123  0  80   0 - 236237 epoll_ pts/2   00:00:02 turnserver

       

8. I've modified the script  (call.htm) of my SIPML5 ( like http://sipml5.org/call.htm?svn=230 this page i've my own designed page) client page in this way

    // **** Begin Abhisek Modified for using own TURN Server ****

         //window.localStorage.setItem('org.doubango.expert.ice_servers', "[{ url: 'stun:stun.l.google.com:19302'}]");

           window.localStorage.setItem('org.doubango.expert.ice_servers', "[{ url: 'turn:172.16.6.51:55555'}]");

         // **** End Abhisek Modified for using own TURN Server ****


    

    


Can you guys give some more suggestion if this all way is proper ??? Or do i need to have some more different setup for having my own TURn server ??  


Many Thanks ,

Abhisek           

Reply all
Reply to author
Forward
0 new messages