String[] groups = addPhone.getGroup(); String resourceId = org.sipfoundry.sipxconfig.common.User.GROUP_RESOURCE_ID;
String[] groups = apiPhone.getGroups();
    public void addPhone(AddPhone addPhone) throws RemoteException {        Phone apiPhone = addPhone.getPhone();        PhoneModel model = requireModelId(apiPhone.getModelId());        org.sipfoundry.sipxconfig.phone.Phone phone = m_context.newPhone(model);        ApiBeanUtil.toMyObject(m_builder, phone, apiPhone);        String[] groups = addPhone.getGroup();        String resourceId = org.sipfoundry.sipxconfig.common.User.GROUP_RESOURCE_ID;        for (int i = 0; groups != null && i < groups.length; i++) {            Group g = m_settingDao.getGroupCreateIfNotFound(resourceId, groups[i]);            phone.addGroup(g);        }        m_context.storePhone(phone);    }