[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/sip/

emcho at dev.java.net emcho at dev.java.net
Wed May 26 11:09:18 CEST 2004


User: emcho   
Date: 04/05/26 02:09:18

Modified:
 /sip-communicator/src/net/java/sip/communicator/sip/
  CallProcessing.java

Log:
 Ongoing work on simple

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/sip/
===============================================================

File [changed]: CallProcessing.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/sip/CallProcessing.java?r1=1.9&r2=1.10
Delta lines:  +31 -0
--------------------
--- CallProcessing.java	13 Apr 2004 23:30:19 -0000	1.9
+++ CallProcessing.java	26 May 2004 09:09:15 -0000	1.10
@@ -718,6 +718,37 @@
             console.logEntry();
 
             callee = callee.trim();
+            //Remove excessive characters from phone numbers such as ' ','(',')','-'
+            String excessiveChars = Utils.getProperty("net.java.sip.communicator.sip.EXCESSIVE_URI_CHARACTERS");
+
+
+            //---------------------------------------------------------------------------
+            //un ugly hack to override old xml configurations (todo: remove at some point)
+            //define excessive chars for sipphone.com users
+            String isSipphone = Utils.getProperty("net.java.sip.communicator.sipphone.IS_RUNNING_SIPPHONE");
+            if(excessiveChars == null && isSipphone != null && isSipphone.equalsIgnoreCase("true"))
+            {
+                excessiveChars = "( )-";
+                PropertiesDepot.setProperty("net.java.sip.communicator.sip.EXCESSIVE_URI_CHARACTERS", excessiveChars);
+                PropertiesDepot.storeProperties();
+            }
+            //---------------------------------------------------------------------------
+
+
+            if(excessiveChars != null )
+            {
+                StringBuffer calleeBuff = new StringBuffer(callee);
+                for(int i = 0; i < excessiveChars.length(); i++)
+                {
+                    String charToDeleteStr = excessiveChars.substring(i, i+1);
+
+                    int charIndex = -1;
+                    while( (charIndex = calleeBuff.indexOf(charToDeleteStr)) != -1)
+                        calleeBuff.delete(charIndex, charIndex + 1);
+                }
+                callee = calleeBuff.toString();
+            }
+
             //Handle default domain name (i.e. transform 1234 -> 1234 at sip.com
             String defaultDomainName =
                 Utils.getProperty("net.java.sip.communicator.sip.DEFAULT_DOMAIN_NAME");




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net




More information about the commits mailing list