From cb9232b3ab413fae7bcc2b94abd70f18ca02b263 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 03 十二月 2024 11:20:32 +0800 Subject: [PATCH] 增加铃声;增加TCP/UDP连接选择 --- HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLinPhoneSDK.m | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" index e6d66dc..e6f7446 100644 --- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" +++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" @@ -46,6 +46,14 @@ [HDLLinphoneManager.instance login:username password:pwd domain:domain]; } +-(void)tcpLogin:(NSString*)username password:(NSString*)pwd domain:(NSString*) domain { + [HDLLinphoneManager.instance tcpLogin:username password:pwd domain:domain ]; +} + +-(void)udpLogin:(NSString*)username password:(NSString*)pwd domain:(NSString*) domain { + [HDLLinphoneManager.instance udpLogin:username password:pwd domain:domain ]; +} + - (void)registrationUpdate:(NSNotification *)notif { LinphoneRegistrationState state = [[notif.userInfo objectForKey:@"state"] intValue]; if (state == LinphoneRegistrationFailed){ @@ -225,6 +233,24 @@ [self toLinphoneIntercomVC:titleName deviceType:HDLLPType_HDLSR userName:username]; } +-(void)hideIntercomeVC{ + if ([[HDLLinPhoneCommon topMostController] isKindOfClass:[HDLLinphoneIntercomVC class]]) { + [[HDLLinPhoneCommon topMostController] dismissViewControllerAnimated:YES completion:^{ + + }]; + } +} +/** + 鍙戦�乻ip message + */ +-(void)sendMessage:(NSString*)message sipAccount:(NSString*)sipAccount domain:(NSString*)domain{ + LinphoneAddress *tmpAddr = linphone_address_new([NSString stringWithFormat:@"sip:%@@%@",sipAccount,domain].UTF8String); + LinphoneChatRoom *chatRomm=linphone_core_get_chat_room([HDLLinphoneManager getLc], tmpAddr); + [[HDLLinphoneManager instance] send:message toChatRoom:chatRomm]; +} + + + -(void)toLinphoneIntercomVC:(NSString*)titleName deviceType:(HDLLPType)deviceType userName:(NSString *)userName{ HDLLinphoneIntercomVC *vc=[[HDLLinphoneIntercomVC alloc]init]; // vc.CallId=callId; -- Gitblit v1.8.0