log.log(Level.SEVERE, e1.getMessage(), e);
log.log(Level.SEVERE, e1.getMessage(), e1);
    public void actionPerformed(ActionEvent e) {        String command = e.getActionCommand();        if ("call".equals(command)) {            String extensionText = input.getText();            if (extensionText != null && !"".equals(extensionText)) {                try {                    if(extensionText.indexOf("@") > -1) {                        client.dialByJID(extensionText);                    }                    else {                        client.dialByExtension(extensionText);                    }                }                catch (PhoneActionException ex) {                    log.log(Level.SEVERE, ex.getMessage(), ex);                }            }        }        else if ("connect".equals(command)) {            try {                conn = new XMPPConnection(server.getText());                conn.login(username.getText(), password.getText());                client = new PhoneClient(conn);                client.addEventListener(this);            }            catch (XMPPException e1) {                log.log(Level.SEVERE, e1.getMessage(), e);                throw new RuntimeException(e1);            }        }        else if ("disconnect".equals(command)) {            conn.close();        }        else if ("exit".equals(command)) {            try {                conn.close();            }            finally {                System.exit(0);            }        }        else if ("forward".equals(command)) {            String extensionText = input.getText();            if(call != null && extensionText != null && !"".equals(extensionText)) {                try {                    if(extensionText.indexOf("@") > -1) {                        client.forwardByJID(call, extensionText);                    }                    else {                        client.forward(call, extensionText);                    }                }                catch (PhoneActionException e1) {                    log.log(Level.SEVERE, e1.getMessage(), e1);                }            }        }    }