aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
diff options
context:
space:
mode:
authorSebastien Vincent <seb@jitsi.org>2011-10-20 11:48:50 +0000
committerSebastien Vincent <seb@jitsi.org>2011-10-20 11:48:50 +0000
commit9c23f553ec5c98cc2c2ead4d201c0e888b4e9706 (patch)
tree012f1d8d17f3f405c251e42d113f167499524482 /src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
parent8c494d3b5113e5a8fe1c2d078a28d3b28995dd57 (diff)
downloadjitsi-9c23f553ec5c98cc2c2ead4d201c0e888b4e9706.zip
jitsi-9c23f553ec5c98cc2c2ead4d201c0e888b4e9706.tar.gz
jitsi-9c23f553ec5c98cc2c2ead4d201c0e888b4e9706.tar.bz2
Fixes jabber 'ext' supported features (i.e. a Gmail or android without support of Gingle appears with suppported audio/video capabilities). Also verify the callee address belongs to our contact list and notify associated error message rather than 'contact does not support Jingle or Google Talk' (this does not apply for Google Voice or for Gtalk bypass caps domain calls).
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
index 17ee715..8be4fdb 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
@@ -272,6 +272,14 @@ public class OperationSetBasicTelephonyJabberImpl
calleeAddress += serviceName;
}
+ AccountID accountID = getProtocolProvider().getAccountID();
+ String bypassDomain = accountID.getAccountPropertyString(
+ "TELEPHONY_BYPASS_GTALK_CAPS");
+
+ boolean alwaysCallGtalk = ((bypassDomain != null) &&
+ bypassDomain.equals(calleeAddress.substring(
+ calleeAddress.indexOf('@') + 1))) || isGoogleVoice;
+
// we determine on which resource the remote user is connected if the
// resource isn't already provided
String fullCalleeURI = null;
@@ -279,9 +287,18 @@ public class OperationSetBasicTelephonyJabberImpl
DiscoverInfo di = null;
int bestPriority = -1;
+ if(!getProtocolProvider().getConnection().getRoster().contains(
+ calleeAddress) && !alwaysCallGtalk)
+ {
+ throw new OperationFailedException(
+ calleeAddress + " does not belong to our contact list",
+ OperationFailedException.NOT_FOUND);
+ }
+
Iterator<Presence> it =
getProtocolProvider().getConnection().getRoster().getPresences(
calleeAddress);
+
String calleeURI = null;
boolean isGingle = false;
String gingleURI = null;
@@ -325,14 +342,6 @@ public class OperationSetBasicTelephonyJabberImpl
}
else
{
- AccountID accountID = getProtocolProvider().getAccountID();
- String bypassDomain = accountID.getAccountPropertyString(
- "TELEPHONY_BYPASS_GTALK_CAPS");
-
- boolean alwaysCallGtalk = ((bypassDomain != null) &&
- bypassDomain.equals(calleeAddress.substring(
- calleeAddress.indexOf('@') + 1))) || isGoogleVoice;
-
// test GTALK property
if(!protocolProvider.isGTalkTesting() && !alwaysCallGtalk)
{