From d1dd937556cff41c04ab2d131edd51d6638e5512 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Thu, 3 Apr 2014 13:56:23 +0200 Subject: [PATCH] Ignore the jingle 'initiator' field in session-initiate messages and use the IQs 'from' field instead. --- .../impl/protocol/jabber/CallJabberImpl.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java index 39f354ebc..7aa09bafa 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java @@ -900,15 +900,15 @@ else if (conferenceIQ.getID().equals(colibri.getID())) */ public CallPeerJabberImpl processSessionInitiate(JingleIQ jingleIQ) { - String remoteParty = jingleIQ.getInitiator(); + // Use the IQs 'from', instead of the jingle 'initiator' field, + // because we want to make sure that following IQs are sent with the + // correct 'to'. + String remoteParty = jingleIQ.getFrom(); + boolean autoAnswer = false; CallPeerJabberImpl attendant = null; OperationSetBasicTelephonyJabberImpl basicTelephony = null; - //according to the Jingle spec initiator may be null. - if (remoteParty == null) - remoteParty = jingleIQ.getFrom(); - CallPeerJabberImpl callPeer = new CallPeerJabberImpl(remoteParty, this, jingleIQ); @@ -1110,8 +1110,6 @@ else if (MediaType.VIDEO.toString().equals(contentName)) * the state of the remote DTLS-SRTP endpoint * @param mediaType the MediaType of the media to be transmitted * over the DTLS-SRTP session - * @param true if DTLS-SRTP has been selected by the local peer as - * the secure transport; otherwise, false */ private boolean addDtlsAdvertisedEncryptions( CallPeerJabberImpl peer,