diff --git a/pom.xml b/pom.xml
index 3a9bb7d1..b56a968d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,19 +48,6 @@
 		</repository>
 	</repositories>
 	<dependencies>
-
-		<dependency>
-		<groupId>org.apache.httpcomponents</groupId>
-		<artifactId>httpclient</artifactId>
-		
-		</dependency>
-		<!-- https://mvnrepository.com/artifact/xmlpull/xmlpull -->
-<dependency>
-    <groupId>xmlpull</groupId>
-    <artifactId>xmlpull</artifactId>
-    <version>1.1.3.1</version>
-</dependency>
-
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter</artifactId>
diff --git a/src/main/environment/common_dev.properties b/src/main/environment/common_dev.properties
index 7b8521f1..2bd12f14 100644
--- a/src/main/environment/common_dev.properties
+++ b/src/main/environment/common_dev.properties
@@ -63,8 +63,9 @@ start-email-scheduler=false
 cron-scheduler-email=0 0/1 * * * ? *
 
 ###cti data sync Scheduler configurations
+#Runs at every alternative days at 2AM
 start-ctidatasync-scheduler=false
-cron-scheduler-ctidatasync=0 00 01 * * ? *
+cron-scheduler-ctidatasync=0 0 2 */2 * ?
 
 ###cti data check with call detail report Scheduler
 #Runs at everyday 12:10AM 
diff --git a/src/main/environment/common_test.properties b/src/main/environment/common_test.properties
index 1e51a0c3..2fae65eb 100644
--- a/src/main/environment/common_test.properties
+++ b/src/main/environment/common_test.properties
@@ -13,6 +13,7 @@ spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 secondary.datasource.username=<Enter your DB_REPORTING username>
 secondary.datasource.password=<Enter your DB_REPORTING password>
 secondary.datasource.url=<Enter DB_REPORTING URL here>
+secondary.datasource.driver-class-name=com.mysql.jdbc.Drive
 
 encDbUserName=zFlYsp9Z0s+lRvLM15A3g/Ba0w8VGs/1usuW7EsGF3k=
 encDbPass=JGGAGn5wTlrbTLUHY+5BzfBa0w8VGs/1usuW7EsGF3k=
@@ -58,8 +59,10 @@ start-email-scheduler=false
 cron-scheduler-email=0 0/1 * * * ? *
 ##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
 
+#Runs at every alternative days at 2AM
 start-ctidatasync-scheduler=false
-cron-scheduler-ctidatasync=0 00 01 * * ? *
+cron-scheduler-ctidatasync=0 0 2 */2 * ?
+
 
 ##-------------------------------###cti data check with call detail report Scheduler------------------------------------------------------
 
@@ -155,9 +158,6 @@ eSanjeevani.source: 11001
 eSanjeevani.registerPatient: https://preprod.esanjeevaniopd.xyz/uat/ps/api/v1/Patient
 eSanjeevani.routeUrl: https://uat.esanjeevani.in/user/signin
 
-biometric.discover.url = http://127.0.0.1:port/
-biometric.deviceInfo.url = http://127.0.0.1:port/rd/info
-biometric.capture.url = http://127.0.0.1:port/rd/capture
 eAusadhaUrl=https://dlc.kar.nic.in/e-services/api/DWInstituteInward
 
 eausadhaAuthorization=<Enter eausadha authorization key>
diff --git a/src/main/java/com/iemr/common/config/BlockingHttpMethodInterceptor.java b/src/main/java/com/iemr/common/config/BlockingHttpMethodInterceptor.java
deleted file mode 100644
index 447e3aaa..00000000
--- a/src/main/java/com/iemr/common/config/BlockingHttpMethodInterceptor.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.iemr.common.config;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.servlet.HandlerInterceptor;
-import org.springframework.web.servlet.ModelAndView;
-
-public class BlockingHttpMethodInterceptor implements HandlerInterceptor {
-	@Override
-    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
-        String method = request.getMethod();
-        if (!("GET".equals(method) || "POST".equals(method))) {
-            response.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
-            return false;
-        }
-        return true;
-}
-
-	@Override
-	public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
-			ModelAndView modelAndView) throws Exception {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
-			throws Exception {
-		// TODO Auto-generated method stub
-		
-	}
-}
\ No newline at end of file
diff --git a/src/main/java/com/iemr/common/config/InterceptorConfig.java b/src/main/java/com/iemr/common/config/InterceptorConfig.java
index 37817edf..2beb8de9 100644
--- a/src/main/java/com/iemr/common/config/InterceptorConfig.java
+++ b/src/main/java/com/iemr/common/config/InterceptorConfig.java
@@ -29,21 +29,14 @@
 import com.iemr.common.utils.http.HTTPRequestInterceptor;
 
 @Configuration
-public class InterceptorConfig extends WebMvcConfigurerAdapter
-{
+public class InterceptorConfig extends WebMvcConfigurerAdapter {
 
 	@Autowired
 	HTTPRequestInterceptor requestInterceptor;
 
-//	@Override
-//	public void addInterceptors(InterceptorRegistry registry)
-//	{
-//		registry.addInterceptor(requestInterceptor);
-//	}
-	
 	@Override
-    public void addInterceptors(InterceptorRegistry registry) {
-        registry.addInterceptor(new BlockingHttpMethodInterceptor())
-                .addPathPatterns("/**"); 
-    }
+	public void addInterceptors(InterceptorRegistry registry) {
+		registry.addInterceptor(requestInterceptor);
+	}
+
 }
\ No newline at end of file
diff --git a/src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java b/src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java
index 598a78d4..01da9a30 100644
--- a/src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java
+++ b/src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java
@@ -188,7 +188,8 @@ public String createBeneficiary(
 					+ "\"healthCareWorkerID\":\"Short\",\"communityID\":\"Integer\",\"districtID\":\"Integer\",\"stateID\":\"Integer\","
 					+ "\"pinCode\":\"String\",\"blockID\":\"Integer\",\"districtBranchID\":\"Integer\",\"createdBy\":\"String\","
 					+ "\"addressLine1\":\"String\"},\"benPhoneMaps\":{\"parentBenRegID\":\"Long\",\"phoneNo\":\"String\","
-					+ "\"phoneTypeID\":\"Integer\",\"benRelationshipID\":\"Integer\",\"deleted\":\"Boolean\",\"createdBy\":\"String\"}}") @RequestBody BeneficiaryModel beneficiaryModel,
+					+ "\"phoneTypeID\":\"Integer\",\"benRelationshipID\":\"Integer\",\"deleted\":\"Boolean\",\"createdBy\":\"String\"},"
+					+ "\"faceEmbedding\":[\"Float\"]}") @RequestBody BeneficiaryModel beneficiaryModel,
 			HttpServletRequest httpRequest) {
 		OutputResponse response = new OutputResponse();
 
diff --git a/src/main/java/com/iemr/common/controller/biometric/BiometricController.java b/src/main/java/com/iemr/common/controller/biometric/BiometricController.java
deleted file mode 100644
index 79546c87..00000000
--- a/src/main/java/com/iemr/common/controller/biometric/BiometricController.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.iemr.common.controller.biometric;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
- 
-
-import com.iemr.common.service.biometric.BiometricService;
-import com.iemr.common.utils.response.OutputResponse;
-
- 
-
-import io.swagger.annotations.ApiOperation;
-
-@CrossOrigin
-@RestController
-@RequestMapping(value = "/biometric")
-public class BiometricController {
-	private Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
-	@Autowired
-	private BiometricService biometricService;
-	@CrossOrigin
-	@RequestMapping(value = { "/getBiometricData/{pid}" }, method = { RequestMethod.GET }, headers = "Authorization")
-	public String saveBenNurseDataCAC(@PathVariable("pid") String pid,
-			@RequestHeader(value = "Authorization") String Authorization) {
-		OutputResponse response = new OutputResponse();
-		try {
-			String pidResponse = biometricService.getBioData(pid);
-			response.setResponse(pidResponse);
-		}catch (Exception e) {
-			logger.error("Error while fetching Biometric data : "+e.getMessage());
-		}
-		return response.toString();
-	}
-}
\ No newline at end of file
diff --git a/src/main/java/com/iemr/common/controller/callhandling/CallController.java b/src/main/java/com/iemr/common/controller/callhandling/CallController.java
index 2ea0f9b8..bd79929d 100644
--- a/src/main/java/com/iemr/common/controller/callhandling/CallController.java
+++ b/src/main/java/com/iemr/common/controller/callhandling/CallController.java
@@ -175,6 +175,7 @@ public String closeCall(
 					+ "\"agentIPAddress\":\"Optional String - agent IP address\", "
 					+ "\"agentID\":\"Optional String - agentID\", \"isSelf\":\"Optional boolean\", "
 					+ "\"isFeedback\":\"optional Boolean true if IVRS feedback to be taken\", "
+					+ "\"IsOutbound\":\"Optional Boolean - for checking outboundcall status\", "
 					+ "\"isTransfered\":\"Boolean - transfer call or not\"" + "}") @RequestBody String request,
 			HttpServletRequest serverRequest) {
 		OutputResponse response = new OutputResponse();
diff --git a/src/main/java/com/iemr/common/controller/carestream/CareStreamCreateOrderController.java b/src/main/java/com/iemr/common/controller/carestream/CareStreamCreateOrderController.java
index 529c759c..4a4f2a05 100644
--- a/src/main/java/com/iemr/common/controller/carestream/CareStreamCreateOrderController.java
+++ b/src/main/java/com/iemr/common/controller/carestream/CareStreamCreateOrderController.java
@@ -44,7 +44,6 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 
-@PropertySource("classpath:myapp.properties")
 @RestController
 @RequestMapping(value = "/carestream")
 public class CareStreamCreateOrderController {
diff --git a/src/main/java/com/iemr/common/controller/nhmdashboard/NHMDetailCallReportScheduler.java b/src/main/java/com/iemr/common/controller/nhmdashboard/NHMDetailCallReportScheduler.java
index 8a9d4aed..3451d56f 100644
--- a/src/main/java/com/iemr/common/controller/nhmdashboard/NHMDetailCallReportScheduler.java
+++ b/src/main/java/com/iemr/common/controller/nhmdashboard/NHMDetailCallReportScheduler.java
@@ -4,9 +4,13 @@
 import java.sql.Timestamp;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Objects;
+import java.util.Set;
 
 import org.apache.xml.security.stax.config.ConfigurationProperties;
+import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +21,7 @@
 
 import com.iemr.common.data.callhandling.BeneficiaryCall;
 import com.iemr.common.data.nhm_dashboard.DetailedCallReport;
+import com.iemr.common.repository.callhandling.IEMRCalltypeRepositoryImplCustom;
 import com.iemr.common.repository.nhm_dashboard.DetailedCallReportRepo;
 import com.iemr.common.repository.report.CallReportRepo;
 import com.iemr.common.utils.config.ConfigProperties;
@@ -31,12 +36,14 @@ public class NHMDetailCallReportScheduler {
 	@Autowired
 	private CallReportRepo callReportRepo;
 
+	@Autowired
+	private IEMRCalltypeRepositoryImplCustom iEMRCalltypeRepositoryImplCustom;
+
 	Logger logger = LoggerFactory.getLogger(this.getClass().getName());
 
 	@Value("${start-ctidatacheck-scheduler}")
 	private boolean startCtiDataCheckFlag;
 
-
 	@Scheduled(cron = "${cron-scheduler-ctidatacheck}")
 	public void detailedCallReport() {
 		if (startCtiDataCheckFlag) {
@@ -48,7 +55,7 @@ public void detailedCallReport() {
 				String[] dateArr = date.toString().split("T");
 				endDate = dateArr[0].concat(" 23:59:59");
 				fromDate = dateArr[0].concat(" 00:00:01");
-
+                
 				Timestamp fromTime = Timestamp.valueOf(fromDate);
 				Timestamp endTime = Timestamp.valueOf(endDate);
 				logger.info("Call detailed report check request - FromTime -" + fromTime + "Endtime - " + endTime);
@@ -57,19 +64,52 @@ public void detailedCallReport() {
 				for (DetailedCallReport detailedCallReport : findByCallStartTimeBetween) {
 					String phoneNo = detailedCallReport.getPHONE();
 					String sessionID = detailedCallReport.getSession_ID();
-					int existRecord = callReportRepo.getBenCallDetailsBySessionIDAndPhone(sessionID, phoneNo);
-					if (existRecord != 0) {
+					BeneficiaryCall existRecord = callReportRepo.getBenCallDetailsBySessionIDAndPhone(sessionID,phoneNo);
+					if (existRecord != null) {
 						logger.info("Record already present in t_bencall table with sessionID : " + sessionID
 								+ " phoneNo : " + phoneNo);
+						logger.info("Existing record from t_bencall: " + existRecord);
 						if (null != detailedCallReport.getOrientation_Type()
 								&& detailedCallReport.getOrientation_Type().equalsIgnoreCase("OUTBOUND")) {
-							callReportRepo.updateIsOutboundForCall(true, sessionID, phoneNo );
+							
+							if(existRecord.getCallTypeID() == null) {
+								logger.info("Called Service Id: " + existRecord.getCalledServiceID());
+							// Fetching callTypeId
+							Integer callTypeId = getCallTypeId(true, existRecord.getCalledServiceID(),
+									detailedCallReport);
+							
+							logger.info("CallTypeId after comparison: " + callTypeId);
+							if (callTypeId != null) {
+								callReportRepo.updateIsOutboundForCallWithCallType(true, sessionID, phoneNo,callTypeId);
+							} else {
+								callReportRepo.updateIsOutboundForCall(true, sessionID, phoneNo);
+							}
+							}
+							else {
+								callReportRepo.updateIsOutboundForCall(true, sessionID, phoneNo);
+							}
 						} else {
-							callReportRepo.updateIsOutboundForCall(false, sessionID, phoneNo );
+							if(existRecord.getCallTypeID() == null) {
+								
+								logger.info("Called Service Id: " + existRecord.getCalledServiceID());
+							// Fetching callTypeId
+							Integer callTypeId = getCallTypeId(false, existRecord.getCalledServiceID(),
+									detailedCallReport);
+
+							logger.info("CallTypeId after comparison: " + callTypeId);
+							if (callTypeId != null) {
+								callReportRepo.updateIsOutboundForCallWithCallType(false, sessionID, phoneNo, callTypeId);
+							} else {
+								callReportRepo.updateIsOutboundForCall(false, sessionID, phoneNo);
+							}
+							
+						}
+							else {
+								callReportRepo.updateIsOutboundForCall(false, sessionID, phoneNo);
+							}
 						}
 					} else {
-						logger.info("Record missed in t_bencall table with sessionID : " + sessionID + " phoneNo : "
-								+ phoneNo);
+						logger.info("Record missed in t_bencall table with sessionID : " + sessionID + " phoneNo : " + phoneNo);
 						BeneficiaryCall callDetail = getCallDetail(detailedCallReport);
 						callReportRepo.save(callDetail);
 					}
@@ -82,6 +122,36 @@ public void detailedCallReport() {
 
 	}
 
+	private Integer getCallTypeId(Boolean isOutbound, Integer calledServiceId, DetailedCallReport detailedCallReport) {
+		Set<Objects[]> callTypesArray = new HashSet<Objects[]>();
+
+		if (detailedCallReport.getAgent_Disposition_Category() != null
+				&& detailedCallReport.getAgent_Disposition() != null) {
+			if (isOutbound == true) {
+				callTypesArray = iEMRCalltypeRepositoryImplCustom.getOutboundCallTypes(calledServiceId, true);
+			} else {
+				callTypesArray = iEMRCalltypeRepositoryImplCustom.getInboundCallTypes(calledServiceId, true);
+			}
+
+			for (Object[] object : callTypesArray) {
+				String callGroupType = (String) object[3];
+				String callType = (String) object[0];
+				String detailedCallGroupType = detailedCallReport.getAgent_Disposition_Category().replace("_", " ");
+				String detailedCallType = detailedCallReport.getAgent_Disposition().replace("_", " ");
+				logger.info("Detailed Call - CallGroupType: " + detailedCallGroupType);
+				logger.info("Detailed Call - CallType: " + detailedCallType);
+				
+				if (callGroupType.equalsIgnoreCase(detailedCallGroupType)
+						&& callType.equalsIgnoreCase(detailedCallType)) {
+					return (Integer) object[1];
+				}
+			}
+		}
+
+		return null;
+
+	}
+
 	private BeneficiaryCall getCallDetail(DetailedCallReport detailedCallReport) {
 		BeneficiaryCall beneficiaryCall = new BeneficiaryCall();
 		beneficiaryCall.setCallID(detailedCallReport.getSession_ID());
@@ -104,7 +174,8 @@ private BeneficiaryCall getCallDetail(DetailedCallReport detailedCallReport) {
 		beneficiaryCall.setCreatedBy("Admin");
 
 		beneficiaryCall.setCallDuration(String.valueOf(detailedCallReport.getCall_Duration()));
-
+		
+		
 		return beneficiaryCall;
 
 	}
diff --git a/src/main/java/com/iemr/common/data/beneficiary/Beneficiary.java b/src/main/java/com/iemr/common/data/beneficiary/Beneficiary.java
index c8c1bf66..d66c8910 100644
--- a/src/main/java/com/iemr/common/data/beneficiary/Beneficiary.java
+++ b/src/main/java/com/iemr/common/data/beneficiary/Beneficiary.java
@@ -72,6 +72,8 @@ public class Beneficiary
 
 	private String titleName;
 
+	private List<Float> faceEmbedding;
+
 	@JsonIgnore
 
 	private Title m_title;
@@ -769,6 +771,23 @@ public Beneficiary(Long BeneficiaryRegID, String BeneficiaryID, String FirstName
 		this.benPhoneMaps = phoneMap;
 	}
 
+	public Beneficiary(Long BeneficiaryRegID, String BeneficiaryID, String FirstName, String MiddleName,
+			String LastName, Gender m_gender, Timestamp DOB, List<Float> faceEmbedding) {
+		this.beneficiaryRegID = BeneficiaryRegID;
+		this.beneficiaryID = BeneficiaryID;
+		this.firstName = FirstName;
+		this.middleName = MiddleName;
+		this.lastName = LastName;
+		this.m_gender = m_gender;
+		this.dOB = DOB;
+		if (DOB != null) {
+			this.age = Integer
+					.parseInt(formatYear.format(new Date(Calendar.getInstance().getTime().getTime() - DOB.getTime())))
+					- START_YEAR_1970;
+		}
+		this.faceEmbedding = faceEmbedding;
+	}
+
 	public Beneficiary(Long BeneficiaryRegID, String BeneficiaryID, String FirstName, String MiddleName,
 			String LastName, Gender m_gender, Timestamp DOB)
 	{
@@ -903,3 +922,4 @@ public Beneficiary()
 	// }
 
 }
+
diff --git a/src/main/java/com/iemr/common/dto/identity/CommonIdentityDTO.java b/src/main/java/com/iemr/common/dto/identity/CommonIdentityDTO.java
index 52d63649..5efb2277 100644
--- a/src/main/java/com/iemr/common/dto/identity/CommonIdentityDTO.java
+++ b/src/main/java/com/iemr/common/dto/identity/CommonIdentityDTO.java
@@ -89,6 +89,8 @@ public class CommonIdentityDTO {
 	private String title;
 	private Integer zoneId;
 	private String monthlyFamilyIncome;
+	
+	private List<Float> faceEmbedding;
 
 	// address
 	private Address currentAddress;
diff --git a/src/main/java/com/iemr/common/mapper/BenCompleteDetailMapperDecorator.java b/src/main/java/com/iemr/common/mapper/BenCompleteDetailMapperDecorator.java
index a9d7f947..34d4abba 100644
--- a/src/main/java/com/iemr/common/mapper/BenCompleteDetailMapperDecorator.java
+++ b/src/main/java/com/iemr/common/mapper/BenCompleteDetailMapperDecorator.java
@@ -31,8 +31,7 @@
 import com.iemr.common.model.beneficiary.BeneficiaryDemographicsModel;
 import com.iemr.common.model.userbeneficiary.LanguageModel;
 
-public abstract class BenCompleteDetailMapperDecorator implements BenCompleteDetailMapper
-{
+public abstract class BenCompleteDetailMapperDecorator implements BenCompleteDetailMapper {
 	@Autowired
 	StateMapper stateMapper;
 	@Autowired
@@ -67,55 +66,52 @@ public abstract class BenCompleteDetailMapperDecorator implements BenCompleteDet
 	MaritalStatusMapper maritalStatusMapper;
 
 	@Override
-	public BeneficiaryDemographicsModel createBenDemographicsModel(BeneficiariesDTO beneficiariesDTO)
-	{
+	public BeneficiaryDemographicsModel createBenDemographicsModel(BeneficiariesDTO beneficiariesDTO) {
 		Address address = beneficiariesDTO.getCurrentAddress();
 		BigInteger benRegID = beneficiariesDTO.getBenRegId();
 		String createdBy = beneficiariesDTO.getCreatedBy();
 		BenDetailDTO benDetails = beneficiariesDTO.getBeneficiaryDetails();
 
 		BeneficiaryDemographicsModel demographicsModel = new BeneficiaryDemographicsModel();
-		demographicsModel.setBeneficiaryRegID(Long.parseLong(benRegID.toString()));
-		demographicsModel.setStateID(address.getStateId());
-		if (address.getStateId() != null)
-		{
+		if (benRegID != null)
+			demographicsModel.setBeneficiaryRegID(Long.parseLong(benRegID.toString()));
+
+		if (address != null && address.getStateId() != null) {
+			demographicsModel.setStateID(address.getStateId());
 			demographicsModel.setM_state(stateMapper.StateToModelByID(address.getStateId()));
 			demographicsModel.setStateName(demographicsModel.getM_state().getStateName());
 		}
-		demographicsModel.setDistrictID(address.getDistrictId());
-		if (address.getDistrictId() != null)
-		{
+
+		if (address != null && address.getDistrictId() != null) {
+			demographicsModel.setDistrictID(address.getDistrictId());
 			demographicsModel.setM_district(districtMapper.districtToModelByID(address.getDistrictId()));
 			demographicsModel.setDistrictName(demographicsModel.getM_district().getDistrictName());
 		}
-		demographicsModel.setBlockID(address.getSubDistrictId());
-		if (address.getSubDistrictId() != null)
-		{
+
+		if (address != null && address.getSubDistrictId() != null) {
+			demographicsModel.setBlockID(address.getSubDistrictId());
 			demographicsModel.setM_districtblock(blockMapper.districtBlockToModelByID(address.getSubDistrictId()));
 			demographicsModel.setBlockName(demographicsModel.getM_districtblock().getBlockName());
 		}
-		demographicsModel.setDistrictBranchID(address.getVillageId());
-		if (address.getVillageId() != null)
-		{
+
+		if (address != null && address.getVillageId() != null) {
+			demographicsModel.setDistrictBranchID(address.getVillageId());
 			demographicsModel
 					.setM_districtbranchmapping(branchMapper.districtBranchToModelByID(address.getVillageId()));
 			demographicsModel.setDistrictBranchName(demographicsModel.getM_districtbranchmapping().getVillageName());
 		}
 		demographicsModel.setEducationID(benDetails.getEducationId());
-		if (benDetails.getEducationId() != null)
-		{
+		if (benDetails.getEducationId() != null) {
 			demographicsModel.setI_beneficiaryeducation(
 					educationMapper.educationToModelByID(Long.parseLong(benDetails.getEducationId().toString())));
 			demographicsModel.setEducationName(demographicsModel.getI_beneficiaryeducation().getEducationType());
 		}
 		demographicsModel.setCommunityID(benDetails.getCommunityId());
-		if (benDetails.getCommunityId() != null)
-		{
+		if (benDetails.getCommunityId() != null) {
 			demographicsModel.setM_community(communityMapper.communityToLoginResponseByID(benDetails.getCommunityId()));
 			demographicsModel.setCommunityName(demographicsModel.getM_community().getCommunityType());
 		}
-		if (benDetails.getOccupationId() != null)
-		{
+		if (benDetails.getOccupationId() != null) {
 			demographicsModel.setOccupationID(benDetails.getOccupationId());
 			demographicsModel.setOccupationName(benDetails.getOccupation());
 		}
@@ -124,13 +120,11 @@ public BeneficiaryDemographicsModel createBenDemographicsModel(BeneficiariesDTO
 		demographicsModel.setIncomeStatus(benDetails.getIncomeStatus());
 		demographicsModel.setIncomeStatusName(benDetails.getIncomeStatus());
 		// }
-		if (benDetails.getReligionId() != null)
-		{
+		if (benDetails.getReligionId() != null) {
 			demographicsModel.setReligionID(benDetails.getReligionId());
 			demographicsModel.setReligionName(benDetails.getReligion());
 		}
-		if (benDetails.getIncomeStatusId() != null)
-		{
+		if (benDetails.getIncomeStatusId() != null) {
 			demographicsModel.setIncomeStatusID(benDetails.getIncomeStatusId());
 			demographicsModel.setIncomeStatusName(benDetails.getIncomeStatus());
 			demographicsModel.setIncomeStatus(benDetails.getIncomeStatus());
@@ -139,33 +133,32 @@ public BeneficiaryDemographicsModel createBenDemographicsModel(BeneficiariesDTO
 			demographicsModel.setMonthlyFamilyIncome(benDetails.getMonthlyFamilyIncome());
 		}
 		demographicsModel.setCreatedBy(createdBy);
-		demographicsModel.setPinCode(address.getPinCode());
-		demographicsModel.setAddressLine1(address.getAddrLine1());
-		demographicsModel.setAddressLine2(address.getAddrLine2());
-		demographicsModel.setAddressLine3(address.getAddrLine3());
-		demographicsModel.setHealthCareWorkerID(benDetails.getHealthCareWorkerId());
-		demographicsModel.setZoneID(address.getZoneID());
-		demographicsModel.setZoneName(address.getZoneName());
-		demographicsModel.setParkingPlaceID(address.getParkingPlaceID());
-		demographicsModel.setParkingPlaceName(address.getParkingPlaceName());
-		demographicsModel.setServicePointID(address.getServicePointID());
-		demographicsModel.setServicePointName(address.getServicePointName());
-		demographicsModel.setHabitation(address.getHabitation());
+		if (address != null) {
+			demographicsModel.setPinCode(address.getPinCode());
+			demographicsModel.setAddressLine1(address.getAddrLine1());
+			demographicsModel.setAddressLine2(address.getAddrLine2());
+			demographicsModel.setAddressLine3(address.getAddrLine3());
+			demographicsModel.setHealthCareWorkerID(benDetails.getHealthCareWorkerId());
+			demographicsModel.setZoneID(address.getZoneID());
+			demographicsModel.setZoneName(address.getZoneName());
+			demographicsModel.setParkingPlaceID(address.getParkingPlaceID());
+			demographicsModel.setParkingPlaceName(address.getParkingPlaceName());
+			demographicsModel.setServicePointID(address.getServicePointID());
+			demographicsModel.setServicePointName(address.getServicePointName());
+			demographicsModel.setHabitation(address.getHabitation());
+		}
 		demographicsModel.setPreferredLangID(beneficiariesDTO.getBeneficiaryDetails().getPreferredLanguageId());
-		LanguageModel lang =
-				languageMapper.languageToModelByID(beneficiariesDTO.getBeneficiaryDetails().getPreferredLanguageId());
+		LanguageModel lang = languageMapper
+				.languageToModelByID(beneficiariesDTO.getBeneficiaryDetails().getPreferredLanguageId());
 		demographicsModel.setM_language(lang);
-		if (lang != null)
-		{
+		if (lang != null) {
 			demographicsModel.setPreferredLangName(lang.getLanguageName());
 		}
 		return demographicsModel;
 	}
 
-	protected Address beneficiaryDemographicsModelToAddress(BeneficiaryDemographicsModel beneficiaryDemographicsModel)
-	{
-		if (beneficiaryDemographicsModel == null)
-		{
+	protected Address beneficiaryDemographicsModelToAddress(BeneficiaryDemographicsModel beneficiaryDemographicsModel) {
+		if (beneficiaryDemographicsModel == null) {
 			return null;
 		}
 
@@ -176,15 +169,13 @@ protected Address beneficiaryDemographicsModelToAddress(BeneficiaryDemographicsM
 		address.setParkingPlaceName(beneficiaryDemographicsModel.getParkingPlaceName());
 		address.setStateId(beneficiaryDemographicsModel.getStateID());
 		address.setDistrictId(beneficiaryDemographicsModel.getDistrictID());
-		if (beneficiaryDemographicsModel.getDistrictID() != null)
-		{
+		if (beneficiaryDemographicsModel.getDistrictID() != null) {
 			address.setDistrict(
 					districtMapper.districtToModelByID(beneficiaryDemographicsModel.getDistrictID()).getDistrictName());
 		}
 		address.setServicePointName(beneficiaryDemographicsModel.getServicePointName());
 		address.setCountry(beneficiaryDemographicsModel.getCountryName());
-		if (beneficiaryDemographicsModel.getStateID() != null)
-		{
+		if (beneficiaryDemographicsModel.getStateID() != null) {
 			address.setState(stateMapper.StateToModelByID(beneficiaryDemographicsModel.getStateID()).getStateName());
 		}
 		address.setZoneName(beneficiaryDemographicsModel.getZoneName());
@@ -195,15 +186,13 @@ protected Address beneficiaryDemographicsModelToAddress(BeneficiaryDemographicsM
 		address.setPinCode(beneficiaryDemographicsModel.getPinCode());
 		address.setParkingPlaceID(beneficiaryDemographicsModel.getParkingPlaceID());
 		address.setServicePointID(beneficiaryDemographicsModel.getServicePointID());
-		if (beneficiaryDemographicsModel.getDistrictBranchID() != null)
-		{
+		if (beneficiaryDemographicsModel.getDistrictBranchID() != null) {
 			address.setVillage(branchMapper
 					.districtBranchToModelByID(beneficiaryDemographicsModel.getDistrictBranchID()).getVillageName());
 		}
 		address.setSubDistrictId(beneficiaryDemographicsModel.getBlockID());
 		address.setCountryId(beneficiaryDemographicsModel.getCountryID());
-		if (beneficiaryDemographicsModel.getBlockID() != null)
-		{
+		if (beneficiaryDemographicsModel.getBlockID() != null) {
 			address.setSubDistrict(
 					blockMapper.districtBlockToModelByID(beneficiaryDemographicsModel.getBlockID()).getBlockName());
 		}
diff --git a/src/main/java/com/iemr/common/model/beneficiary/BeneficiaryModel.java b/src/main/java/com/iemr/common/model/beneficiary/BeneficiaryModel.java
index ed0980a6..45a5bea7 100644
--- a/src/main/java/com/iemr/common/model/beneficiary/BeneficiaryModel.java
+++ b/src/main/java/com/iemr/common/model/beneficiary/BeneficiaryModel.java
@@ -242,6 +242,10 @@ public class BeneficiaryModel implements Comparable<BeneficiaryModel> {
 	private Boolean isD2D;
 
 	// END OF new column added for data sync
+	// new column added for face recognition
+	@Expose
+	private List<Float> faceEmbedding;
+	// END OF new column added for face recognition
 
 	// ABHA address
 	List<AbhaAddressDTO> abhaDetails;
@@ -376,3 +380,4 @@ public int compareTo(BeneficiaryModel ben) {
 		return this.beneficiaryRegID.compareTo(ben.beneficiaryRegID);
 	}
 }
+
diff --git a/src/main/java/com/iemr/common/repository/callhandling/BeneficiaryCallRepository.java b/src/main/java/com/iemr/common/repository/callhandling/BeneficiaryCallRepository.java
index e66778c4..cb11ce55 100644
--- a/src/main/java/com/iemr/common/repository/callhandling/BeneficiaryCallRepository.java
+++ b/src/main/java/com/iemr/common/repository/callhandling/BeneficiaryCallRepository.java
@@ -59,13 +59,13 @@ public int closeCallOld(@Param("benCallID") Long benCallID, @Param("remarks") St
 	@Query("update BeneficiaryCall set callEndTime = :callEndTime, remarks = :remarks, "
 			+ "callClosureType = :callClosureType, " + "dispositionStatusID = :dispositionStatusID, "
 			+ "callTypeID = :callTypeID, emergencyType = :emergencyType,"
-			+ " externalReferral=:externalReferral,instTypeId=:instTypeId,instName=:instName"
+			+ " externalReferral=:externalReferral,instTypeId=:instTypeId,instName=:instName,isOutbound = :isOutbound"
 			+ "   where benCallID = :benCallID")
 	public int closeCall(@Param("benCallID") Long benCallID, @Param("remarks") String remarks,
 			@Param("callEndTime") Timestamp callEndTime, @Param("callClosureType") String callClosureType,
 			@Param("callTypeID") Integer callTypeID, @Param("dispositionStatusID") Integer dispositionStatusID,
 			@Param("emergencyType") Short emergencyType, @Param("externalReferral") String externalReferral,
-			@Param("instTypeId") Integer instTypeId, @Param("instName") String instName);
+			@Param("instTypeId") Integer instTypeId, @Param("instName") String instName, @Param("isOutbound") Boolean isOutbound);
 
 	// @Transactional(propagation = Propagation.REQUIRES_NEW)
 	@Transactional
diff --git a/src/main/java/com/iemr/common/repository/report/CallReportRepo.java b/src/main/java/com/iemr/common/repository/report/CallReportRepo.java
index 3104427e..2e1e4dba 100644
--- a/src/main/java/com/iemr/common/repository/report/CallReportRepo.java
+++ b/src/main/java/com/iemr/common/repository/report/CallReportRepo.java
@@ -44,13 +44,18 @@ public interface CallReportRepo extends CrudRepository<BeneficiaryCall, Integer>
 			+ "and report.createdDate >= :startDate and report.createdDate <= :endDate ")
 	public List<BeneficiaryCall> getAllBenCallIDetails(@Param("startDate") Timestamp startDate, @Param("endDate") Timestamp endDate);//start date and end date as param for x days.
 
-	@Query("SELECT COUNT(*) FROM BeneficiaryCall call WHERE call.callID = :sessionID and call.phoneNo = :phoneNo")
-	public int getBenCallDetailsBySessionIDAndPhone(@Param("sessionID") String sessionID,@Param("phoneNo") String phoneNo);
+	@Query("SELECT call FROM BeneficiaryCall call WHERE call.callID = :sessionID and call.phoneNo = :phoneNo")
+	public BeneficiaryCall getBenCallDetailsBySessionIDAndPhone(@Param("sessionID") String sessionID,@Param("phoneNo") String phoneNo);
 	
 	@Transactional
 	@Modifying
 	@Query("update BeneficiaryCall set isOutbound= :isOutbound where callID = :callID and phoneNo= :phoneNo")
 	public int updateIsOutboundForCall(@Param("isOutbound") boolean isOutbound, @Param("callID") String callID, @Param("phoneNo") String phoneNo );
+	
+	@Transactional
+	@Modifying
+	@Query("update BeneficiaryCall set isOutbound= :isOutbound, callTypeID= :callTypeID where callID = :callID and phoneNo= :phoneNo")
+	public int updateIsOutboundForCallWithCallType(@Param("isOutbound") boolean isOutbound, @Param("callID") String callID, @Param("phoneNo") String phoneNo, @Param("callTypeID") Integer callTypeID );
 }
 
 
diff --git a/src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserServiceImpl.java b/src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserServiceImpl.java
index 159f2b1f..43d56e94 100644
--- a/src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserServiceImpl.java
@@ -188,22 +188,42 @@ public List<BeneficiaryModel> userExitsCheckWithHealthId_ABHAId(String healthID,
 			throws Exception {
 		// result list
 		List<BeneficiaryModel> beneficiaryList = new ArrayList<BeneficiaryModel>();
-		// search patient by ben id, call Identity API
-		List<BeneficiariesDTO> listBen = identityBeneficiaryService.getBeneficiaryListByHealthID_ABHAAddress(healthID,
-				auth, is1097);
+		List<BeneficiariesDTO> listBen = null;
+		if (healthID.contains("@")) {
+			listBen = identityBeneficiaryService.getBeneficiaryListByHealthID_ABHAAddress(healthID, auth, is1097);
+		} else {
+			String healthIdNumber = getHealthId(healthID);
+			listBen = identityBeneficiaryService.getBeneficiaryListByHealthIDNo_ABHAIDNo(healthIdNumber, auth, is1097);
+		}
 
 		beneficiaryList = getBeneficiaryListFromMapper(listBen);
 		return beneficiaryList;
 	}
-
+	private String getHealthId(String healthID) {
+		String healthIdNumber = null;
+		if (null != healthID) {
+			if (healthID.length() == 17) {
+				healthIdNumber = healthID;
+			} else {
+				StringBuilder stringBuilder = new StringBuilder();
+				stringBuilder.append(healthID.substring(0, 2)).append("-");
+				stringBuilder.append(healthID.substring(2, 6)).append("-");
+				stringBuilder.append(healthID.substring(6, 10)).append("-");
+				stringBuilder.append(healthID.substring(10));
+				String formattedHealthID = stringBuilder.toString();
+				healthIdNumber = formattedHealthID;
+			}
+		}
+		return healthIdNumber;
+	}
 	// search patient by healthidNo / ABHA Id No
 	@Override
 	public List<BeneficiaryModel> userExitsCheckWithHealthIdNo_ABHAIdNo(String healthIDNo, String auth, Boolean is1097)
 			throws Exception {
 		// result list
 		List<BeneficiaryModel> beneficiaryList = new ArrayList<BeneficiaryModel>();
-		// search patient by ben id, call Identity API
-		List<BeneficiariesDTO> listBen = identityBeneficiaryService.getBeneficiaryListByHealthIDNo_ABHAIDNo(healthIDNo,
+		String healthId = getHealthId(healthIDNo);
+		List<BeneficiariesDTO> listBen = identityBeneficiaryService.getBeneficiaryListByHealthIDNo_ABHAIDNo(healthId,
 				auth, is1097);
 
 		beneficiaryList = getBeneficiaryListFromMapper(listBen);
diff --git a/src/main/java/com/iemr/common/service/beneficiary/RegisterBenificiaryServiceImpl.java b/src/main/java/com/iemr/common/service/beneficiary/RegisterBenificiaryServiceImpl.java
index 791bc51a..03478726 100644
--- a/src/main/java/com/iemr/common/service/beneficiary/RegisterBenificiaryServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/beneficiary/RegisterBenificiaryServiceImpl.java
@@ -138,6 +138,7 @@ public String save(BeneficiaryModel beneficiaryModel, HttpServletRequest servlet
 //		logger.info("benificiaryDetails: " + beneficiaryModel);
 
 		CommonIdentityDTO identityDTO = identityMapper.beneficiaryModelCommonIdentityDTO(beneficiaryModel);
+		identityDTO.setFaceEmbedding(beneficiaryModel.getFaceEmbedding());
 		identityDTO.setEmergencyRegistration(beneficiaryModel.isEmergencyRegistration());
 		identityDTO
 				.setBenFamilyDTOs(identityMapper.benPhoneMapListToBenFamilyDTOList(beneficiaryModel.getBenPhoneMaps()));
diff --git a/src/main/java/com/iemr/common/service/biometric/BiometricService.java b/src/main/java/com/iemr/common/service/biometric/BiometricService.java
deleted file mode 100644
index af3d400d..00000000
--- a/src/main/java/com/iemr/common/service/biometric/BiometricService.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.iemr.common.service.biometric;
-
-public interface BiometricService {
-
-	String getBioData(String pid);
-
-}
diff --git a/src/main/java/com/iemr/common/service/biometric/BiometricServiceImpl.java b/src/main/java/com/iemr/common/service/biometric/BiometricServiceImpl.java
deleted file mode 100644
index 0789ee86..00000000
--- a/src/main/java/com/iemr/common/service/biometric/BiometricServiceImpl.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package com.iemr.common.service.biometric;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URL;
-import java.util.Base64;
-import java.util.stream.Collectors;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpHeaders;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-import org.json.JSONObject;
-import org.json.XML;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Text;
-
-@Service
-public class BiometricServiceImpl implements BiometricService {
-	private Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
-
-	@Value("${biometric.discover.url}")
-	String discoverUrl;
-
-	@Value("${biometric.deviceInfo.url}")
-	private String deviceInfoUrl;
-
-	@Value("${biometric.capture.url}")
-	private String captureUrl;
-	
-	@Override
-	public String getBioData(String env) {
-		String pidRes = null;
-		try {
-			String portNumber = null;
-			for (int i = 11100; i <= 11120; i++) {
-				String port = String.valueOf(i);
-				String apiUrl = discoverUrl.replace("port", port);
-
-				String httpMethod = "RDSERVICE";
-				HttpClient httpClient = HttpClientBuilder.create().build();
-
-				HttpRequestBase request = new HttpRequestBase() {
-					@Override
-					public String getMethod() {
-						return httpMethod;
-					}
-				};
-				request.setURI(URI.create(apiUrl));
-				request.setHeader(HttpHeaders.CONTENT_TYPE, "TEXT/XML");
-				try {
-					HttpResponse response = httpClient.execute((HttpUriRequest) request);
-
-					HttpEntity entity = response.getEntity();
-					String responseString = EntityUtils.toString(entity, "UTF-8");
-					if (!responseString.contains("NOTREADY")) {
-						portNumber = port;
-						break;
-					}
-				} catch (Exception e) {
-					logger.error("Error while checking biometric status: " + e.getMessage());
-				}
-			}
-			String xmlResponse = getDeviceInfo(portNumber, env);
-			if(xmlResponse != null) {
-				pidRes = Base64.getEncoder().encodeToString(xmlResponse.getBytes());
-			}
-		} catch (Exception e) {
-			logger.error("Error while getting biometric data: " + e.getMessage());
-		}
-		return pidRes;
-	}
-
-	private String getDeviceInfo(String portNumber, String env) {
-		String deviceRes = null;
-		String deviceInforURL = deviceInfoUrl.replace("port", portNumber);
-
-		String httpMethod = "DEVICEINFO";
-		HttpClient httpClient = HttpClientBuilder.create().build();
-
-		HttpRequestBase request = new HttpRequestBase() {
-			@Override
-			public String getMethod() {
-				return httpMethod;
-			}
-		};
-		request.setURI(URI.create(deviceInforURL));
-		request.setHeader(HttpHeaders.CONTENT_TYPE, "TEXT/XML");
-		try {
-			HttpResponse response = httpClient.execute((HttpUriRequest) request);
-
-			HttpEntity entity = response.getEntity();
-			String responseString = EntityUtils.toString(entity, "UTF-8");
-
-			if (null != response && response.getStatusLine().getStatusCode() == 200) {
-				deviceRes = getCaptureInfo(portNumber, env);
-			}
-		} catch (Exception e) {
-			logger.error("Error while getting biometric device info : " + e.getMessage());
-		}
-		return deviceRes;
-	}
-
-	private String getCaptureInfo(String portNumber, String env) throws Exception {
-		String captureRes = null;
-		if (null != portNumber) {
-			try {
-				// Create a new DocumentBuilder
-				DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
-				DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();
-
-				// Create a new Document
-				Document doc = docBuilder.newDocument();
-
-				// Create the root element <PidOptions>
-				Element pidOptionsElement = doc.createElement("PidOptions");
-				pidOptionsElement.setAttribute("ver", "1.0");
-				doc.appendChild(pidOptionsElement);
-
-				// Create the <Opts> element and its attributes
-				Element optsElement = doc.createElement("Opts");
-				optsElement.setAttribute("fCount", "1");
-				optsElement.setAttribute("fType", "2");
-				optsElement.setAttribute("iCount", "0");
-				optsElement.setAttribute("pCount", "0");
-				optsElement.setAttribute("pgCount", "2");
-				optsElement.setAttribute("format", "0");
-				optsElement.setAttribute("pidVer", "2.0");
-				optsElement.setAttribute("timeout", "10000");
-				optsElement.setAttribute("pTimeout", "20000");
-				optsElement.setAttribute("wadh", "E0jzJ/P8UopUHAieZn8CKqS4WPMi5ZSYXgfnlfkWjrc=");
-				optsElement.setAttribute("posh", "UNKNOWN");
-				optsElement.setAttribute("env", env);
-				pidOptionsElement.appendChild(optsElement);
-
-				// Create the <CustOpts> element
-				Element custOptsElement = doc.createElement("CustOpts");
-				pidOptionsElement.appendChild(custOptsElement);
-
-				// Create the <Param> element inside <CustOpts> with its attributes
-				Element paramElement = doc.createElement("Param");
-				paramElement.setAttribute("name", "mantrakey");
-				paramElement.setAttribute("value", "");
-				custOptsElement.appendChild(paramElement);
-
-				// Create a text node for indentation
-				Text text = doc.createTextNode("\n");
-				pidOptionsElement.insertBefore(text, optsElement);
-
-				// Print the XML content to the console
-				String xml = XMLToString(doc);
-				
-				String capturingURL = captureUrl.replace("port", portNumber);
-				URL url = new URL(capturingURL);
-
-				String httpMethod = "CAPTURE";
-				HttpClient httpClient = HttpClients.createDefault();
-
-				HttpEntityEnclosingRequestBase request = new HttpEntityEnclosingRequestBase() {
-					@Override
-					public String getMethod() {
-						return httpMethod;
-					}
-				};
-				request.setURI(URI.create(capturingURL));
-				StringEntity entity2 = new StringEntity(xml);
-				request.setEntity(entity2);
-				request.setHeader(HttpHeaders.CONTENT_TYPE, "TEXT/XML");
-				
-				HttpResponse response = httpClient.execute(request);
-				response.setHeader("Content-Type", "TEXT/XML");
-				InputStream entity1 = response.getEntity().getContent();
-				String result = new BufferedReader(new InputStreamReader(entity1))
-						   .lines().collect(Collectors.joining("\n"));
-				if(result.contains("Success")) {
-					captureRes = result;
-				} else {
-					throw new Exception("Capture timed out");
-				}
-				
-		} catch (ParserConfigurationException e) {
-			logger.error("Error while capturing fingerprint: " + e.getMessage());
-		}
-		}
-		return captureRes;
-	}
-
-	private String XMLToString(Document doc) {
-		String response = null;
-		try {
-			javax.xml.transform.TransformerFactory tf = javax.xml.transform.TransformerFactory.newInstance();
-			javax.xml.transform.Transformer transformer = tf.newTransformer();
-			transformer.setOutputProperty(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
-			javax.xml.transform.stream.StreamResult result = new javax.xml.transform.stream.StreamResult(
-					new java.io.StringWriter());
-			javax.xml.transform.dom.DOMSource source = new javax.xml.transform.dom.DOMSource(doc);
-			transformer.transform(source, result);
-			response = result.getWriter().toString();
-		} catch (Exception e) {
-			logger.error("Error while converting XML to String: " + e.getMessage());
-		}
-		return response;
-	}
-
-}
diff --git a/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java b/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java
index 5c6b1b09..55f6b09c 100644
--- a/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/callhandling/BeneficiaryCallServiceImpl.java
@@ -403,7 +403,7 @@ public Integer closeCall(String request, String ipAddress) throws Exception {
 				new Timestamp(Calendar.getInstance().getTimeInMillis()), benificiaryCall.getCallClosureType(),
 				benificiaryCall.getCallTypeID(), benificiaryCall.getDispositionStatusID(),
 				benificiaryCall.getEmergencyType(), benificiaryCall.getExternalReferral(),
-				benificiaryCall.getInstTypeId(), benificiaryCall.getInstName());
+				benificiaryCall.getInstTypeId(), benificiaryCall.getInstName(),benificiaryCall.getIsOutbound());
 
 		if (benificiaryCall.getBeneficiaryRegID() != null)
 			beneficiaryCallRepository.updateBeneficiaryRegIDInCall(benificiaryCall.getBenCallID(),
@@ -456,7 +456,7 @@ public Integer closeCallV1(String request, String ipAddress) throws Exception {
 				new Timestamp(Calendar.getInstance().getTimeInMillis()), benificiaryCall.getCallClosureType(),
 				benificiaryCall.getCallTypeID(), benificiaryCall.getDispositionStatusID(),
 				benificiaryCall.getEmergencyType(), benificiaryCall.getExternalReferral(),
-				benificiaryCall.getInstTypeId(), benificiaryCall.getInstName());
+				benificiaryCall.getInstTypeId(), benificiaryCall.getInstName(),benificiaryCall.getIsOutbound());
 		if (followupRequired.isFollowupRequired) {
 			OutboundCallRequest outboundCallRequest = inputMapper.gson().fromJson(request, OutboundCallRequest.class);
 			outboundCallRequestRepository.save(outboundCallRequest);
@@ -1070,8 +1070,12 @@ private Long getTotalCallCount(CriteriaBuilder criteriaBuilder, BeneficiaryCall
 			predicates.add(criteriaBuilder.equal(entityRoot.get("callTypeID"), callRequest.getCallTypeID()));
 		}
 
-		predicates.add(criteriaBuilder.like(entityRoot.get("phoneNo"),
-				(callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo()));
+//		predicates.add(criteriaBuilder.like(entityRoot.get("phoneNo"),
+//				(callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo()));
+		
+		if (callRequest.getPhoneNo() != null) {
+			predicates.add(criteriaBuilder.equal(entityRoot.get("phoneNo"), callRequest.getPhoneNo()));
+		}
 
 		if (callRequest.getInboundOutbound() != null) {
 			callRequest.setIsOutbound(callRequest.getInboundOutbound().equalsIgnoreCase("outbound") ? true : false);
@@ -1211,8 +1215,12 @@ public String filterCallList(String request, String auth) throws IEMRException {
 			predicates.add(criteriaBuilder.equal(root.get("callTypeID"), callRequest.getCallTypeID()));
 		}
 
-		predicates.add(criteriaBuilder.like(root.get("phoneNo"),
-				(callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo()));
+//		predicates.add(criteriaBuilder.like(root.get("phoneNo"),
+//				(callRequest.getPhoneNo() == null) ? "%%" : callRequest.getPhoneNo()));
+		
+		if (callRequest.getPhoneNo() != null) {
+			predicates.add(criteriaBuilder.equal(root.get("phoneNo"), callRequest.getPhoneNo()));
+		}
 
 		if (callRequest.getInboundOutbound() != null) {
 			callRequest.setIsOutbound(callRequest.getInboundOutbound().equalsIgnoreCase("outbound") ? true : false);
diff --git a/src/main/java/com/iemr/common/service/ctiCall/CallCentreDataSyncImpl.java b/src/main/java/com/iemr/common/service/ctiCall/CallCentreDataSyncImpl.java
index 14cf3d48..55f2273b 100644
--- a/src/main/java/com/iemr/common/service/ctiCall/CallCentreDataSyncImpl.java
+++ b/src/main/java/com/iemr/common/service/ctiCall/CallCentreDataSyncImpl.java
@@ -22,6 +22,8 @@
 package com.iemr.common.service.ctiCall;
 
 import java.sql.Timestamp;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
@@ -86,24 +88,29 @@ public String callUrl(String urlRequest) {
 	@Override
 	public void ctiDataSync() {
 		List<Objects[]> resultSet = null;
-		Date date = new Date();
-		java.sql.Date sqlDate = new java.sql.Date(date.getTime());
-		String text = sqlDate.toString();
-		Timestamp endDate = new Timestamp(sqlDate.getTime());
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(sqlDate);
-		logger.info("CZduration: " + CZduration);
-		calendar.add(Calendar.DATE, -(Integer.parseInt(CZduration)));
-		Date beforeDate = calendar.getTime();
-		Timestamp startDate = new Timestamp(beforeDate.getTime());
+
+		
+		 // Get the current date
+	       LocalDate currentDate = LocalDate.now();
+	       // Calculate three days before the current date
+	       LocalDate startDate = currentDate.minusDays(3);
+	       // Calculate two days before the current date
+	       LocalDate endDate = currentDate.minusDays(2);
+	       // Convert LocalDate to LocalDateTime to set time as 00:00:00
+	       LocalDateTime startDateTime = startDate.atTime(0, 0, 0);
+	       LocalDateTime endDateTime = endDate.atTime(23, 59, 59);
+	       // Convert LocalDateTime to Timestamp
+	       Timestamp startTimeStamp = Timestamp.valueOf(startDateTime);
+	       Timestamp endTimeStamp = Timestamp.valueOf(endDateTime);
+		
 		// application properties will have a config date variable.
-		logger.info("startDate: " + startDate);
-		logger.info("endDate: " + endDate);
-		List<BeneficiaryCall> list = callReportRepo.getAllBenCallIDetails(startDate, endDate);
+		logger.info("startDate: " + startTimeStamp);
+		logger.info("endDate: " + endTimeStamp);
+		List<BeneficiaryCall> list = callReportRepo.getAllBenCallIDetails(startTimeStamp, endTimeStamp);
 
 		if (!list.isEmpty()) {
 			
-			// List<Long> benList = new ArrayList<>();
+		
 			String callDuartion = null;
 			String filePath = null;
 			String URL = null;
@@ -119,22 +126,14 @@ public void ctiDataSync() {
 						JSONObject requestFile = new JSONObject();
 						requestFile.put("agent_id", call.getAgentID());
 						requestFile.put("session_id", call.getCallID());
-//						OutputResponse response1 = ctiService.getVoiceFile(requestFile.toString(), "extra parameter");
-//						if (response1.getStatusCode() == OutputResponse.SUCCESS) {
-//							CTIVoiceFile getVoiceFile = InputMapper.gson().fromJson(response1.getData(),
-//									CTIVoiceFile.class);
-//							String recordingFilePath = getVoiceFile.getPath() + "/" + getVoiceFile.getFilename();
-////						beneficiaryCallRepository.updateVoiceFilePathNew(benificiaryCall.getAgentID(),
-////								benificiaryCall.getCallID(), recordingFilePath, null);
-//							recordingPath = ctiLoggerURL + "/" + recordingFilePath;
+
 						OutputResponse response1 = ctiService.getVoiceFileNew(requestFile.toString(), "extra parameter");
 						if(response1 != null && response1.getStatusCode() == 200) {
 							
 							CTIResponse ctiResponsePath = InputMapper.gson().fromJson(response1.getData(),
 									CTIResponse.class);
 							String recordingFilePath = ctiResponsePath.getResponse().toString();
-//							beneficiaryCallRepository.updateVoiceFilePathNew(call.getAgentID(),
-//									call.getCallID(), recordingFilePath.substring(20), null);
+
 							if(recordingFilePath.length() > 20)
 								recordingPath = recordingFilePath.substring(20);
 							logger.info("recordingPath: " + recordingPath);
diff --git a/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentService.java b/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentService.java
index 7ed527b1..5fc1cc48 100644
--- a/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentService.java
+++ b/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentService.java
@@ -27,7 +27,7 @@ public interface LungAssessmentService {
 
 	public String getLungAssessmentAdminLogin(String email, String password) throws Exception;
 
-	public Boolean verifyCough(MultipartFile file, String authToken, Long patientId) throws Exception;
+	public Boolean verifyCough(MultipartFile file, String authToken, Long patientId, String tempFileName) throws Exception;
 
 	String getAssesment(String assesmentId) throws Exception;
 
diff --git a/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentServiceImpl.java b/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentServiceImpl.java
index 8903cd3f..320c7a0a 100644
--- a/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/lungassessment/LungAssessmentServiceImpl.java
@@ -26,7 +26,7 @@
 import java.io.FileOutputStream;
 import java.util.List;
 
-import javax.xml.ws.http.HTTPException;
+//import javax.xml.ws.http.HTTPException;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -126,10 +126,11 @@ public String getLungAssessmentAdminLogin(String email, String password) throws
 
 			logger.info("Lung assessment authentication response: " + lungAssessmentToken);
 
-		} catch (HTTPException e) {
-			logger.error("Lung assessment authentication error : " + e.getMessage(), e);
-			throw new RuntimeException("get authentication failed with error", e);
-		} catch (Exception e) {
+		} /*
+			 * catch (HTTPException e) {
+			 * logger.error("Lung assessment authentication error : " + e.getMessage(), e);
+			 * throw new RuntimeException("get authentication failed with error", e); }
+			 */catch (Exception e) {
 			logger.error("Lung assessment authentication error : " + e.getMessage(), e);
 			throw new RuntimeException("get authentication failed with error", e);
 		}
@@ -137,7 +138,7 @@ public String getLungAssessmentAdminLogin(String email, String password) throws
 	}
 
 	@Override
-	public Boolean verifyCough(MultipartFile file, String authToken, Long patientId) throws Exception {
+	public Boolean verifyCough(MultipartFile file, String authToken, Long patientId, String tempFileName) throws Exception {
 
 		try {
 
@@ -157,7 +158,6 @@ public Boolean verifyCough(MultipartFile file, String authToken, Long patientId)
 			headers.add("accessToken", authToken);
 
 			byte[] bytes = file.getBytes();
-			String tempFileName = "coughSoundVerify" + patientId + System.currentTimeMillis() + ".wav";
 			BufferedOutputStream stream = new BufferedOutputStream(
 					new FileOutputStream(new File(lungAssessmentPath + tempFileName)));
 			stream.write(bytes);
@@ -228,7 +228,9 @@ public String initiateAssesment(String request, MultipartFile file) throws Excep
 			if (lungAssessmentToken == null || (((currTime - authCreatedAt) / (60 * 1000))) > 110)
 				lungAssessmentToken = getLungAssessmentAdminLogin(decryptlungAssessmentEmail, decryptlungAssessmentPassword);
 
-			Boolean isCoughValidateSuccess = verifyCough(file, lungAssessmentToken, lungAssessmentAssessmentRequestObj.getPatientId());
+			String tempFileName = "coughSoundAssessment" + lungAssessmentAssessmentRequestObj.getPatientId()
+			+ System.currentTimeMillis() + ".wav";
+			Boolean isCoughValidateSuccess = verifyCough(file, lungAssessmentToken, lungAssessmentAssessmentRequestObj.getPatientId(), tempFileName);
 
 			if (isCoughValidateSuccess) {
 				RestTemplate restTemplate = new RestTemplate();
@@ -241,8 +243,6 @@ public String initiateAssesment(String request, MultipartFile file) throws Excep
 				resultSet = lungAssessmentRepository.save(lungAssessmentAssessmentRequestObj);
 
 				byte[] bytes = file.getBytes();
-				String tempFileName = "coughSoundAssessment" + lungAssessmentAssessmentRequestObj.getPatientId()
-						+ System.currentTimeMillis() + ".wav";
 				BufferedOutputStream stream = new BufferedOutputStream(
 						new FileOutputStream(new File("lungAssessmentPath" + tempFileName)));
 				stream.write(bytes);
@@ -255,7 +255,7 @@ public String initiateAssesment(String request, MultipartFile file) throws Excep
 				bodyMap.add("gender", lungAssessmentAssessmentRequestObj.getGender());
 				bodyMap.add("assessmentId", lungAssessmentAssessmentRequestObj.getAssessmentId());
 				bodyMap.add("patientId", lungAssessmentAssessmentRequestObj.getPatientId());
-				bodyMap.add("coughsoundfile", new FileSystemResource("swaasaPath" + tempFileName));
+				bodyMap.add("coughsoundfile", new FileSystemResource(lungAssessmentPath + tempFileName));
 
 				HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(bodyMap, headers);
 
diff --git a/src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java b/src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java
index e6d466ae..7a78c036 100644
--- a/src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java
+++ b/src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java
@@ -867,6 +867,36 @@ private String getInstituteData(String className, String methodName, SMSRequest
 			String address = institute.getAddress() != null ? institute.getAddress() + " " : "";
 			variableValue = address;
 			break;
+		case "address1":
+			String hospitalName1 = institute.getInstitutionName() != null ? institute.getInstitutionName() + " " : "";
+			String addressValue1 = institute.getAddress() != null ? institute.getAddress() + " " : "";
+			String truncatedAdress1 = hospitalName1.concat(" ").concat(addressValue1);
+			if(!truncatedAdress1.isEmpty()) {
+				variableValue = getSubstringInRange(truncatedAdress1, 0, 29);
+			}else {
+				variableValue = "";
+			}
+			break;
+		case "address2":
+			String hospitalName2 = institute.getInstitutionName() != null ? institute.getInstitutionName() + " " : "";
+			String addressValue2 = institute.getAddress() != null ? institute.getAddress() + " " : "";
+			String truncatedAdress2 = hospitalName2.concat(" ").concat(addressValue2);
+			if(!truncatedAdress2.isEmpty()) {
+				variableValue = getSubstringInRange(truncatedAdress2, 29, 59);
+			}else {
+				variableValue = "";
+			}
+			break;
+		case "address3":
+			String hospitalName3 = institute.getInstitutionName() != null ? institute.getInstitutionName() + " " : "";
+			String addressValue3= institute.getAddress() != null ? institute.getAddress() + " " : "";
+			String truncatedAdress3 = hospitalName3.concat(" ").concat(addressValue3);
+			if(!truncatedAdress3.isEmpty()) {
+				variableValue = getSubstringInRange(truncatedAdress3, 59, 89);
+			}else {
+				variableValue = "";
+			}
+			break;
 		case "contactperson1":
 			String contactPerson1 = institute.getContactPerson1() != null ? institute.getContactPerson1() + " " : "";
 			variableValue = contactPerson1;
@@ -896,7 +926,16 @@ private String getInstituteData(String className, String methodName, SMSRequest
 		default:
 			break;
 		}
-		return variableValue.trim();
+		return variableValue;
+	}
+	
+	private static String getSubstringInRange(String input, int startIndex, int endIndex) {
+		if(input != null && startIndex>=0 && startIndex<input.length()) {
+			int truncatedEnd = Math.min(endIndex, input.length());
+			return input.substring(startIndex, truncatedEnd);
+			}else {
+				return " ";
+			}
 	}
 
 	@Async
@@ -1116,10 +1155,10 @@ private String getPrescriptionData(String className, String methodName, SMSReque
 					: "";
 			variableValue = drugForm;
 			break;
-//		case "frequency":
-//			String frequency = prescribedDrug.getFrequency() != null ? prescribedDrug.getFrequency() + " " : "";
-//			variableValue = frequency;
-//			break;
+		case "frequency":
+			String freq = prescribedDrug.getFrequency() != null ? prescribedDrug.getFrequency() + " " : "";
+			variableValue = freq;
+			break;
 		case "timeToConsume":
 			String frequency = prescribedDrug.getFrequency() != null ? prescribedDrug.getFrequency() + " " : "";
 			variableValue = frequency;
