Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/Plugin.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/Plugin.java	(revision 1014)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/Plugin.java	(revision 1128)
@@ -78,8 +78,6 @@
 	public final static String ABOUT = "by E.S. de Boer";
 	
-	
 	public static void init(final Backend backend)
     {
-		
 		backend.getMain().addToOnlineRosterMenu(I18N.gettext("filetransfer.Transfer_File")+ "...",new RosterMenuListener()
 		{
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/xhtml/Plugin.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/xhtml/Plugin.java	(revision 1014)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/xhtml/Plugin.java	(revision 1128)
@@ -62,6 +62,7 @@
 import nu.fw.jeti.util.Preferences;
 
+import nu.fw.jeti.util.ServerExpresso;
 import nu.fw.jeti.plugins.filetransfer.buttonFileTransfer;
-
+import nu.fw.jeti.plugins.callVoip.buttonCallVoip;;
 
 /**
@@ -78,7 +79,9 @@
 	private JButton btnUnderline;
 	private JButton btnFileTransfer;
+	private JButton btnCallVoip;
 	private JTextPane txtInvoer;
 	private ChatSplitPane chatPane;
 	private Object jidUser;
+	private Object jidName;
 	private boolean showXHTML = true;
 	public final static String VERSION = "0.3";
@@ -95,9 +98,10 @@
 	}
 
-	public void initXHTML(ChatSplitPane chatPane, final JTextPane txtInvoer, JPanel pnlControl, Object JIDUser)
-	{
-		this.txtInvoer = txtInvoer;
-		this.chatPane = chatPane;
-		this.jidUser = JIDUser;
+	public void initXHTML(ChatSplitPane chatPane, final JTextPane txtInvoer, JPanel pnlControl, Object JIDUser, Object JIDName)
+	{
+		this.txtInvoer	= txtInvoer;
+		this.chatPane	= chatPane;
+		this.jidUser	= JIDUser;
+		this.jidName	= JIDName;
 		
 		MutableAttributeSet set = new SimpleAttributeSet();
@@ -184,11 +188,15 @@
 		pnlControl.add(btnColor);
 
-		ActionListener returnFocus = new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
+		ActionListener returnFocus = new ActionListener()
+		{
+			public void actionPerformed(ActionEvent e)
+			{
                 txtInvoer.requestFocus();
             }
         };
 
-        ActionListener testeMeu = new ActionListener(){
+        // Click button filetransfer;	
+        ActionListener Ftransfer = new ActionListener()
+        {
         	
         	public void actionPerformed(ActionEvent e)
@@ -196,4 +204,15 @@
         		buttonFileTransfer sFile = new buttonFileTransfer();
         		sFile.sendFile(jidUser);
+        	}
+        };
+        
+        // Click button CallVoip;
+        ActionListener callVoip = new ActionListener()
+        {
+        	public void actionPerformed(ActionEvent e)
+        	{
+        		String _return = buttonCallVoip.connExpresso(jidUser.toString(), nu.fw.jeti.applet.Jeti.USERID);        		
+        		javax.swing.JOptionPane.showMessageDialog(null, I18N.gettext("callVoip.Calling") + " : " + jidName + "\n\n" +
+        				I18N.gettext("callVoip.Status") + " : " + _return );
         	}
         };
@@ -233,11 +252,22 @@
 
 		// BUTTON-filetransfer
-		btnFileTransfer = new JButton(new ImageIcon(getClass().getResource("ftransfer16.gif")));
-		btnFileTransfer.setMargin(new Insets(0,0,0,0));
-		btnFileTransfer.setPreferredSize(new Dimension(23, 23));
-		btnFileTransfer.setToolTipText(I18N.gettext("xhtml.Transfer_File"));
-		btnFileTransfer.addActionListener(testeMeu);
-		pnlControl.add(btnFileTransfer);
-	
+		if( nu.fw.jeti.applet.Jeti.JAVAPLUGINS.indexOf("filetransfer") != -1 )
+		{
+			btnFileTransfer = new JButton(new ImageIcon(getClass().getResource("ftransfer16.gif")));
+			btnFileTransfer.setMargin(new Insets(0,0,0,0));
+			btnFileTransfer.setPreferredSize(new Dimension(23, 23));
+			btnFileTransfer.setToolTipText(I18N.gettext("xhtml.Transfer_File"));
+			btnFileTransfer.addActionListener(Ftransfer);
+			pnlControl.add(btnFileTransfer);
+		}
+		
+		// BUTTON-callVoip
+		if( nu.fw.jeti.applet.Jeti.JAVAPLUGINS.indexOf("callVoip") != -1 )
+		{
+			btnCallVoip = new JButton();
+			btnCallVoip = buttonCallVoip.button(btnCallVoip);
+			btnCallVoip.addActionListener(callVoip);
+			pnlControl.add(btnCallVoip);
+		}
 	}
 
@@ -252,5 +282,6 @@
 		
 	public void useXHTML(boolean useXHTMl,String name)
-	{//look if other one sends xhtml
+	{
+		//look if other one sends xhtml
 		//javax.swing.JOptionPane.showMessageDialog(null, "Directory " + dir + " could not be created, Jeti will close");
 		if (useXHTMl != showXHTML && !useXHTMl)
@@ -286,5 +317,6 @@
 		StringBuffer temp = new StringBuffer();
 		for(int i = 0;i<text.length();i++)
-		{//split text up in words
+		{
+			//split text up in words
 			char c = text.charAt(i);
 			switch (c)
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/Plugins.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/Plugins.java	(revision 1014)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/Plugins.java	(revision 1128)
@@ -13,17 +13,12 @@
 {
 
-//back to interface??
+	//back to interface??
 	//String getName(){return NAME;}
-
 	//abstract String getDescription();
-
 	//abstract String getVersion();
-
-	
 	// public void unload(Backend backend);
-	
 	//remove??
 	//public String[] getInfo(){return null;}
-//TODO change to unload
+	//TODO change to unload
 	
 	/**
@@ -34,5 +29,4 @@
 	 public void unload();
 
-	 
 }
 /*
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/callVoip/buttonCallVoip.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/callVoip/buttonCallVoip.java	(revision 1128)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/callVoip/buttonCallVoip.java	(revision 1128)
@@ -0,0 +1,42 @@
+package nu.fw.jeti.plugins.callVoip;
+
+import java.awt.Dimension;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.ImageIcon;
+
+import nu.fw.jeti.util.I18N;
+import nu.fw.jeti.util.ServerExpresso;
+
+public class buttonCallVoip extends Plugin
+{
+    
+	public static JButton button( JButton voip )
+	{
+		buttonCallVoip classButton = new buttonCallVoip();
+		voip = new JButton(classButton.getIcon("phone16.gif"));
+		voip.setMargin(new Insets(0,0,0,0));
+		voip.setPreferredSize(new Dimension(23,23));
+		voip.setToolTipText(I18N.gettext("callVoip.Dialing_for_business_phone"));
+
+		return voip;
+	}
+	
+	public static String connExpresso(String JidUser, String UserId)
+	{
+		ServerExpresso conn = new ServerExpresso();
+		String _jidUser = JidUser.toString().substring(0, JidUser.toString().indexOf("@"));
+		String _return = conn.connectCallVoip(_jidUser, UserId);
+		
+		return _return;
+	}
+	
+	private ImageIcon getIcon(String nameFile)
+	{
+		return new ImageIcon(getClass().getResource(nameFile));
+	}
+
+}
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/callVoip/Plugin.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/callVoip/Plugin.java	(revision 1128)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/callVoip/Plugin.java	(revision 1128)
@@ -0,0 +1,23 @@
+/**
+ * @author Alexandre Correia - alexandrecorreia@celepar.pr.gov.br
+ * @
+ */
+
+package nu.fw.jeti.plugins.callVoip;
+
+import nu.fw.jeti.plugins.Plugins;
+import nu.fw.jeti.util.ServerExpresso;
+import nu.fw.jeti.util.I18N;
+
+public class Plugin implements Plugins 
+{
+	public final static String VERSION = "0.1";
+	public final static String DESCRIPTION = "callVoip.Call_Voip";
+	public final static String NAME = "callVoip";
+	public final static String ABOUT = "by Alexandre Correia";
+	
+	public static void init(){}
+	
+	public void unload(){}
+	
+}
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/FormattedMessage.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/FormattedMessage.java	(revision 1014)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/FormattedMessage.java	(revision 1128)
@@ -17,5 +17,5 @@
 public interface FormattedMessage
 {
-	public void initXHTML(ChatSplitPane chatPane, JTextPane txtInvoer, JPanel pnlControl, Object Jid);
+	public void initXHTML(ChatSplitPane chatPane, JTextPane txtInvoer, JPanel pnlControl, Object Jid, Object JidName);
 
 	List getWordList(Extension extension);
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/applet/Jeti.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/applet/Jeti.java	(revision 1115)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/applet/Jeti.java	(revision 1128)
@@ -75,4 +75,5 @@
 	public static JLabel from;
 	public static LoginInfo loginInfo;
+	public static String USERID;
 	public static String SERVEREXPRESSO;
 	public static String NAMECOMPANY;
@@ -91,5 +92,5 @@
 	 * @Brief	: A variavel DEBUG_APPLET_VIEWER = true, para usar o appletviewer
 	 */
-	public static boolean DEBUG_APPLET_VIEWER = false;
+	public static boolean DEBUG_APPLET_VIEWER = true;
 	
 	public void init()
@@ -101,19 +102,19 @@
 			public void run()
 			{
-				String server = new String(applet.getParameter("SERVER"));
-				String portText = new String(applet.getParameter("PORT"));
-				boolean ssl = Boolean.valueOf(applet.getParameter("SSL")).booleanValue();
-				String user = new String(applet.getParameter("USER"));
-				String password = new String(applet.getParameter("PASSWORD"));
-				String resource = new String(applet.getParameter("RESOURCE"));
-				String host = new String(applet.getParameter("HOST"));
-				String useJavaProxy = new String(applet.getParameter("USEPROXY").toUpperCase());
-				String serverExpresso = new String(applet.getParameter("EXPRESSO"));
-				String useHttps = new String(applet.getParameter("USEHTTPS"));
-				String nameCompany = new String(applet.getParameter("NAMECOMPANY"));
-				String cnName = new String(applet.getParameter("CNNAME"));
-				String country = new String(applet.getParameter("COUNTRY"));
-				String language = new String(applet.getParameter("LANGUAGE"));
-				String javaPlugins = new String(applet.getParameter("JAVAPLUGINS"));
+				String server = new String("im.pr.gov.br");
+				String portText = new String("5223");
+				boolean ssl = true;//Boolean.valueOf(applet.getParameter("SSL")).booleanValue();
+				String user = new String("alexandrecorreia");
+				String password = new String("alec108529");
+				String resource = new String("JAVA_RESOURCE");
+				String host = new String("im.pr.gov.br");
+				String useJavaProxy = new String("FALSE");
+				String serverExpresso = new String("localhost/expresso/jabberit_messenger/");
+				String useHttps = new String("http");
+				String nameCompany = new String("ALEC");
+				String cnName = new String("Alexandre");
+				String country = new String("BR");
+				String language = new String("pt");
+				String javaPlugins = new String("xhtml,filetransfer,callVoip");
 
 				/**
@@ -125,5 +126,6 @@
 				 * 				  - Informa qual o tipo de protocolo a ser usado http ou https.
 				 * 				  - Passa ao java o cn do ldap do servidor expresso.
-				 * 				  - Carrega plugins para o Java.	 					  
+				 * 				  - Carrega plugins para o Java.
+				 * 				  - uid expresso;		 					  
 				 */
 				
@@ -136,4 +138,5 @@
 				COUNTRY = country;
 				JAVAPLUGINS = javaPlugins;
+				USERID = user;
 
 				// Reinit languages incase they changed
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/languages/languagesPlugins.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/languages/languagesPlugins.java	(revision 1097)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/languages/languagesPlugins.java	(revision 1128)
@@ -9,4 +9,8 @@
 	public static final Object[][] languagePlugins_pt_BR =
 	{
+		{ "callVoip.Call_Voip", "Call Voip"},
+		{ "callVoip.Calling" , "Ligando para" },		
+		{ "callVoip.Dialing_for_business_phone", "Discar para telefone comerial"},
+		{ "callVoip.Status", "Status"},
 		{ "filetransfer.{0}_already_exist,_overwrite?" , "{0} já existe, sobrescrever?"},
 		{ "filetransfer.{0}_could_not_be_openend_in_write_mode" , "{0} não pode ser aberto em modo de escrita."},
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/ui/ChatSplitPane.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/ui/ChatSplitPane.java	(revision 1097)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/ui/ChatSplitPane.java	(revision 1128)
@@ -338,5 +338,5 @@
 			//String contactJid = contactJID.toString();
 			xhtml = (FormattedMessage) PluginsInfo.newPluginInstance("xhtml");
-			xhtml.initXHTML(this, txtInvoer, pnlControl, contactJID );
+			xhtml.initXHTML(this, txtInvoer, pnlControl, contactJID, contactName);
 		}
 		
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/ServerExpresso.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/ServerExpresso.java	(revision 1014)
+++ trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/ServerExpresso.java	(revision 1128)
@@ -185,3 +185,26 @@
         return photo;
 	}
+	
+	public String connectCallVoip(String jidFrom, String jidTo)
+	{
+		String callVoip = "";
+		String data = "javaVoipFrom=" + jidFrom + "&javaVoipTo=" + jidTo;
+
+		// Name Server Expresso
+        String serverExpresso = nu.fw.jeti.applet.Jeti.SERVEREXPRESSO;
+        
+        // Type Protocol Http / Https
+        String typeProtocol = nu.fw.jeti.applet.Jeti.USEHTTPS;
+        
+        if( typeProtocol.equals("http") )
+        {
+        	callVoip = this.connectHttp(typeProtocol, serverExpresso, data);
+        }
+        else
+        {
+        	callVoip = this.connectHttps(typeProtocol, serverExpresso, data);
+        }
+        
+        return callVoip;
+	}
 }
Index: trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/JIDPrep.java
===================================================================
--- trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/JIDPrep.java	(revision 1014)
+++ 	(revision )
@@ -1,107 +1,0 @@
-/* 
- *	Jeti, a Java Jabber client, Copyright (C) 2007 E.S. de Boer  
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *	but WITHOUT ANY WARRANTY; without even the implied warranty of
- *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *	GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- *	For questions, comments etc, 
- *	use the website at http://jeti.jabberstudio.org
- */
-
-//created on May 7, 2007
-package nu.fw.jeti.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.IDN;
-
-import sun.net.idn.StringPrep;
-import sun.text.normalizer.UCharacterIterator;
-
-/**
- * stringprep JIDs See rfc3920 - 3.2 / 3.4
- *
- */
-public class JIDPrep {
-
-	private static StringPrep nodePrep;
-	private static StringPrep resourcePrep;
-	    
-    static {
-        InputStream stream = null;
-        
-        try {
-            stream = JIDPrep.class.getResourceAsStream("nodeprep.spp");
-            nodePrep = new StringPrep(stream);
-            stream.close();
-            stream = JIDPrep.class.getResourceAsStream("resourceprep.spp");
-            resourcePrep = new StringPrep(stream);
-            stream.close();
-        } catch (IOException e) {
-            // should never reach here
-        	e.printStackTrace();
-            assert false;
-        }
-    }
-	
-	
-	
-	/**
-	 * Nameprep the server/domain part of a JID
-	 * @param server
-	 * @return namepreped server part
-	 * @throws a IllegalArgumentException if it is an illegal domain
-	 */
-	public static String namePrep(String server)
-	{
-		return IDN.toASCII(server, IDN.USE_STD3_ASCII_RULES);
-	}
-	
-	/**
-	 * Nodeprep the node part of a JID
-	 * @param node
-	 * @return nodepreped part of a JID
-	 * @throws a IllegalArgumentException if it is an illegal Node
-	 */
-	public static String nodePrep(String node)
-	{
-		//TODO add http://www.icu-project.org/icu4j_faq.html for java 1.4 compatibility and non sun java
-		if(node == null) return null;
-		UCharacterIterator iter = UCharacterIterator.getInstance(node);
-        try {
-            return nodePrep.prepare(iter, IDN.USE_STD3_ASCII_RULES).toString();
-        } catch (java.text.ParseException e) {
-            throw new IllegalArgumentException(e);
-        }
-	}
-	
-	
-	/**
-	 * Resourceprep the node part of a JID
-	 * @param resource
-	 * @return resourcepreped part of a JID
-	 * @throws a IllegalArgumentException if it is an illegal Resource
-	 */
-	public static String resourcePrep(String resource)
-	{
-		if(resource == null) return null;
-		UCharacterIterator iter = UCharacterIterator.getInstance(resource);
-        try {
-            return resourcePrep.prepare(iter, IDN.USE_STD3_ASCII_RULES).toString();
-        } catch (java.text.ParseException e) {
-            throw new IllegalArgumentException(e);
-        }
-	}
-	
-}
