Bläddra i källkod

[WallPadEmergency]
1. 비상해제 신호 서버로 전송(Ping 테스트 체크 안하도록 수정)

[WallPadMain]
1. 착신통화 수정
2. 버전(08.03.01 -> 08.11.02

[최신앱등록]
1. WallPadDevService
2. WallPadEmergency
3. WallPadMain

jglee 3 år sedan
förälder
incheckning
56e2087a18

BIN
10_Release/WallPadDevService.apk


BIN
10_Release/WallPadEmergency.apk


BIN
10_Release/WallPadMain.apk


+ 1 - 1
WallPadEmergency/src/main/java/kr/co/icontrols/wallpademergency/screen/EmergencyMainScreen.java

@@ -920,7 +920,7 @@ public class EmergencyMainScreen extends WpadScreen{
 		@Override
 		public void run() {
 			try {
-				bMainServerNetwork = PingTest(strMainServerIPAddr);
+				bMainServerNetwork = true;// PingTest(strMainServerIPAddr);
 				//관리PC는 왜 Fail이 날까?
 				//bManagerPCNetwork = PingTest(strManagerPCIPAddr);
 				bControlGuardNetwork = PingTest(strControlGuardIPAddr);

+ 1 - 1
WallPadMain/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadmain"
     android:versionCode="17"
-    android:versionName="2021.08.03.01">
+    android:versionName="2021.08.11.02">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 15 - 4
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/MainActivity.java

@@ -151,6 +151,7 @@ public class MainActivity extends WpadActivity {
     // [[ Declaration ]] region
     // =================================================================================================
     protected Context mContext = null;
+    static Context mContext_call = null;
     public Context getContext() { return mContext; }
     private WallPadAPI mWallPadAPI = null;
     public static IOInterface mIOInterface = null;
@@ -705,6 +706,7 @@ public class MainActivity extends WpadActivity {
         PopupActivityRun = false;
         InfoActivityRun = false;
         mContext = this;
+        mContext_call = mContext;
         setCallAppRunning(false); // 메인앱 초기화시 통화앱 미실행값을 DB에 저장
         // 2. 자동 종료 셋팅
         DebugLogOutput("[Create] - Step2 : Auto Finish Setting");
@@ -2508,7 +2510,7 @@ public class MainActivity extends WpadActivity {
         imapAlarmOperation.SetServerIPcfg(DstIP, DstPort);
         imapAlarmOperation.DoWork(alarm_mode, cause);
         imapAlarmOperation.SetRetCtr(new RetProci(){
-
+F
             @Override
             public void ProcSuccess() {
                 // TODO Auto-generated method stub
@@ -4528,7 +4530,7 @@ public class MainActivity extends WpadActivity {
                     else {
                         Log.w(TAG, "[runCallServices.run()] ############### This wallpad is set as a main-wallpad ###############");
                         // SIP/Subphone 서비스 실행
-                        Intent SIPServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.CeresSIPService.StartService");
+                        Intent SIPServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.SIPStun.StartService");
                         getApplicationContext().startService(SIPServiceLauncher);
 
                         Intent SubPhoneServiceLauncher = new Intent ("kr.co.icontrols.callengine.subphone.SubPhoneSerialManager.StartService");
@@ -4544,12 +4546,12 @@ public class MainActivity extends WpadActivity {
                     int nModelType = Version.getModelType();
 			        if (nModelType == MODEL_TYPE.IHN_750) {
                         // SIP 서비스만 실행
-                        Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.CeresSIPService.StartService");
+                        Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.SIPStun.StartService");
                         getApplicationContext().startService(sipServiceLauncher);
                     }
 			        else {
                         // SIP/PSTN/Subphone 서비스 실행
-                        Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.CeresSIPService.StartService");
+                        Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.SIPStun.StartService");
                         getApplicationContext().startService(sipServiceLauncher);
 
                         Intent PSTNServiceLauncher = new Intent ("kr.co.icontrols.callengine.pstn.PSTNSerialManager.StartService");
@@ -9674,6 +9676,15 @@ public class MainActivity extends WpadActivity {
         }
     }
 
+    public static void ReDirectCall(String ip)
+    {
+        Intent Intent = new Intent();
+        Intent.setAction("CERES_CALL");
+
+        Intent.putExtra("REMOTEINFO", ip);
+        mContext_call.sendBroadcast(Intent);
+    }
+
 
 }
 

+ 26 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/iMapServer.java

@@ -2679,6 +2679,7 @@ public class iMapServer extends Service {
                     }
                 } else if (msg.what == 2) {
                     // 띵똥 음원 재생
+                    Log.d(TAG, "띵동 1번 재생");
                     mIOInterface.ctrlSetTalkPathDoor();
                     sendHandlerMsgDelayed(HANDLERMSG.FRONTCAM_PLAY_DINGDONG, 0, 0, 100);
                 } else if (msg.what == 3) {
@@ -3130,6 +3131,11 @@ public class iMapServer extends Service {
         }
     }
 
+    private static String trimQuotation(String strValue) {
+        strValue = strValue.replaceAll("\"", "");
+        return strValue.trim();
+    }
+
     // iMAP 서버 소켓 처리
 	public class iMapSverSocketThread extends Thread {
 		private final Socket iMAPSock;
@@ -3379,6 +3385,15 @@ public class iMapServer extends Service {
 
 							statusDB.closeDB();
 						}
+                        else if (cmd.equalsIgnoreCase("call_redirect")) {
+                            Log.d(TAG, "=== call_redirect ===");
+                            NodeList mNodeList = elelist.getElementsByTagName("target_ip");
+                            Element mElement = (Element) mNodeList.item(0);
+                            String strRemoteIP = trimQuotation(mElement.getTextContent());
+                            MainActivity.ReDirectCall(strRemoteIP);
+
+
+                        }
 						else if (cmd.equalsIgnoreCase("set_setup_info")) {
                             retXML = ProcSetsetup(doc);
                         }
@@ -3420,8 +3435,8 @@ public class iMapServer extends Service {
 							List<ActivityManager.RunningServiceInfo> rsi = manager.getRunningServices(50);
 
 							// Jeff added below codes for call app (2018.01.25)
-							String strSIPPackageName = "kr.co.icontrols.callengine.sip.CeresSIPService";
-
+							//String strSIPPackageName = "kr.co.icontrols.callengine.sip.CeresSIPService";
+                            String strSIPPackageName = "kr.co.icontrols.callengine.sip.SIPStun";
 							for (int k = 0; k < rsi.size(); k++) {
 								ActivityManager.RunningServiceInfo rsInfo = rsi.get(k);
 								if (rsInfo.service.getClassName().equals(strSIPPackageName)) {
@@ -3843,6 +3858,15 @@ public class iMapServer extends Service {
                         }
                         else if (cmd.equalsIgnoreCase("notify_car_event")) {
                             retXML = ProcParkInformation(elelist);
+                        }
+                        else if (cmd.equalsIgnoreCase("call_redirect")) {
+                            Log.d(TAG, "=== call_redirect ===");
+                            NodeList mNodeList = elelist.getElementsByTagName("target_ip");
+                            Element mElement = (Element) mNodeList.item(0);
+                            String strRemoteIP = trimQuotation(mElement.getTextContent());
+                            MainActivity.ReDirectCall(strRemoteIP);
+
+
                         }
                         else if (cmd.equalsIgnoreCase("notify_smartkey_event")) {
                             retXML = ProcSmartKeyEvent(elelist);