From ae86b09b30621e1a8512c6bcdd7e22e9c67a5402 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期二, 17 五月 2022 14:02:06 +0800
Subject: [PATCH] Merge branch 'dev' into lss

---
 HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs |   60 +++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 41 insertions(+), 19 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
index 49857bf..04910cd 100644
--- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -57,6 +57,10 @@
         /// </summary>
         public bool IsEnable = false;
         /// <summary>
+        /// 褰撳墠瑙嗛閫氳瘽鏄惁涓鸿嚜鐮�
+        /// </summary>
+        public bool IsSelfResearch = false;
+        /// <summary>
         /// 鏄惁鑷姩璺宠浆鍛煎彨椤甸潰,
         /// false锛氭敹鍒版帹閫佸苟涓斿凡缁忔敹鍒皊ip鍛煎彨鎵嶈烦杞懠鍙〉闈�
         /// true锛氬師鐢熸敹鍒板懠鍙┈涓婅烦杞懠鍙〉闈紝涓嶇瓑寰呮帹閫佽繃鏉�
@@ -93,6 +97,7 @@
             Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsAutoJumpCallView = IsAutoJumpCallView;
             //璁剧疆Listener鐩戝惉
             mOnHDLLinphoneCallDelegate = new OnHDLLinphoneCallDelegate(this);
+            Console.WriteLine(UserInfo.Current.ID);
             Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().HdlLinphoneCallDelegate = mOnHDLLinphoneCallDelegate;
 #else
             HDLLinphoneKit.Instance.InitLinphone(Application.Activity);
@@ -428,6 +433,7 @@
             mHDLCallVideoInfo.DeviceName = mESVideoInfo.DeviceName;
             mHDLCallVideoInfo.InterphoneType = InterphoneType.HDL.ToString();
             mHDLCallVideoInfo.DeviceSipAccount = mESVideoInfo.deviceSipAccount;
+            mHDLCallVideoInfo.spk = mESVideoInfo.spk;
             InitCallInfo(mHDLCallVideoInfo);
 
             //褰撳墠鍛煎彨鏉ョ數鐨勪綇瀹呭拰涔嬪墠娉ㄥ唽鐧诲綍鐨勪綇瀹呬竴鑷寸殑鎯呭喌涓�
@@ -460,20 +466,32 @@
         /// <param name="mESVideoInfo"></param>
         public void CheckCallStateAndGotoPage()
         {
-            //濡傛灉寮�鍚簡鑷姩璺宠浆鏂规锛屽垯鏃犻渶缁х画涓嬮潰澶勭悊銆佹棤闇�鎵嬪姩璺宠浆
-            if (IsAutoJumpCallView) return;
-            //鍏堢粨鏉熸帀涔嬪墠鐨勭嚎绋�
-            EndCheckIncomingCallThread();
-            //妫�娴嬫槸鍚︽潵鐢典簡濡傛灉鏄洿鎺ヨ皟鏁村懠鍙〉闈㈠鏋滀笉鏄垯寮�鍚嚎绋嬬瓑寰呭垽鏂�
-            if (IsIncomingReceivedCallState()) {
-                Utlis.WriteLine("CALL 宸茬粡鏉ョ數浜嗐�傘�傘�傛墦寮�鍛煎彨椤甸潰");
-                GoToHDLLinphoneIntercomActivity();
-            }
-            else
+            if (mHDLCallVideoInfo.spk == "door.gate")
             {
-                //濡傛灉杩樻病鏉ョ數 寮�鍚嚎绋嬫娴�
-                StartCheckIncomingCallThread();
+#if __IOS__
+                //鑷爺鍙瀵硅
+                HDLLinPhoneSDK.Instance().GotoHDLSRLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName,mHDLCallVideoInfo.DeviceSipAccount);
+#endif
             }
+            else {
+                //鐙勮�愬厠鍙瀵硅
+                //濡傛灉寮�鍚簡鑷姩璺宠浆鏂规锛屽垯鏃犻渶缁х画涓嬮潰澶勭悊銆佹棤闇�鎵嬪姩璺宠浆
+                if (IsAutoJumpCallView) return;
+                //鍏堢粨鏉熸帀涔嬪墠鐨勭嚎绋�
+                EndCheckIncomingCallThread();
+                //妫�娴嬫槸鍚︽潵鐢典簡濡傛灉鏄洿鎺ヨ皟鏁村懠鍙〉闈㈠鏋滀笉鏄垯寮�鍚嚎绋嬬瓑寰呭垽鏂�
+                if (IsIncomingReceivedCallState())
+                {
+                    Utlis.WriteLine("CALL 宸茬粡鏉ョ數浜嗐�傘�傘�傛墦寮�鍛煎彨椤甸潰");
+                    GoToHDLLinphoneIntercomActivity();
+                }
+                else
+                {
+                    //濡傛灉杩樻病鏉ョ數 寮�鍚嚎绋嬫娴�
+                    StartCheckIncomingCallThread();
+                }
+            }
+
 
         }
 
@@ -596,10 +614,10 @@
             return checkIncomingCallThread == null || checkIncomingCallThread.ThreadState != ThreadState.Running;
         }
 
-        #endregion
+#endregion
 
 
-        #region 鈻�  --  Android鐩稿叧鎿嶄綔_______________________________
+#region 鈻�  --  Android鐩稿叧鎿嶄綔_______________________________
 
 #if __Android__
 
@@ -694,13 +712,13 @@
         }
 
 #endif
-        #endregion
+#endregion
 
-        #region 鈻�  --  iOS鐩稿叧鎿嶄綔_______________________________
+#region 鈻�  --  iOS鐩稿叧鎿嶄綔_______________________________
 
 #if __IOS__
 
-        #region OnHDLLinphoneCallDelegate
+#region OnHDLLinphoneCallDelegate
         /// <summary>
         /// 
         /// </summary>
@@ -777,10 +795,10 @@
 
         }
 
-        #endregion
+#endregion
 #endif
 
-        #endregion
+#endregion
 
     }
 
@@ -813,6 +831,10 @@
         /// 绫诲瀷
         /// </summary>
         public string InterphoneType;
+        /// <summary>
+        /// spk
+        /// </summary>
+        public string spk="";
 
     }
 

--
Gitblit v1.8.0