diff --git a/jingle/extension/build/merge/jstun.jar b/jingle/extension/build/merge/jstun.jar index b98fbfb81..1b8ac7519 100644 Binary files a/jingle/extension/build/merge/jstun.jar and b/jingle/extension/build/merge/jstun.jar differ diff --git a/jingle/extension/source/org/jivesoftware/smackx/jingle/IncomingJingleSession.java b/jingle/extension/source/org/jivesoftware/smackx/jingle/IncomingJingleSession.java index 70fd71938..018e8f951 100644 --- a/jingle/extension/source/org/jivesoftware/smackx/jingle/IncomingJingleSession.java +++ b/jingle/extension/source/org/jivesoftware/smackx/jingle/IncomingJingleSession.java @@ -454,4 +454,18 @@ public class IncomingJingleSession extends JingleSession { super.eventError(iq); } } + + public IQ sendFormattedError(JingleError error){ + IQ perror = null; + if (error != null) { + perror = createIQ(getSid(), getInitiator(), getResponder(), IQ.Type.ERROR); + + // Fill in the fields with the info from the Jingle packet + perror.addExtension(error); + + getConnection().sendPacket(perror); + System.err.println(perror.toXML()); + } + return perror; + } } diff --git a/jingle/extension/source/org/jivesoftware/smackx/jingle/OutgoingJingleSession.java b/jingle/extension/source/org/jivesoftware/smackx/jingle/OutgoingJingleSession.java index db8d4ebf1..3813fc6cd 100644 --- a/jingle/extension/source/org/jivesoftware/smackx/jingle/OutgoingJingleSession.java +++ b/jingle/extension/source/org/jivesoftware/smackx/jingle/OutgoingJingleSession.java @@ -461,4 +461,18 @@ public class OutgoingJingleSession extends JingleSession { super.eventError(iq); } } + + public IQ sendFormattedError(JingleError error) { + IQ perror = null; + if (error != null) { + perror = createIQ(getSid(), getResponder(), getInitiator(), IQ.Type.ERROR); + + // Fill in the fields with the info from the Jingle packet + perror.addExtension(error); + + getConnection().sendPacket(perror); + System.err.println(perror.toXML()); + } + return perror; + } } diff --git a/jingle/extension/source/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java b/jingle/extension/source/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java index 633baef2d..c11fb39a2 100644 --- a/jingle/extension/source/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java +++ b/jingle/extension/source/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java @@ -176,8 +176,13 @@ public class AudioChannel { ds = javax.media.Manager.createDataSource(locator); } catch (Exception e) { - e.printStackTrace(); - return "Couldn't create DataSource"; + // Try JavaSound Locator as a last resort + try { + ds = javax.media.Manager.createDataSource(new MediaLocator("javasound://")); + } + catch (Exception ee) { + return "Couldn't create DataSource"; + } } // Try to create a processor to handle the input jmf locator @@ -327,7 +332,7 @@ public class AudioChannel { SessionAddress localAddr, destAddr; InetAddress ipAddr; SendStream sendStream; - audioReceiver = new AudioReceiver(this,jingleMediaSession); + audioReceiver = new AudioReceiver(this, jingleMediaSession); int port; for (int i = 0; i < pbss.length; i++) { @@ -475,8 +480,8 @@ public class AudioChannel { try { localhost = InetAddress.getLocalHost(); - AudioChannel audioChannel0 = new AudioChannel(new MediaLocator("javasound://8000"), localhost.getHostAddress(), localhost.getHostAddress(), 7002, 7020, new AudioFormat(AudioFormat.GSM_RTP),null); - AudioChannel audioChannel1 = new AudioChannel(new MediaLocator("javasound://8000"), localhost.getHostAddress(), localhost.getHostAddress(), 7020, 7002, new AudioFormat(AudioFormat.GSM_RTP),null); + AudioChannel audioChannel0 = new AudioChannel(new MediaLocator("javasound://8000"), localhost.getHostAddress(), localhost.getHostAddress(), 7002, 7020, new AudioFormat(AudioFormat.GSM_RTP), null); + AudioChannel audioChannel1 = new AudioChannel(new MediaLocator("javasound://8000"), localhost.getHostAddress(), localhost.getHostAddress(), 7020, 7002, new AudioFormat(AudioFormat.GSM_RTP), null); audioChannel0.start(); audioChannel1.start();