diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 46355354a..006923bd7 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -52,7 +52,8 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece private static final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss", Locale.ENGLISH); - private static final List JINGLE_MESSAGE_ELEMENT_NAMES = Arrays.asList("accept", "propose", "proceed", "reject", "retract"); + private static final List JINGLE_MESSAGE_ELEMENT_NAMES = + Arrays.asList("accept", "propose", "proceed", "reject", "retract", "ringing"); public MessageParser(XmppConnectionService service) { super(service); diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index b39673fa5..c2422e649 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -266,6 +266,7 @@ public class JingleConnectionManager extends AbstractConnectionManager { return; } final boolean fromSelf = from.asBareJid().equals(account.getJid().asBareJid()); + // XEP version 0.6.0 sends proceed, reject, ringing to bare jid final boolean addressedDirectly = to != null && to.equals(account.getJid()); final AbstractJingleConnection.Id id; if (fromSelf) { @@ -474,12 +475,19 @@ public class JingleConnectionManager extends AbstractConnectionManager { + " to deliver reject"); } } + } else if (addressedDirectly && "ringing".equals(message.getName())) { + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": " + from + " started ringing"); + updateProposedSessionDiscovered( + account, from, sessionId, DeviceDiscoveryState.DISCOVERED); } else { Log.d( Config.LOGTAG, account.getJid().asBareJid() - + ": retrieved out of order jingle message" - + message); + + ": retrieved out of order jingle message from " + + from + + message + + ", addressedDirectly=" + + addressedDirectly); } } diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java index 139153b4a..5530a8c78 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -1504,6 +1504,7 @@ public class JingleRtpConnection extends AbstractJingleConnection } this.message.setTime(timestamp); startRinging(); + sendJingleMessage("ringing"); } else { Log.d( Config.LOGTAG,