From 2a900e186e9ddf97facd33082df063183c7483b8 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期五, 27 九月 2024 09:51:56 +0800 Subject: [PATCH] 阿里云日志,注册 --- HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 7 deletions(-) diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs index 900d456..d17ae52 100644 --- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs +++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs @@ -13,6 +13,7 @@ using Android.Widget; using Com.Hdl.Hdllinphonesdk; #else +using Other; using Foundation; using UIKit; using Shared.IOS.HDLLinphoneSDK; @@ -126,7 +127,17 @@ //鐧诲綍sip鏈嶅姟鍣� #if __IOS__ - Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); + string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion; + System.Version currentVersion = new System.Version(systemVersion); + System.Version version17 = new System.Version(17, 0); + if (currentVersion.CompareTo(version17) > 0) + { + HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, "udp"); + } + else + { + HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, DB_ResidenceData.Instance.linphoneConnectType.ToString()); + } #else if (mInterphoneType == InterphoneType.FREEVIEW.ToString()) { @@ -135,7 +146,8 @@ mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, //"sip:139.159.157.75:47000;transport=udp", - HDLLinphoneKit.InterPhoneTypeFreeview + HDLLinphoneKit.InterPhoneTypeFreeview, + DB_ResidenceData.Instance.linphoneConnectType.ToString() ); } else @@ -146,7 +158,8 @@ mHDLSipInfo.realm, //mHDLSipInfo.proxy+ ";transport=udp", //"sip:139.159.157.75:47000;transport=udp", - HDLLinphoneKit.InterPhoneTypeHdl + HDLLinphoneKit.InterPhoneTypeHdl, + DB_ResidenceData.Instance.linphoneConnectType.ToString() ); } #endif @@ -510,9 +523,16 @@ /// 鏀跺埌鎺ㄩ�侊紝鍚庡垽鏂懠鍙綇瀹呮槸鍚︿负褰撳墠浣忓畢锛屼笉鏄殑璇濋噸鏂拌幏鍙朣IP璐﹀彿骞剁櫥褰� /// </summary> /// <param name="mESVideoInfo"></param> - public void ShowESVideoIntercom(ESVideoInfo mESVideoInfo,string mInterphoneType) + public void ShowESVideoIntercom(ESVideoInfo mESVideoInfo,string mInterphoneType, bool isNotificationGoing = false) { - if(this.mHDLCallVideoInfo != null) +#if __ANDROID__ + //isNotificationGoing鍙傛暟鏄笓闂ㄧ粰瀹夊崜浣跨敤鐨勶紝鍥犱负瀹夊崜鍦ㄥ悗闈㈢殑鏃跺�欏凡缁忓惎鍔ㄤ簡鎺ュ惉鐨勭晫闈簡锛屼粠閫氱煡鏍忚繘鏉ョ殑鏃跺�欙紝callid宸茬粡琚娇鐢ㄤ簡锛屾墍浠ヨ閲嶇疆鎺夎繖涓睘鎬� + if (isNotificationGoing) + { + this.mHDLCallVideoInfo.CallId = ""; + } +#endif + if (this.mHDLCallVideoInfo != null) { if(this.mHDLCallVideoInfo.CallId == mESVideoInfo.callId) { @@ -575,6 +595,7 @@ intent.PutExtra("lpTitleName", mHDLCallVideoInfo.DeviceName); intent.PutExtra("lpSipAccount", mHDLCallVideoInfo.DeviceSipAccount); } + MainPage.Log("鍚姩鑷爺鍙瀵硅鐣岄潰"); Shared.Application.Activity.StartActivity(intent); #endif } @@ -607,7 +628,7 @@ bool IsIncomingReceivedCallState() { #if __IOS__ - return Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; + return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; #else return HDLLinphoneKit.Instance.IsIncomingReceivedCallState; #endif @@ -620,6 +641,7 @@ #if __IOS__ + HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName); #else @@ -885,6 +907,7 @@ /// </summary> public override void OnRejectCallAction() { + MainPage.Log("iOS 鍏ㄩ儴鎷掓帴"); Other.SoundPlayer.Ins.StopSound(); hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); } @@ -893,7 +916,7 @@ /// 鎴浘鎴愬姛 /// </summary> /// <param name = "image" ></ param > - public void OnScreenshotSuccessfulAction(UIImage image) + public override void OnScreenshotSuccessfulAction(UIImage image) { //NSData imageData = UIImagePNGRepresentation(image); UIImage NSData imageData = image.AsPNG(); @@ -919,6 +942,18 @@ Utlis.WriteLine("OnIncomingCall :" + userName); } + public override void OnRejectAllCallAction() + { + MainPage.Log("iOS 鍏ㄩ儴鎷掓帴"); + Other.SoundPlayer.Ins.StopSound(); + hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); + hdlLinphone.HDLRejectCallIn(); + } + + //public override void OnScreenshotSuccessfulAction(UIImage image) + //{ + // throw new NotImplementedException(); + //} } #endregion -- Gitblit v1.8.0