Skip to content
No description or website provided.
Java Shell
Find file
Latest commit eb55078 May 21, 2015 @oscarsj oscarsj Formatting readme
Failed to load latest commit information.
.gitignore Added gradle build support. Jul 17, 2013
build.gradle Loading more dependencies from Maven Central. Jul 26, 2013 Added support for encryption/crypto elements. Jul 22, 2013


The project started as a java port of the sdpToJingle project. At the moment it is a lot more RFC compliant than its JS counterpart. The intention is to create a library that is able to convert SDP into Jingle messages.

This will come in handy if you want to use Jingle as a signaling layer when using WebRTC with PeerConnection


Using the library is pretty easy, just have a look at the tests.

WebRTC example

Sending the SDP offer created by the PeerConnection class.

// The SDP offer as created by the PeerConnection class.
SessionDescription.description sdp;

// Generate the Jingle IQ based on the offer.
JingleIQ jingleIq = SdpToJingle.jingleFromSdp(sdp);
// Update to, from and action fields.

// Send the IQ.

Sending the ICE candidates created by the PeerConnection class.

List<String> iceCandidateList;
String sid = "[YourJingleSessionId]";
String mediaName = "[NameToUseInContentTag]";

JingleIQ jingleIq = SdpToJingle.transportInfoFromSdpStub(iceCandidateList, sid, mediaName);
// Update to and from.

// Send the IQ.

Parsing an SDP offer received from Jingle. (This is assuming you've already created your PeerConnection instance that is ready to be used as well as a ready to use answer SdpObserver object.)

// Convert Jingle to SDP.
String sdpString = SdpToJingle.sdpFromJingle(jingleIq).toString();

// Wrap in a SessionDescription object.
SessionDescription.Type sdpType = SessionDescription.Type.OFFER;
SessionDescription sdp = new SessionDescription(sdpType, sdpString);

// Set as remote description.
peerConnection.setRemoteDescription(answerSdpObserver, sdp);

Parsing an ICE candidate received from Jingle. (This is assuming you've already created your PeerConnection instance and it is ready to be used.)

// Convert Jingle to SDP.
CandidatePacketExtension iceCandidate;
String sdpLine = SdpToJingle.iceCandidateLineFromJingle(iceCandidate);

// Wrap in an IceCandidate object.
IceCandidate webrtcIceCandidate = new IceCandidate("audio", 0, sdpLine);

// Add to PeerConnection.

Credits & Contact

sdp-to-jingle-java was created by Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter @tuentieng.


sdp-to-jingle-java is available under the Apache License, Version 2.0. See LICENSE file for more info.

Something went wrong with that request. Please try again.