public void provisionData(String number, ApplicationResponse applicationResponse) { try { PurchaseHistory purchaseHistory = purchaseHistoryDao.getPurchaseHistoryByNumber(number); Provisioning provisioning = new Provisioning(); provisioning.setSmsFallbackMethod(applicationResponse.getSmsFallbackMethod()); provisioning.setSmsFallbackUrl(applicationResponse.getSmsFallbackUrl()); provisioning.setSmsMethod(applicationResponse.getSmsMethod()); provisioning.setSmsStatusCallback(applicationResponse.getSmsStatusCallback()); provisioning.setSmsUrl(applicationResponse.getSmsUrl()); provisioning.setStatusCallBack(applicationResponse.getStatusCallback()); provisioning.setStatusCallbackMethod(applicationResponse.getStatusCallbackMethod()); provisioning.setVoiceFallbackMethod(applicationResponse.getVoiceFallbackMethod()); provisioning.setVoiceFallbackUrl(applicationResponse.getVoiceFallback()); provisioning.setNumber(number); provisioning.setVoiceUrl( applicationResponse.getVoiceUrl() == null ? applicationResponse.getTrunkSid() : applicationResponse.getVoiceUrl()); provisioningDao.updateProvisioning(provisioning); purchaseHistory.setNumberProvisioning(provisioning); purchaseHistoryDao.createNewPurchaseHistory(purchaseHistory); } catch (Exception e) { LOG.error(ImiDataFormatUtils.getStackTrace(e)); } }