| | |
| | | using Android.Widget; |
| | | using Com.Hdl.Hdllinphonesdk; |
| | | #else |
| | | using Other; |
| | | using Foundation; |
| | | using UIKit; |
| | | using Shared.IOS.HDLLinphoneSDK; |
| | |
| | | |
| | | //登录sip服务器 |
| | | #if __IOS__ |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm,DB_ResidenceData.Instance.linphoneConnectType.ToString()); |
| | | #else |
| | | if (mInterphoneType == InterphoneType.FREEVIEW.ToString()) |
| | | { |
| | |
| | | mHDLSipInfo.sipPasswd, |
| | | mHDLSipInfo.realm, |
| | | //"sip:139.159.157.75:47000;transport=udp", |
| | | HDLLinphoneKit.InterPhoneTypeFreeview |
| | | HDLLinphoneKit.InterPhoneTypeFreeview, |
| | | DB_ResidenceData.Instance.linphoneConnectType.ToString() |
| | | ); |
| | | } |
| | | else |
| | |
| | | mHDLSipInfo.realm, |
| | | //mHDLSipInfo.proxy+ ";transport=udp", |
| | | //"sip:139.159.157.75:47000;transport=udp", |
| | | HDLLinphoneKit.InterPhoneTypeHdl |
| | | HDLLinphoneKit.InterPhoneTypeHdl, |
| | | DB_ResidenceData.Instance.linphoneConnectType.ToString() |
| | | ); |
| | | } |
| | | #endif |
| | |
| | | bool IsIncomingReceivedCallState() |
| | | { |
| | | #if __IOS__ |
| | | return Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; |
| | | return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; |
| | | #else |
| | | return HDLLinphoneKit.Instance.IsIncomingReceivedCallState; |
| | | #endif |
| | |
| | | |
| | | #if __IOS__ |
| | | |
| | | |
| | | HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName); |
| | | |
| | | #else |
| | |
| | | /// </summary> |
| | | public override void OnRejectCallAction() |
| | | { |
| | | MainPage.Log("iOS 全部拒接"); |
| | | Other.SoundPlayer.Ins.StopSound(); |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); |
| | | } |
| | |
| | | /// 截图成功 |
| | | /// </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(); |
| | |
| | | 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 |