aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java27
1 files changed, 26 insertions, 1 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 f62677e..ecec5c5 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/UriHandlerSipImpl.java
@@ -405,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)
{