Help debug Voice Chat

I am using the latest smack library 3.0.1 trying to start a voice chat between two user… I can establish the connection the sessionMediaReceived(JingleSession jingleSession, String string) get called but I can’t hear voice then about ½ minute later session closes on error. Following is the debug output any help is appreciated since no java doc yet this is becoming hard to debug Thanks,

outgoing call output

Jingle:

State: org.jivesoftware.smackx.jingle.IncomingJingleSession$Active@101ac1c

*REMOVE PACKET LISTENER

Negotiation Closed: user2@sd.yalla.com/Smack 546672187655858

9120

Can you try using Smack trunk?

Can you show me your code?

Since the negotiation is fine, we should look closelly.

Best Regards,

Thiago

Code

// call user class

package com.yalla.collaboration.voip;

import com.yalla.collaboration.client.chat.OneToOneChatController;

import org.jivesoftware.smack.XMPPException;

import org.jivesoftware.smack.util.StringUtils;

import org.jivesoftware.smackx.jingle.JingleNegotiator;

import org.jivesoftware.smackx.jingle.JingleSession;

import org.jivesoftware.smackx.jingle.OutgoingJingleSession;

import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener;

import org.jivesoftware.smackx.jingle.listeners.JingleSessionStateListener;

import org.jivesoftware.smackx.jingle.media.PayloadType;

import org.jivesoftware.smackx.jingle.nat.TransportCandidate;

import java.util.TimerTask;

/**

  • Created by IntelliJ IDEA.

  • User: yalla

  • Date: Apr 9, 2007

  • Time: 10:44:14 AM

  • To change this template use File | Settings | File Templates.

*/

public class CallUser extends VoiceChat implements JingleSessionStateListener, JingleSessionListener {

private OutgoingJingleSession jingleSession;

private boolean mediaReceived = false;

private static final long WAIT_FOR_MEDIA_DELAY = 20000;

private static java.util.Timer timer = new java.util.Timer(" Outgoing call wait for Media");

private boolean cancelMediaTimer = false;

private TimerTask mediaTimerTask;

private String responderJID;

public CallUser(OutgoingJingleSession jingleSession) {

super(StringUtils.parseBareAddress(jingleSession.getResponder()));

this.jingleSession = jingleSession;

jingleSession.addListener(this);

jingleSession.addStateListener(this);

updateStatus(“Sending voice chat invitation to”);

callAccceptButton.setEnabled(false);

responderJID = StringUtils.parseBareAddress(jingleSession.getResponder());

}

public void hangupButtonPressed() {

hangUp();

callAccceptButton.setEnabled(true);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended”);

}

public void callAccceptButtonPressed() {

hangUp();

callAccceptButton.setEnabled(false);

jingleSession = VOIPManager.getInstance().createOutgoingSession(userName);

startPhoneRing();

}

public void hangUp() {

phoneRingingAudioClip.stop();

if (jingleSession != null && !jingleSession.isClosed()) {

jingleSession.close();

jingleSession = null;

}

callAccceptButton.setEnabled(true);

}

public void beforeChange(JingleNegotiator.State state, JingleNegotiator.State state1) throws JingleNegotiator.JingleException {

if (jingleSession != null) {

if (jingleSession.getState() instanceof OutgoingJingleSession.Inviting) {

updateStatus(“Calling user. Please wait…”);

callAccceptButton.setEnabled(false);

}

}

}

public void afterChanged(JingleNegotiator.State state, JingleNegotiator.State state1) {

if (jingleSession != null) {

if (jingleSession.getState() instanceof OutgoingJingleSession.Inviting) {

updateStatus(“Calling user. Please wait…”);

callAccceptButton.setEnabled(false);

}

}

}

public void sessionEstablished(PayloadType payloadType, TransportCandidate transportCandidate, TransportCandidate transportCandidate1, JingleSession jingleSession) {

sessionEstablished = true;

mediaTimerTask = new MyTimerTask();

timer.schedule(mediaTimerTask, WAIT_FOR_MEDIA_DELAY);

stopPhoneRing();

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat Started”);

}

public void sessionDeclined(String string, JingleSession jingleSession) {

jingleSession.removeListener(this);

jingleSession.removedStateListener(this);

hangUp();

updateStatus(“User declined voice chat”);

stopPhoneRing();

}

public void sessionRedirected(String string, JingleSession jingleSession) {

}

public void sessionClosed(String string, JingleSession jingleSession) {

hangUp();

if (sessionEstablished && mediaReceived) {

updateStatus(“Chat Session Ended”);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended”);

} else {

updateStatus(“Voice chat cession ended on error”);

System.out.println(“CallUser.sessionClosed”);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended on error”);

}

jingleSession.removeListener(this);

jingleSession.removedStateListener(this);

}

public void sessionClosedOnError(XMPPException xmppException, JingleSession jingleSession) {

hangUp();

jingleSession.removeListener(this);

jingleSession.removedStateListener(this);

callAccceptButton.setEnabled(true);

updateStatus(“Voice chat session ended on error”);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended on error”);

System.out.println(“CallUser.sessionClosedOnError”);

}

public void sessionMediaReceived(JingleSession jingleSession, String string) {

mediaReceived = true;

mediaTimerTask.cancel();

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice Chat Started”);

}

class MyTimerTask extends TimerTask {

public MyTimerTask() {

}

public void run() {

if (!mediaReceived) {

if (jingleSession != null) {

try {

System.out.println(“CallUser$MyTimerTask.run”);

jingleSession.terminate(“No Media Received. This may be caused by firewall configuration problems.”);

} catch (XMPPException e) {

e.printStackTrace();

}

}

}

}

}

}

//Answer call class

package com.yalla.collaboration.voip;

import com.yalla.collaboration.client.chat.OneToOneChatController;

import org.jivesoftware.smack.XMPPException;

import org.jivesoftware.smack.util.StringUtils;

import org.jivesoftware.smackx.jingle.IncomingJingleSession;

import org.jivesoftware.smackx.jingle.JingleSession;

import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener;

import org.jivesoftware.smackx.jingle.media.PayloadType;

import org.jivesoftware.smackx.jingle.nat.TransportCandidate;

import java.util.TimerTask;

/**

  • Created by IntelliJ IDEA.

  • User: yalla

  • Date: Apr 9, 2007

  • Time: 12:59:13 PM

  • To change this template use File | Settings | File Templates.

*/

public class AnswerCall extends VoiceChat implements JingleSessionListener {

private IncomingJingleSession jingleSession;

private boolean sessionEstablished = false;

private boolean mediaReceived = false;

private static final long WAIT_FOR_MEDIA_DELAY = 20000;

private static java.util.Timer timer = new java.util.Timer(" Anwser call wait for Media");

private String initiatorJID;

private TimerTask mediaTimerTask;

public AnswerCall(IncomingJingleSession incommingJingelSession) {

super(incommingJingelSession.getInitiator());

jingleSession = incommingJingelSession;

jingleSession.addListener(this);

System.out.println(“AnswerCall.AnswerCall”);

callAccceptButton.setEnabled(true);

callAccceptButton.setText(“Answer”);

initiatorJID = StringUtils.parseBareAddress(jingleSession.getInitiator());

}

public void hangupButtonPressed() {

if (jingleSession != null) {

try {

jingleSession.terminate();

} catch (XMPPException e) {

e.printStackTrace();

}

jingleSession.removeListener(this);

}

if (jingleSession != null && sessionEstablished) {

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended”);

} else {

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call rejected”);

}

}

public void hangUp() {

phoneRingingAudioClip.stop();

if (jingleSession != null && !jingleSession.isClosed()) {

try {

jingleSession.terminate();

} catch (XMPPException e) {

e.printStackTrace();

}

jingleSession.close();

jingleSession = null;

}

callAccceptButton.setEnabled(true);

}

public void callAccceptButtonPressed() {

stopPhoneRing();

try {

jingleSession.start();

} catch (XMPPException e) {

e.printStackTrace();

}

}

public void sessionEstablished(PayloadType payloadType, TransportCandidate transportCandidate, TransportCandidate transportCandidate1, JingleSession jingleSession) {

sessionEstablished = true;

mediaTimerTask = new MyTimerTask();

timer.schedule(mediaTimerTask, WAIT_FOR_MEDIA_DELAY);

}

public void sessionDeclined(String string, JingleSession jingleSession) {

if (phoneRingingAudioClip != null) {

stopPhoneRing();

}

jingleSession.removeListener(this);

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“User declined call”);

}

public void sessionRedirected(String string, JingleSession jingleSession) {

//To change body of implemented methods use File | Settings | File Templates.

}

public void sessionClosed(String string, JingleSession jingleSession) {

if (sessionEstablished && mediaReceived) {

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended”);

} else {

if (phoneRingingAudioClip != null) {

stopPhoneRing();

}

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended on error”);

}

jingleSession.removeListener(this);

}

public void sessionClosedOnError(XMPPException xmppException, JingleSession jingleSession) {

if (phoneRingingAudioClip != null) {

stopPhoneRing();

}

jingleSession.removeListener(this);

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended on error”);

}

public void sessionMediaReceived(JingleSession jingleSession, String string) {

mediaReceived = true;

mediaTimerTask.cancel();

}

class MyTimerTask extends TimerTask {

public MyTimerTask() {

}

public void run() {

if (!mediaReceived) {

if (jingleSession != null) {

try {

jingleSession.terminate(“No Media Received. This may be caused by firewall configuration problems.”);

} catch (XMPPException e) {

e.printStackTrace();

}

}

}

}

}

}

code

// call user class

package com.yalla.collaboration.voip;

import com.yalla.collaboration.client.chat.OneToOneChatController;

import org.jivesoftware.smack.XMPPException;

import org.jivesoftware.smack.util.StringUtils;

import org.jivesoftware.smackx.jingle.JingleNegotiator;

import org.jivesoftware.smackx.jingle.JingleSession;

import org.jivesoftware.smackx.jingle.OutgoingJingleSession;

import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener;

import org.jivesoftware.smackx.jingle.listeners.JingleSessionStateListener;

import org.jivesoftware.smackx.jingle.media.PayloadType;

import org.jivesoftware.smackx.jingle.nat.TransportCandidate;

import java.util.TimerTask;

/**

  • Created by IntelliJ IDEA.

  • User: yalla

  • Date: Apr 9, 2007

  • Time: 10:44:14 AM

  • To change this template use File | Settings | File Templates.

*/

public class CallUser extends VoiceChat implements JingleSessionStateListener, JingleSessionListener {

private OutgoingJingleSession jingleSession;

private boolean mediaReceived = false;

private static final long WAIT_FOR_MEDIA_DELAY = 20000;

private static java.util.Timer timer = new java.util.Timer(" Outgoing call wait for Media");

private boolean cancelMediaTimer = false;

private TimerTask mediaTimerTask;

private String responderJID;

public CallUser(OutgoingJingleSession jingleSession) {

super(StringUtils.parseBareAddress(jingleSession.getResponder()));

this.jingleSession = jingleSession;

jingleSession.addListener(this);

jingleSession.addStateListener(this);

updateStatus(“Sending voice chat invitation to”);

callAccceptButton.setEnabled(false);

responderJID = StringUtils.parseBareAddress(jingleSession.getResponder());

}

public void hangupButtonPressed() {

hangUp();

callAccceptButton.setEnabled(true);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended”);

}

public void callAccceptButtonPressed() {

hangUp();

callAccceptButton.setEnabled(false);

jingleSession = VOIPManager.getInstance().createOutgoingSession(userName);

startPhoneRing();

}

public void hangUp() {

phoneRingingAudioClip.stop();

if (jingleSession != null && !jingleSession.isClosed()) {

jingleSession.close();

jingleSession = null;

}

callAccceptButton.setEnabled(true);

}

public void beforeChange(JingleNegotiator.State state, JingleNegotiator.State state1) throws JingleNegotiator.JingleException {

if (jingleSession != null) {

if (jingleSession.getState() instanceof OutgoingJingleSession.Inviting) {

updateStatus(“Calling user. Please wait…”);

callAccceptButton.setEnabled(false);

}

}

}

public void afterChanged(JingleNegotiator.State state, JingleNegotiator.State state1) {

if (jingleSession != null) {

if (jingleSession.getState() instanceof OutgoingJingleSession.Inviting) {

updateStatus(“Calling user. Please wait…”);

callAccceptButton.setEnabled(false);

}

}

}

public void sessionEstablished(PayloadType payloadType, TransportCandidate transportCandidate, TransportCandidate transportCandidate1, JingleSession jingleSession) {

sessionEstablished = true;

mediaTimerTask = new MyTimerTask();

timer.schedule(mediaTimerTask, WAIT_FOR_MEDIA_DELAY);

stopPhoneRing();

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat Started”);

}

public void sessionDeclined(String string, JingleSession jingleSession) {

jingleSession.removeListener(this);

jingleSession.removedStateListener(this);

hangUp();

updateStatus(“User declined voice chat”);

stopPhoneRing();

}

public void sessionRedirected(String string, JingleSession jingleSession) {

}

public void sessionClosed(String string, JingleSession jingleSession) {

hangUp();

if (sessionEstablished && mediaReceived) {

updateStatus(“Chat Session Ended”);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended”);

} else {

updateStatus(“Voice chat cession ended on error”);

System.out.println(“CallUser.sessionClosed”);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended on error”);

}

jingleSession.removeListener(this);

jingleSession.removedStateListener(this);

}

public void sessionClosedOnError(XMPPException xmppException, JingleSession jingleSession) {

hangUp();

jingleSession.removeListener(this);

jingleSession.removedStateListener(this);

callAccceptButton.setEnabled(true);

updateStatus(“Voice chat session ended on error”);

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice chat ended on error”);

System.out.println(“CallUser.sessionClosedOnError”);

}

public void sessionMediaReceived(JingleSession jingleSession, String string) {

mediaReceived = true;

mediaTimerTask.cancel();

OneToOneChatController.getInstance().getChatSession(responderJID).insertMessage (“Voice Chat Started”);

}

class MyTimerTask extends TimerTask {

public MyTimerTask() {

}

public void run() {

if (!mediaReceived) {

if (jingleSession != null) {

try {

System.out.println(“CallUser$MyTimerTask.run”);

jingleSession.terminate(“No Media Received. This may be caused by firewall configuration problems.”);

} catch (XMPPException e) {

e.printStackTrace();

}

}

}

}

}

}

// answer call class

package com.yalla.collaboration.voip;

import com.yalla.collaboration.client.chat.OneToOneChatController;

import org.jivesoftware.smack.XMPPException;

import org.jivesoftware.smack.util.StringUtils;

import org.jivesoftware.smackx.jingle.IncomingJingleSession;

import org.jivesoftware.smackx.jingle.JingleSession;

import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener;

import org.jivesoftware.smackx.jingle.media.PayloadType;

import org.jivesoftware.smackx.jingle.nat.TransportCandidate;

import java.util.TimerTask;

/**

  • Created by IntelliJ IDEA.

  • User: yalla

  • Date: Apr 9, 2007

  • Time: 12:59:13 PM

  • To change this template use File | Settings | File Templates.

*/

public class AnswerCall extends VoiceChat implements JingleSessionListener {

private IncomingJingleSession jingleSession;

private boolean sessionEstablished = false;

private boolean mediaReceived = false;

private static final long WAIT_FOR_MEDIA_DELAY = 20000;

private static java.util.Timer timer = new java.util.Timer(" Anwser call wait for Media");

private String initiatorJID;

private TimerTask mediaTimerTask;

public AnswerCall(IncomingJingleSession incommingJingelSession) {

super(incommingJingelSession.getInitiator());

jingleSession = incommingJingelSession;

jingleSession.addListener(this);

System.out.println(“AnswerCall.AnswerCall”);

callAccceptButton.setEnabled(true);

callAccceptButton.setText(“Answer”);

initiatorJID = StringUtils.parseBareAddress(jingleSession.getInitiator());

}

public void hangupButtonPressed() {

if (jingleSession != null) {

try {

jingleSession.terminate();

} catch (XMPPException e) {

e.printStackTrace();

}

jingleSession.removeListener(this);

}

if (jingleSession != null && sessionEstablished) {

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended”);

} else {

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call rejected”);

}

}

public void hangUp() {

phoneRingingAudioClip.stop();

if (jingleSession != null && !jingleSession.isClosed()) {

try {

jingleSession.terminate();

} catch (XMPPException e) {

e.printStackTrace();

}

jingleSession.close();

jingleSession = null;

}

callAccceptButton.setEnabled(true);

}

public void callAccceptButtonPressed() {

stopPhoneRing();

try {

jingleSession.start();

} catch (XMPPException e) {

e.printStackTrace();

}

}

public void sessionEstablished(PayloadType payloadType, TransportCandidate transportCandidate, TransportCandidate transportCandidate1, JingleSession jingleSession) {

sessionEstablished = true;

mediaTimerTask = new MyTimerTask();

timer.schedule(mediaTimerTask, WAIT_FOR_MEDIA_DELAY);

}

public void sessionDeclined(String string, JingleSession jingleSession) {

if (phoneRingingAudioClip != null) {

stopPhoneRing();

}

jingleSession.removeListener(this);

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“User declined call”);

}

public void sessionRedirected(String string, JingleSession jingleSession) {

//To change body of implemented methods use File | Settings | File Templates.

}

public void sessionClosed(String string, JingleSession jingleSession) {

if (sessionEstablished && mediaReceived) {

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended”);

} else {

if (phoneRingingAudioClip != null) {

stopPhoneRing();

}

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended on error”);

}

jingleSession.removeListener(this);

}

public void sessionClosedOnError(XMPPException xmppException, JingleSession jingleSession) {

if (phoneRingingAudioClip != null) {

stopPhoneRing();

}

jingleSession.removeListener(this);

OneToOneChatController.getInstance().getChatSession(initiatorJID).insertMessage (“Call ended on error”);

}

public void sessionMediaReceived(JingleSession jingleSession, String string) {

mediaReceived = true;

mediaTimerTask.cancel();

}

class MyTimerTask extends TimerTask {

public MyTimerTask() {

}

public void run() {

if (!mediaReceived) {

if (jingleSession != null) {

try {

jingleSession.terminate(“No Media Received. This may be caused by firewall configuration problems.”);

} catch (XMPPException e) {

e.printStackTrace();

}

}

}

}

}

}

The error is in your Timer Task.

That is an advanced code.

You should Try the Demo Class inside Smack-JIngle code At first.

Then you can add new and advanced stuff.

Cheers,

Thiago

Took out the timer still no voice my session stay alive but no voice. If i a call Spark client from my client (user using my client calling a user using spark) the session time out on the spark side with an error message Voice chat ended No media received caused by firewall configuration problem… however when i use 2 spark client(user 1 on spark and user 2 on spark) no problem voice chat work.

Thanks

I try the demo class calling a user using spark client session end with error no media received … due to firewall configuration… but if 2 users each using spark client no problem i can establish voice chat session fine. using my client or the demo class i get the same behavior voice only work if i use the spark clients

Thanks

Hi! I’m also having a problem with smack to spark media connection.

here is the application logs:

Calling out : tony@workshop-1/spark

C: /192.168.2.99|/192.168.2.99 p:2195

Listening for ECHO: 192.168.2.99:12462

Service listing

Initializing…Resolved

UpdatePacketListener

Jingle: <iq id=“PiYp3-90” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8205790867075637949”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 8205790867075637949|2260848889786909314 :<iq id=“PiYp3-90” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8205790867075637949”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-91” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“3671949127246066950”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 3671949127246066950|2260848889786909314 :<iq id=“PiYp3-91” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“3671949127246066950”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-92” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“2013889213747900712”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 2013889213747900712|2260848889786909314 :<iq id=“PiYp3-92” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“2013889213747900712”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-93” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8820575663658911495”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 8820575663658911495|2260848889786909314 :<iq id=“PiYp3-93” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8820575663658911495”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-94” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“4395595170567107237”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 4395595170567107237|2260848889786909314 :<iq id=“PiYp3-94” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“4395595170567107237”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-95” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8205790867075637949”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 8205790867075637949|2260848889786909314 :<iq id=“PiYp3-95” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8205790867075637949”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-97” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“3671949127246066950”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 3671949127246066950|2260848889786909314 :<iq id=“PiYp3-97” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“3671949127246066950”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-98” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“2013889213747900712”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 2013889213747900712|2260848889786909314 :<iq id=“PiYp3-98” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“2013889213747900712”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-99” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8820575663658911495”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 8820575663658911495|2260848889786909314 :<iq id=“PiYp3-99” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“8820575663658911495”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-100” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“4395595170567107237”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

Ignored Jingle(SID) 4395595170567107237|2260848889786909314 :<iq id=“PiYp3-100” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“4395595170567107237”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

available (Available)

Jingle: <iq id=“PiYp3-102” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“2260848889786909314”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.114” port=“13012” network=“0” username=“1” password=“8054089397227719215” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

0

Content Received: 8054089397227719215;192.168.2.114:13012

Result OK:192.168.2.114:13012

RESULT>>>OK:192.168.2.114:13012

Jingle: <iq id=“PiYp3-103” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-info” sid=“2260848889786909314”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“122.52.96.34” port=“15918” network=“1” username=“1” password=“8969944291631885606” preference=“1103” type=“srflx”/></transport></content></jingle></iq>

0

Jingle: <iq id=“PiYp3-101” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“description-info” sid=“2260848889786909314”><content name=‘Audio-Content’><description xmlns=“http://jabber.org/protocol/jingle/description/audio” ><payload-type id=“3” name=“gsm” channels=“1” clockrate=“0” /><payload-type id=“4” name=“g723” channels=“1” clockrate=“0” /><payload-type id=“0” name=“PCMU” channels=“1” clockrate=“16000” /><payload-type id=“15” name=“speex” channels=“1” clockrate=“0” /></description></content></jingle></iq>

Content Received: 8054089397227719215;192.168.2.114:13012

Result OK:192.168.2.114:13012

RESULT>>>OK:192.168.2.114:13012

Content Received: 4390923887125088907;192.168.2.114:13012

Result Wrong Data:192.168.2.114:13012

Jingle: <iq id=“PiYp3-104” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“content-accept” sid=“2260848889786909314”><content name=‘Audio-Content’><description xmlns=“http://jabber.org/protocol/jingle/description/audio” ><payload-type id=“3” name=“gsm” channels=“1” clockrate=“0” /></description></content></jingle></iq>

BS:gsm

Content Received: 8054089397227719215;192.168.2.114:13012

Result OK:192.168.2.114:13012

RESULT>>>OK:192.168.2.114:13012

Content Received: 8054089397227719215;192.168.2.114:13012

Result OK:192.168.2.114:13012

RESULT>>>OK:192.168.2.114:13012

Content Received: 4390923887125088907;192.168.2.114:13012

Result Wrong Data:192.168.2.114:13012

ADDED Valid Cand: 192.168.2.114:13012

1

2

Jingle: <iq id=“PiYp3-105” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“session-accept” sid=“2260848889786909314”><content name=‘Audio-Content’><description xmlns=“http://jabber.org/protocol/jingle/description/audio” ><payload-type id=“3” name=“gsm” channels=“1” clockrate=“0” /></description><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.99” port=“12462” network=“0” username=“1” password=“4390923887125088907” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Jingle: <iq id=“PiYp3-106” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“transport-accept” sid=“2260848889786909314”><content name=‘Audio-Content’><transport xmlns=“http://jabber.org/protocol/jingle/transport/ice” ><candidate generation=“1” ip=“192.168.2.99” port=“12462” network=“0” username=“1” password=“4390923887125088907” preference=“2195” type=“prflx”/></transport></content></jingle></iq>

Cand: 192.168.2.99

SET ACTIVE

Transport stabilished

triggerTransportEstablished 192.168.2.99:12462|192.168.2.114:13012

3

4

5

6

7

8

9

Jingle: <iq id=“PiYp3-107” to=“tarugsikpark@workshop-1/Smack” from=“tony@workshop-1/spark” type=“set”><jingle xmlns=“http://jabber.org/protocol/jingle” initiator=“tarugsikpark@workshop-1/Smack” responder=“tony@workshop-1/spark” action=“session-terminate” sid=“2260848889786909314”><content name=‘Audio-Content’></content></jingle></iq>

REMOVE PACKET LISTENER

Negotiation Closed: tarugsikpark@workshop-1/Smack 2260848889786909314

What happen is, I’ve tried to initiate thru the Smack API demo to call on the spark messenger when I accept the voice chat thru spark messenger there is where i got Negotation closed.

Thanks

Any body could please add a working source code for Voice chat using smack jingle API. any body here use it with google talk voice chat?? please share your experience with us… thanks all.

Hi,

Did you get the error sorted out?

From your code, it looks like you are pretty comfortable with the jingle library.

I was wondering whether it would be possible for you to send me a few pointers related to the usage of the jingle

library. I have gone thru the demo file but that doesn’t work and I can understand much.

If you could send a small explanation of how exactly a voice call is setup and handled between 2 clients,

it would be much obliged.

Cheers,

Earlence