use of org.motechproject.mots.domain.enums.CallStatus in project mots by motech-implementations.
the class IvrService method saveCallDetailRecord.
/**
* Save IVR Call Detail Record.
* @param callDetailRecord callDetailRecord to be saved
* @param configName name of the IVR config
*/
public void saveCallDetailRecord(CallDetailRecord callDetailRecord, String configName) throws IvrException {
IvrConfig ivrConfig = ivrConfigService.getConfig();
setConfigFields(callDetailRecord, ivrConfig, configName);
callDetailRecordRepository.save(callDetailRecord);
CallStatus callStatus = callDetailRecord.getCallStatus();
boolean callInterrupted = CallStatus.FINISHED_INCOMPLETE.equals(callStatus);
if (CallStatus.FINISHED_COMPLETE.equals(callStatus) || callInterrupted) {
VotoCallLogDto votoCallLogDto = getVotoCallLog(callDetailRecord);
moduleProgressService.updateModuleProgress(votoCallLogDto, callInterrupted);
}
}
Aggregations