diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-03-11 22:15:03 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-03-11 22:15:03 +0100 |
commit | 85901329b0794b136b96bf745f4ab1572806fc89 (patch) | |
tree | f23da7e97cae727f39d825f0fef8348cffb238e4 /src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java | |
parent | 3db2e44f186c59429901b2c899e139ea60117a55 (diff) | |
parent | cf5da997da8820b4050f5b87ee9440a0ede36d1f (diff) | |
download | jitsi-85901329b0794b136b96bf745f4ab1572806fc89.zip jitsi-85901329b0794b136b96bf745f4ab1572806fc89.tar.gz jitsi-85901329b0794b136b96bf745f4ab1572806fc89.tar.bz2 |
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java index 885455a..ecec5c5 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java @@ -351,7 +351,11 @@ public class UriHandlerSipImpl // Even if not registered after the timeout, try the call // anyway and the error popup will appear to ask the // user if they want to register - handleUri(uri, provider); + if(provider.getRegistrationState() + != RegistrationState.REGISTERED) + { + handleUri(uri, provider); + } } }, initialRegistrationTimeout); } @@ -401,9 +405,34 @@ public class UriHandlerSipImpl OperationSetBasicTelephony<?> telephonyOpSet = provider.getOperationSet(OperationSetBasicTelephony.class); + OperationSetVideoTelephony videoTelephonyOpSet + = provider.getOperationSet(OperationSetVideoTelephony.class); + + boolean videoCall = false; + if(videoTelephonyOpSet != null + && uri.contains("?")) + { + String params = uri.substring(uri.indexOf('?') + 1); + uri = uri.substring(0, uri.indexOf('?')); + + StringTokenizer paramTokens = new StringTokenizer(params, "&"); + while(paramTokens.hasMoreTokens()) + { + String tok = paramTokens.nextToken(); + String[] keyValue = tok.split("\\="); + if (keyValue.length == 2 + && keyValue[0].equalsIgnoreCase("video") + && keyValue[1].equalsIgnoreCase("true")) + videoCall = true; + } + } + try { - telephonyOpSet.createCall(uri); + if(videoCall) + videoTelephonyOpSet.createVideoCall(uri); + else + telephonyOpSet.createCall(uri); } catch (OperationFailedException exc) { |