[jitsi-dev] Ice4J only working on intranet


#1

Hi,
  (I have posted my question on
http://stackoverflow.com/questions/29416248/ice4j-gets-only-local-ip for
readability.)

  I have it connecting over the local intranet fine, but of course the
point is outside of my router and I am having issues. I don't think I see
public IP addresses in the list is the issue. Harvesting mistake?

SDP information generated by
https://github.com/opentelecoms-org/ice4j/blob/master/test/test/SdpUtils.java
My SDP information is as follows (10.0.0.2 is local):

v=0
o=ice4j.org 0 0 IN IP4 10.0.0.2
s=-
t=0 0
a=ice-options:trickle
a=ice-ufrag:p73m19hsdn0p1
a=ice-pwd:7ncie1rvhplre9k0glhfkdqh8i
m=video 6032 RTP/AVP 0
c=IN 10.0.0.2 IP4
a=mid:video
a=candidate:1 1 udp 2130706431 fe80::fa8f:caff:fe12:da20 6032 typ host
a=candidate:2 1 udp 2130706431 10.0.0.2 6032 typ host
a=candidate:1 2 udp 2130706430 fe80::fa8f:caff:fe12:da20 6033 typ host
a=candidate:2 2 udp 2130706430 10.0.0.2 6033 typ host
m=audio 6034 RTP/AVP 0
c=IN 10.0.0.2 IP4
a=mid:audio
a=candidate:1 1 udp 2130706431 fe80::fa8f:caff:fe12:da20 6034 typ host
a=candidate:2 1 udp 2130706431 10.0.0.2 6034 typ host
a=candidate:1 2 udp 2130706430 fe80::fa8f:caff:fe12:da20 6035 typ host
a=candidate:2 2 udp 2130706430 10.0.0.2 6035 typ host

My code each stream I add a harvester (not sure if that is right):

public void createStream( String name ) throws BindException,
IllegalArgumentException, IOException {

IceMediaStream stream = agent.createMediaStream(name);

int rtpPort = getStreamPort();

Thread t = new Thread(){

            @Override

            public void run(){

                StunCandidateHarvester stunHarv = new
StunCandidateHarvester(

                        new TransportAddress("sip-communicator.net",

                                rtpPort, Transport.UDP));

                StunCandidateHarvester stun6Harv = new
StunCandidateHarvester(

                        new TransportAddress("ipv6.sip-communicator.net",

                                rtpPort, Transport.UDP));

                agent.addCandidateHarvester(stunHarv);

                agent.addCandidateHarvester(stun6Harv);

                String[] hostnames = new String[] {

                        "jitsi.org",

                        "numb.viagenie.ca",

                        "stun01.sipphone.com",

                        "stun.ekiga.net",

                        "stun.fwdnet.net",

                        "stun.ideasip.com",

                        "stun.iptel.org",

                        "stun.rixtelecom.se",

                        "stun.schlund.de",

                        "stun.l.google.com:19302",

                        "stun1.l.google.com:19302",

                        "stun2.l.google.com:19302",

                        "stun3.l.google.com:19302",

                        "stun4.l.google.com:19302",

                        "stunserver.org",

                        "stun.softjoys.com",

                        "stun.voiparound.com",

                        "stun.voipbuster.com",

                        "stun.voipstunt.com",

                        "stun.voxgratia.org",

                        "stun.xten.com",};

                LongTermCredential longTermCredential = new
LongTermCredential("guest", "anon");

                for (String hostname : hostnames)

                    agent.addCandidateHarvester(new TurnCandidateHarvester(
new TransportAddress(hostname, rtpPort, Transport.UDP), longTermCredential
));

            }

        };

        t.start();

agent.createComponent(stream, Transport.UDP, rtpPort, rtpPort, rtpPort+100);

agent.createComponent(stream, Transport.UDP, rtpPort+1, rtpPort+1, rtpPort
+101);

}

Any thoughts? Due to readability I have posted this on stack overflow as
well.


#2

Hey there,

You don't seem to be adding any valid STUN servers. The ones that you
do add don't have any STUN on them.

Emil

···

On Thu, Apr 2, 2015 at 6:05 PM, m j <msj242@gmail.com> wrote:

Hi,
  (I have posted my question on
http://stackoverflow.com/questions/29416248/ice4j-gets-only-local-ip for
readability.)

  I have it connecting over the local intranet fine, but of course the point
is outside of my router and I am having issues. I don't think I see public
IP addresses in the list is the issue. Harvesting mistake?

SDP information generated by
https://github.com/opentelecoms-org/ice4j/blob/master/test/test/SdpUtils.java
My SDP information is as follows (10.0.0.2 is local):

v=0
o=ice4j.org 0 0 IN IP4 10.0.0.2
s=-
t=0 0
a=ice-options:trickle
a=ice-ufrag:p73m19hsdn0p1
a=ice-pwd:7ncie1rvhplre9k0glhfkdqh8i
m=video 6032 RTP/AVP 0
c=IN 10.0.0.2 IP4
a=mid:video
a=candidate:1 1 udp 2130706431 fe80::fa8f:caff:fe12:da20 6032 typ host
a=candidate:2 1 udp 2130706431 10.0.0.2 6032 typ host
a=candidate:1 2 udp 2130706430 fe80::fa8f:caff:fe12:da20 6033 typ host
a=candidate:2 2 udp 2130706430 10.0.0.2 6033 typ host
m=audio 6034 RTP/AVP 0
c=IN 10.0.0.2 IP4
a=mid:audio
a=candidate:1 1 udp 2130706431 fe80::fa8f:caff:fe12:da20 6034 typ host
a=candidate:2 1 udp 2130706431 10.0.0.2 6034 typ host
a=candidate:1 2 udp 2130706430 fe80::fa8f:caff:fe12:da20 6035 typ host
a=candidate:2 2 udp 2130706430 10.0.0.2 6035 typ host

My code each stream I add a harvester (not sure if that is right):

public void createStream( String name ) throws BindException,
IllegalArgumentException, IOException {

IceMediaStream stream = agent.createMediaStream(name);

int rtpPort = getStreamPort();

Thread t = new Thread(){

            @Override

            public void run(){

                StunCandidateHarvester stunHarv = new
StunCandidateHarvester(

                        new TransportAddress("sip-communicator.net",

                                rtpPort, Transport.UDP));

                StunCandidateHarvester stun6Harv = new
StunCandidateHarvester(

                        new TransportAddress("ipv6.sip-communicator.net",

                                rtpPort, Transport.UDP));

                agent.addCandidateHarvester(stunHarv);

                agent.addCandidateHarvester(stun6Harv);

                String[] hostnames = new String[] {

                        "jitsi.org",

                        "numb.viagenie.ca",

                        "stun01.sipphone.com",

                        "stun.ekiga.net",

                        "stun.fwdnet.net",

                        "stun.ideasip.com",

                        "stun.iptel.org",

                        "stun.rixtelecom.se",

                        "stun.schlund.de",

                        "stun.l.google.com:19302",

                        "stun1.l.google.com:19302",

                        "stun2.l.google.com:19302",

                        "stun3.l.google.com:19302",

                        "stun4.l.google.com:19302",

                        "stunserver.org",

                        "stun.softjoys.com",

                        "stun.voiparound.com",

                        "stun.voipbuster.com",

                        "stun.voipstunt.com",

                        "stun.voxgratia.org",

                        "stun.xten.com",};

                LongTermCredential longTermCredential = new
LongTermCredential("guest", "anon");

                for (String hostname : hostnames)

                    agent.addCandidateHarvester(new
TurnCandidateHarvester(new TransportAddress(hostname, rtpPort,
Transport.UDP), longTermCredential));

            }

        };

        t.start();

agent.createComponent(stream, Transport.UDP, rtpPort, rtpPort, rtpPort+100);

agent.createComponent(stream, Transport.UDP, rtpPort+1, rtpPort+1,
rtpPort+101);

}

Any thoughts? Due to readability I have posted this on stack overflow as
well.

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
https://jitsi.org