AnsweredAssumed Answered

How to create video or phone call with Smack 4.2?

Question asked by Yael on Oct 12, 2016
Latest reply on May 3, 2017 by Tarek

When I try to create an instance ICETransportManager I get the following error.

 

java.net.BindException: Can not assign address Requested: Can not bind

at java.net.DualStackPlainDatagramSocketImpl.socketBind (Native Method)

at java.net.DualStackPlainDatagramSocketImpl.bind0 (Unknown Source)

at java.net.AbstractPlainDatagramSocketImpl.bind (Unknown Source)

at java.net.DatagramSocket.bind (Unknown Source)

at java.net.DatagramSocket. <init> (Unknown Source)

at java.net.DatagramSocket. <init> (Unknown Source)

at de.javawi.jstun.test.demo.ice.Candidate. <init> (Candidate.java:35)

at de.javawi.jstun.test.demo.ice.ICENegociator.gatherCandidateAddresses (ICENegociator.java:83)

at org.jivesoftware.smackx.jingle.nat.ICEResolver.initialize (ICEResolver.java:78)

at org.jivesoftware.smackx.jingle.nat.TransportResolver.initializeAndWait (TransportResolver.java:362)

at org.jivesoftware.smackx.jingle.nat.ICETransportManager. <init> (ICETransportManager.java:35)

at Model.Main.main (Main.java:39)

Exception in thread "main" java.lang.NoClassDefFoundError: org / Jive Software / smack / RosterListener

at Model.Main.main (Main.java:43)

Caused by: java.lang.ClassNotFoundException: org.jivesoftware.smack.RosterListener

at java.net.URLClassLoader.findClass (Unknown Source)

at java.lang.ClassLoader.loadClass (Unknown Source)

sun.misc.Launcher at $ AppClassLoader.loadClass (Unknown Source)

at java.lang.ClassLoader.loadClass (Unknown Source)

... 1 more

 

 

 

 

My code:

ICETransportManager transport = new ICETransportManager (mConnection, "stunserver.org", 3478);

MultiMediaManager average = new MultiMediaManager (transport);

ArrayList <JingleMediaManager> list = new ArrayList <JingleMediaManager> ();

list.add (average);

JingleManager manager = new JingleManager (mConnection, list);

JingleManager.setJingleServiceEnabled ();

Outcomes