diff --git a/pom.xml b/pom.xml
index 11ad9f37..7e7b29d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.iemr.common-API
common-api
- 3.6.0
+ 3.7.0
war
Common-API
diff --git a/src/main/environment/common_ci.properties b/src/main/environment/common_ci.properties
index 0184b32f..6997035e 100644
--- a/src/main/environment/common_ci.properties
+++ b/src/main/environment/common_ci.properties
@@ -189,8 +189,8 @@ captcha.enable-captcha=@env.ENABLE_CAPTCHA@
cors.allowed-origins=@env.CORS_ALLOWED_ORIGINS@
-video-call-url=@env.VIDEO_CALL_URL@
-jibri.output.path=@env.JIBRI_OUTPUT_PATH@
+# Jitsi configuration
+videocall.url=@env.VIDEO_CALL_URL@
video.recording.path=@env.VIDEO_RECORDING_PATH@
platform.feedback.ratelimit.enabled=@env.PLATFORM_FEEDBACK_RATELIMIT_ENABLED@
diff --git a/src/main/environment/common_docker.properties b/src/main/environment/common_docker.properties
index a81ea62e..12408a9a 100644
--- a/src/main/environment/common_docker.properties
+++ b/src/main/environment/common_docker.properties
@@ -192,7 +192,7 @@ firebase.enabled=${FIREBASE_ENABLE}
firebase.credential-file=${FIREBASE_CREDENTIAL}
-video-call-url=${VIDEO_CALL_URL}
+videocall.url=${VIDEO_CALL_URL}
jibri.output.path={JIBRI_OUTPUT_PATH}
video.recording.path={VIDEO_RECORDING_PATH}
diff --git a/src/main/environment/common_example.properties b/src/main/environment/common_example.properties
index aca73ddb..f55f142b 100644
--- a/src/main/environment/common_example.properties
+++ b/src/main/environment/common_example.properties
@@ -198,8 +198,8 @@ grievanceAllocationRetryConfiguration=3
logging.path=logs/
logging.file.name=logs/common-api.log
-video-call-url=https://vc.piramalswasthya.org/?
-jibri.output.path=/srv/jibri/recordings
+# Jitsi configuration
+videocall.url=https://vc.piramalswasthya.org/?
video.recording.path=/srv/recordings
captcha.secret-key=
diff --git a/src/main/java/com/iemr/common/controller/videocall/VideoCallController.java b/src/main/java/com/iemr/common/controller/videocall/VideoCallController.java
index 8eb2a3ad..fdbd9575 100644
--- a/src/main/java/com/iemr/common/controller/videocall/VideoCallController.java
+++ b/src/main/java/com/iemr/common/controller/videocall/VideoCallController.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.controller.videocall;
import java.util.HashMap;
@@ -10,7 +32,6 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -19,7 +40,6 @@
import com.iemr.common.model.videocall.VideoCallRequest;
import com.iemr.common.service.videocall.VideoCallService;
import com.iemr.common.utils.response.OutputResponse;
-import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.http.HttpServletRequest;
diff --git a/src/main/java/com/iemr/common/data/videocall/VideoCallParameters.java b/src/main/java/com/iemr/common/data/videocall/VideoCallParameters.java
index c9df2d87..48a7b8ae 100644
--- a/src/main/java/com/iemr/common/data/videocall/VideoCallParameters.java
+++ b/src/main/java/com/iemr/common/data/videocall/VideoCallParameters.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.data.videocall;
import java.sql.Timestamp;
diff --git a/src/main/java/com/iemr/common/mapper/videocall/VideoCallMapper.java b/src/main/java/com/iemr/common/mapper/videocall/VideoCallMapper.java
index 521d5921..7e9a8f12 100644
--- a/src/main/java/com/iemr/common/mapper/videocall/VideoCallMapper.java
+++ b/src/main/java/com/iemr/common/mapper/videocall/VideoCallMapper.java
@@ -1,8 +1,29 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.mapper.videocall;
import java.util.List;
import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
import org.mapstruct.IterableMapping;
import org.mapstruct.factory.Mappers;
diff --git a/src/main/java/com/iemr/common/model/videocall/UpdateCallRequest.java b/src/main/java/com/iemr/common/model/videocall/UpdateCallRequest.java
index 343198b3..681d4b63 100644
--- a/src/main/java/com/iemr/common/model/videocall/UpdateCallRequest.java
+++ b/src/main/java/com/iemr/common/model/videocall/UpdateCallRequest.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.model.videocall;
import lombok.Data;
diff --git a/src/main/java/com/iemr/common/model/videocall/UpdateCallResponse.java b/src/main/java/com/iemr/common/model/videocall/UpdateCallResponse.java
index f01f46f5..44c01215 100644
--- a/src/main/java/com/iemr/common/model/videocall/UpdateCallResponse.java
+++ b/src/main/java/com/iemr/common/model/videocall/UpdateCallResponse.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.model.videocall;
import java.sql.Timestamp;
diff --git a/src/main/java/com/iemr/common/model/videocall/VideoCallRequest.java b/src/main/java/com/iemr/common/model/videocall/VideoCallRequest.java
index d8a61eee..64abc044 100644
--- a/src/main/java/com/iemr/common/model/videocall/VideoCallRequest.java
+++ b/src/main/java/com/iemr/common/model/videocall/VideoCallRequest.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.model.videocall;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/src/main/java/com/iemr/common/repository/videocall/VideoCallParameterRepository.java b/src/main/java/com/iemr/common/repository/videocall/VideoCallParameterRepository.java
index 251b877a..99798da2 100644
--- a/src/main/java/com/iemr/common/repository/videocall/VideoCallParameterRepository.java
+++ b/src/main/java/com/iemr/common/repository/videocall/VideoCallParameterRepository.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.repository.videocall;
import java.util.List;
diff --git a/src/main/java/com/iemr/common/service/cti/CTIServiceImpl.java b/src/main/java/com/iemr/common/service/cti/CTIServiceImpl.java
index 81d8953a..7e5de8e9 100644
--- a/src/main/java/com/iemr/common/service/cti/CTIServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/cti/CTIServiceImpl.java
@@ -26,6 +26,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -96,6 +97,9 @@ public class CTIServiceImpl implements CTIService {
@Autowired
private IEMRCalltypeRepositoryImplCustom iemrCalltypeRepositoryImplCustom;
+ @Value("${cti-server-ip}")
+ private String serverURL;
+
public CTIServiceImpl() {
if (httpUtils == null) {
httpUtils = new HttpUtils();
@@ -114,7 +118,7 @@ public OutputResponse addUpdateAgentSkills(String request, String ipAddress) thr
ObjectMapper objectMapper = new ObjectMapper();
logger.debug("addUpdateAgentSkills input is " + request);
String ctiURI = ConfigProperties.getPropertyByName("add-update-agent-skills-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentSkills agentSkills = objectMapper.readValue(request, AgentSkills.class);
String agentID = (agentSkills.getAgentID() != null) ? agentSkills.getAgentID() : "";
@@ -146,7 +150,7 @@ public OutputResponse getCampaignSkills(String request, String ipAddress) throws
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("get-campaign-skills-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
CampaignSkills agentState = objectMapper.readValue(request, CampaignSkills.class);
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("CAMPAIGN_NAME",
@@ -173,7 +177,7 @@ public OutputResponse getAgentState(String request, String ipAddress) throws IEM
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("get-agent-status-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentState agentState = objectMapper.readValue(request, AgentState.class);
String agentID = (agentState.getAgent_id() != null) ? agentState.getAgent_id() : "";
@@ -203,7 +207,7 @@ public OutputResponse getAgentCallStats(String request, String ipAddress) throws
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("get-agent-call-stats-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentCallStats agentState = objectMapper.readValue(request, AgentCallStats.class);
String agentID = (agentState.getAgentID() != null) ? agentState.getAgentID() : "";
@@ -235,7 +239,7 @@ public OutputResponse getCampaignNames(String request, String ipAddress) throws
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("get-campaign-name-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
CampaignNames agentState = objectMapper.readValue(request, CampaignNames.class);
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("SEARCH_KEY", (agentState.getServiceName() != null) ? agentState.getServiceName() : "");
@@ -262,7 +266,7 @@ public OutputResponse doAgentLogin(String request, String ipAddress) throws IEMR
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("do-agent-login-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentState agentState = objectMapper.readValue(request, AgentState.class);
String agentID = (agentState.getAgent_id() != null) ? agentState.getAgent_id() : "";
@@ -292,7 +296,7 @@ public OutputResponse getLoginKey(String request, String ipAddress) throws IEMRE
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("get-login-key-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentLoginKey agentState = objectMapper.readValue(request, AgentLoginKey.class);
String decryptPassword = null;
@@ -325,7 +329,7 @@ public OutputResponse agentLogout(String request, String ipAddress) throws IEMRE
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("do-agent-logout-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentState agentState = objectMapper.readValue(request, AgentState.class);
String agentID = (agentState.getAgent_id() != null) ? agentState.getAgent_id() : "";
@@ -357,7 +361,7 @@ public OutputResponse getOnlineAgents(String request, String ipAddress) throws I
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("do-online-agent-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
AgentState agentState = objectMapper.readValue(request, AgentState.class);
String agentID = (agentState.getAgent_id() != null) ? agentState.getAgent_id() : "";
@@ -388,7 +392,7 @@ public OutputResponse callBeneficiary(String request, String ipAddress) throws I
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("call-beneficiary-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
CallBeneficiary agentState = objectMapper.readValue(request, CallBeneficiary.class);
String agentID = (agentState.getAgent_id() != null) ? agentState.getAgent_id() : "";
@@ -429,7 +433,7 @@ public OutputResponse addUpdateUserData(String request, String ipAddress) throws
* SESSION_TIMEOUT&designation=DESIGNATION&resFormat=3
*/
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
CTIUser ctiUser = objectMapper.readValue(request, CTIUser.class);
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("USERNAME", (ctiUser.getUsername() != null) ? ctiUser.getUsername() : "");
@@ -461,7 +465,7 @@ public OutputResponse getTransferCampaigns(String request, String ipAddress) thr
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("fetch-transferrable-campaigns-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
CTICampaigns agentState = objectMapper.readValue(request, CTICampaigns.class);
String agentID = (agentState.getAgent_id() != null) ? agentState.getAgent_id() : "";
@@ -493,7 +497,7 @@ public OutputResponse getCampaignRoles(String request, String remoteAddr) throws
OutputResponse output = new OutputResponse();
ObjectMapper objectMapper = new ObjectMapper();
String ctiURI = ConfigProperties.getPropertyByName("get-campaign-roles-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
CampaignRole campaign = objectMapper.readValue(request, CampaignRole.class);
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("CAMPAIGN_NAME", (campaign.getCampaign() != null) ? campaign.getCampaign() : "");
@@ -525,7 +529,7 @@ public OutputResponse setCallDisposition(String request, String remoteAddr) thro
String agentIP = !agentIPResp.equals(DEFAULT_IP) ? agentIPResp : remoteAddr;
String ctiURI = ConfigProperties.getPropertyByName("update-call-disposition-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("AGENT_ID", agentID);
ctiURI = ctiURI.replace("AGENT_IP", agentIP);
@@ -553,7 +557,7 @@ public OutputResponse createVoiceFile(String request, String remoteAddr) throws
ObjectMapper objectMapper = new ObjectMapper();
CTIVoiceFile disposition = objectMapper.readValue(request, CTIVoiceFile.class);
String ctiURI = ConfigProperties.getPropertyByName("mix-voice-file-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("AGENT_ID", (disposition.getAgent_id() != null) ? disposition.getAgent_id() : "");
// ctiURI = ctiURI.replace("AGENT_IP", remoteAddr);
@@ -578,7 +582,7 @@ public OutputResponse getVoiceFile(String request, String remoteAddr) throws IEM
ObjectMapper objectMapper = new ObjectMapper();
CTIVoiceFile disposition = objectMapper.readValue(request, CTIVoiceFile.class);
String ctiURI = ConfigProperties.getPropertyByName("get-voice-file-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("AGENT_ID", (disposition.getAgent_id() != null) ? disposition.getAgent_id() : "");
// ctiURI = ctiURI.replace("AGENT_IP", remoteAddr);
@@ -604,7 +608,7 @@ public OutputResponse getVoiceFileNew(String request, String remoteAddr) throws
OutputResponse output = new OutputResponse();
CTIVoiceFile disposition = InputMapper.gson().fromJson(request, CTIVoiceFile.class);
String ctiURI = ConfigProperties.getPropertyByName("get-voice-file-URL-New");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("AGENT_ID", (disposition.getAgent_id() != null) ? disposition.getAgent_id() : "");
// ctiURI = ctiURI.replace("AGENT_IP", remoteAddr);
@@ -971,7 +975,7 @@ public OutputResponse addAutoDialNumbers(String request, String ipAddress) throw
OutputResponse result = new OutputResponse();
logger.debug("addUpdateAgentSkills input is " + request);
String ctiURI = ConfigProperties.getPropertyByName("add-auto-dail-numbers-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ObjectMapper objectMapper = new ObjectMapper();
AutoPreviewDial[] autoPreviewDialArray = objectMapper.readValue(request, AutoPreviewDial[].class);
@@ -1012,7 +1016,7 @@ public OutputResponse setAutoDialNumbers(String request, String ipAddress) throw
OutputResponse result = new OutputResponse();
logger.debug("setAutoDialNumbers input is " + request);
String ctiURI = ConfigProperties.getPropertyByName("set-auto-dail-numbers-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ObjectMapper objectMapper = new ObjectMapper();
AutoPreviewDial autoPreviewDial = objectMapper.readValue(request, AutoPreviewDial.class);
@@ -1055,7 +1059,7 @@ public OutputResponse getIVRSPathDetails(String request, String remoteAddress) t
OutputResponse result = new OutputResponse();
logger.debug("getZoneDetails input is " + request);
String ctiURI = ConfigProperties.getPropertyByName("agent-ivrs-path-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ObjectMapper objectMapper = new ObjectMapper();
AgentState zoneData = objectMapper.readValue(request, AgentState.class);
diff --git a/src/main/java/com/iemr/common/service/nhm_dashboard/NHM_DashboardServiceImpl.java b/src/main/java/com/iemr/common/service/nhm_dashboard/NHM_DashboardServiceImpl.java
index 4448cc07..d7afd579 100644
--- a/src/main/java/com/iemr/common/service/nhm_dashboard/NHM_DashboardServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/nhm_dashboard/NHM_DashboardServiceImpl.java
@@ -32,6 +32,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.google.gson.Gson;
@@ -61,6 +62,9 @@ public class NHM_DashboardServiceImpl implements NHM_DashboardService {
@Autowired
private DetailedCallReportRepo detailedCallReportRepo;
+ @Value("${cti-server-ip}")
+ private String serverURL;
+
public String pushAbandonCalls(AbandonCallSummary abandonCallSummary) throws Exception {
logger.info("NHM_abandon call push API request : " + abandonCallSummary.toString());
@@ -227,7 +231,7 @@ public List callAgentSummaryReportCTI_API() throws IEMRExcep
// throw new IEMRException("Please pass correct period for schedular - in hours");
String ctiURI = ConfigProperties.getPropertyByName("get-agent-summary-report-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("END_DATE", endDate);
ctiURI = ctiURI.replace("START_DATE", fromDate);
@@ -272,7 +276,7 @@ public List callDetailedCallReportCTI_API() throws IEMRExcep
// throw new IEMRException("Please pass correct period for schedular - in hours");
String ctiURI = ConfigProperties.getPropertyByName("get-details-call-report-URL");
- String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
+ // String serverURL = ConfigProperties.getPropertyByName("cti-server-ip");
ctiURI = ctiURI.replace("CTI_SERVER", serverURL);
ctiURI = ctiURI.replace("END_DATE", endDate);
ctiURI = ctiURI.replace("START_DATE", fromDate);
diff --git a/src/main/java/com/iemr/common/service/videocall/VideoCallService.java b/src/main/java/com/iemr/common/service/videocall/VideoCallService.java
index 9322050b..dd457688 100644
--- a/src/main/java/com/iemr/common/service/videocall/VideoCallService.java
+++ b/src/main/java/com/iemr/common/service/videocall/VideoCallService.java
@@ -1,5 +1,27 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.service.videocall;
-import com.iemr.common.utils.response.OutputResponse;
+
import com.iemr.common.model.videocall.UpdateCallRequest;
import com.iemr.common.model.videocall.VideoCallRequest;
diff --git a/src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java b/src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java
index 9db1a771..8b61d525 100644
--- a/src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java
@@ -1,3 +1,25 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology
+* Integrated EHR (Electronic Health Records) Solution
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute"
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
package com.iemr.common.service.videocall;
import org.apache.commons.lang.RandomStringUtils;
@@ -36,14 +58,14 @@ public class VideoCallServiceImpl implements VideoCallService {
private String meetingLink;
private boolean isLinkSent = false;
- private String consultationStatus = "Not Initiated";
- @Value("${video-call-url}")
+ @Value("${videocall.url}")
private String jitsiLink;
public VideoCallServiceImpl() {
- // this.jitsiLink = ConfigProperties.getPropertyByName("video-call-url");
- // logger.info("Jitsi Link fetched: " + this.jitsiLink);
+ // Default constructor
+ this.meetingLink = null;
+ this.isLinkSent = false;
}
@Override
@@ -99,10 +121,7 @@ public String updateCallStatus(UpdateCallRequest callRequest) throws Exception {
if (updateCount > 0) {
videoCall.setLinkUsed(true);
videoCallRepository.save(videoCall);
-
- // if ("Completed".equalsIgnoreCase(requestEntity.getCallStatus())) {
- // saveRecordingFile(videoCall.getMeetingLink());
- // }
+
} else {
throw new Exception("Failed to update the call status");
}
@@ -110,28 +129,6 @@ public String updateCallStatus(UpdateCallRequest callRequest) throws Exception {
return OutputMapper.gsonWithoutExposeRestriction()
.toJson(videoCallMapper.videoCallToResponse(videoCall));
}
-private void saveRecordingFile(String meetingLink) {
- try {
- // Configurable Jibri recording location
- String jibriOutputDir = ConfigProperties.getPropertyByName("jibri.output.path"); // e.g., /srv/jibri/recordings
- String saveDir = ConfigProperties.getPropertyByName("video.recording.path"); // e.g., /srv/recordings
-
- File jibriDir = new File(jibriOutputDir);
- File[] matchingFiles = jibriDir.listFiles((dir, name) -> name.contains(meetingLink) && name.endsWith(".mp4"));
-
- if (matchingFiles != null && matchingFiles.length > 0) {
- File recording = matchingFiles[0];
- Path targetPath = Paths.get(saveDir, meetingLink + ".mp4");
-
- Files.copy(recording.toPath(), targetPath, StandardCopyOption.REPLACE_EXISTING);
- logger.info("Recording file saved: " + targetPath);
- } else {
- logger.warn("No matching recording file found for meeting: " + meetingLink);
- }
- } catch (IOException e) {
- logger.error("Error saving recording file: ", e);
- }
-}
}