String variables = getProperty(Properties.DIAL_VARIABLES);
String variables = getProperty(Properties.DIAL_VARIABLES, "").trim();
    public void dial(String username, String extension, JID jid) throws PhoneException {        //acquire the jidUser object        PhoneUser user = getPhoneUserByUsername(username);        try {            PhoneDevice primaryDevice = getPrimaryDevice(user.getID());            Originate action = new Originate();            action.setChannel(primaryDevice.getDevice());            action.setCallerId(primaryDevice.getCallerId() != null ? primaryDevice.getCallerId() :                    getProperty(Properties.DEFAULT_CALLER_ID, ""));            action.setExten(extension);            String context = getProperty(Properties.CONTEXT, DEFAULT_CONTEXT);            if ("".equals(context)) {                context = DEFAULT_CONTEXT;            }            action.setContext(context);            action.setPriority(1);            String variables = getProperty(Properties.DIAL_VARIABLES);            if (variables != null) {                String[] varArray = variables.split(",");                Map<String, String> varMap = new HashMap<String, String>();                for (String aVarArray : varArray) {                    String[] s = aVarArray.split("=");                    String key = s[0].trim();                    String value = s[1].trim();                    varMap.put(key, value);                }                action.setVariables(varMap);            }            asteriskManager.originateCall(action);        }        catch (Exception e) {            Log.error(e.getMessage(), e);            throw new PhoneException("Unabled to dial extention " + extension, e);        }    }