From 7cbeacd497395855545cf11df296b2316db314a9 Mon Sep 17 00:00:00 2001 From: Redmer Loen Date: Thu, 15 Mar 2018 13:39:05 +0100 Subject: [PATCH 1/5] Update README with git-lfs info --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fdb6b93d..039c5796 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VialerSIPLib -[![CI Status](http://img.shields.io/travis/wearespindle/VialerSIPLib.svg?style=flat)](https://travis-ci.org/wearespindle/VialerSIPLib) + [![Version](https://img.shields.io/cocoapods/v/VialerSIPLib.svg?style=flat)](https://cocoapods.org/pods/VialerSIPLib) [![License](https://img.shields.io/cocoapods/l/VialerSIPLib.svg?style=flat)](https://opensource.org/licenses/GPL-3.0) [![Platform](https://img.shields.io/cocoapods/p/VialerSIPLib.svg?style=flat)](https://cocoapods.org/pods/VialerSIPLib) @@ -23,6 +23,7 @@ In active development. - Cocoapods - iOS 9.0 or greater +- [Git lfs](https://github.com/git-lfs/git-lfs/wiki/Installation) ### Installation @@ -34,6 +35,11 @@ it, simply add the following line to your Podfile: pod 'VialerSIPLib' ``` +When you are having trouble that your app can't compile because of a linker error. +Try this because of the VialerSIPLIB is now requiring git-lfs. +Clear the cache of cocoapods which is located at: `/Users/$USER/Library/Caches/CocoaPods` +Thanks to phatblat from this thread [CocoaPods/CocoaPods#4801](https://github.com/CocoaPods/CocoaPods/issues/4801) + ### Running To run the example project, clone the repo, and run `pod install` from the Example directory first. From 25e0de87ad690706f550f1e6864258510f6b234e Mon Sep 17 00:00:00 2001 From: Redmer Loen Date: Wed, 4 Apr 2018 07:51:34 +0200 Subject: [PATCH 2/5] Fixed issue that call was not being to release on hold status (#129) --- Pod/Classes/VSLCall.m | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Pod/Classes/VSLCall.m b/Pod/Classes/VSLCall.m index 4e16ff9c..0501f8d3 100644 --- a/Pod/Classes/VSLCall.m +++ b/Pod/Classes/VSLCall.m @@ -224,6 +224,7 @@ - (void)startWithCompletion:(void (^)(NSError * error))completion { if ([VSLEndpoint sharedEndpoint].endpointConfiguration.disableVideoSupport) { callSetting.vid_cnt = 0; + callSetting.flag &= ~PJSUA_CALL_INCLUDE_DISABLED_MEDIA; } pj_status_t status = pjsua_call_make_call((int)self.account.accountId, &sipUri, &callSetting, NULL, NULL, (int *)&_callId); @@ -298,6 +299,7 @@ - (void)reinvite { } if ([VSLEndpoint sharedEndpoint].endpointConfiguration.disableVideoSupport) { callSetting.vid_cnt = 0; + callSetting.flag &= ~PJSUA_CALL_INCLUDE_DISABLED_MEDIA; } pj_status_t status = pjsua_call_reinvite2((pjsua_call_id)self.callId, &callSetting, NULL); @@ -322,6 +324,7 @@ - (void)update { if ([VSLEndpoint sharedEndpoint].endpointConfiguration.disableVideoSupport) { callSetting.vid_cnt = 0; + callSetting.flag &= ~PJSUA_CALL_INCLUDE_DISABLED_MEDIA; } pj_status_t status = pjsua_call_update2((pjsua_call_id)self.callId, &callSetting, NULL); @@ -489,7 +492,15 @@ - (BOOL)toggleHold:(NSError **)error { pj_status_t status; if (self.onHold) { - status = pjsua_call_reinvite((pjsua_call_id)self.callId, PJ_TRUE, NULL); + pjsua_call_setting callSetting; + pjsua_call_setting_default(&callSetting); + callSetting.flag = PJSUA_CALL_UNHOLD; + + if ([VSLEndpoint sharedEndpoint].endpointConfiguration.disableVideoSupport) { + callSetting.vid_cnt = 0; + } + + status = pjsua_call_reinvite2((pjsua_call_id)self.callId, &callSetting, NULL); } else { status = pjsua_call_set_hold((pjsua_call_id)self.callId, NULL); } From de0f9f6cb70acf23511f535e2159a9334c2e11a5 Mon Sep 17 00:00:00 2001 From: Redmer Loen Date: Thu, 5 Apr 2018 11:16:14 +0200 Subject: [PATCH 3/5] Incoming callername not showing #124 (#130) --- .github/ISSUE_TEMPLATE.md | 4 +- .github/PULL_REQUEST_TEMPLATE.md | 4 +- Example/Podfile.lock | 10 +-- .../VialerSIPLib.xcodeproj/project.pbxproj | 6 +- .../xcschemes/VialerSIPLib-Example.xcscheme | 8 +-- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++ Example/VialerSIPLib/AppDelegate.swift | 35 ++++++--- .../VialerSIPLib/Base.lproj/Main.storyboard | 72 +++++++++++-------- .../VSLIncomingCallViewController.swift | 6 +- .../VialerSIPLib/VSLMainViewController.swift | 38 ++++++++-- .../Configurations/VSLIpChangeConfiguration.h | 5 ++ .../Configurations/VSLIpChangeConfiguration.m | 4 ++ 12 files changed, 135 insertions(+), 65 deletions(-) create mode 100644 Example/VialerSIPLib.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e44e31db..5feeab5b 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,11 +6,11 @@ {file or feature containing the issue} -### Expected behaviour +### Expected behavior {what should happen} -### Actual behaviour +### Actual behavior {what happens} diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 699574ea..2ca1ff63 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,11 +2,11 @@ {if exists provide related issue} -### Expected behaviour +### Expected behavior {what should have happened} -### Actual behaviour +### Actual behavior {what happens} diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 3a5e1db4..f9622a3d 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -9,8 +9,8 @@ PODS: - Reachability (3.2) - SPLumberjackLogFormatter (0.0.1): - CocoaLumberjack - - Vialer-pjsip-iOS (3.3.4) - - VialerSIPLib (3.1.1): + - Vialer-pjsip-iOS (3.3.5) + - VialerSIPLib (3.1.2): - CocoaLumberjack - Reachability - Vialer-pjsip-iOS @@ -36,9 +36,9 @@ SPEC CHECKSUMS: OCMock: 2cd0716969bab32a2283ff3a46fd26a8c8b4c5e3 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 SPLumberjackLogFormatter: a2290c9b880f3166b2d1bace45dc1fc1302b28ab - Vialer-pjsip-iOS: e424942984350a4493d998d5fccb03e723284005 - VialerSIPLib: d87cf97f24843b9de945534ab2b2ac0a8af2891d + Vialer-pjsip-iOS: 73572fa0f9cf8791c318580c606d1b95163a4ca4 + VialerSIPLib: 5527085f3eee970ef7f0c6f762be53dd3fac9e79 -PODFILE CHECKSUM: 96f5daa87b4af4791838d6c46730f065f53edec3 +PODFILE CHECKSUM: d5d9deca56ac68b69c70ab9a6d89a30c6d4fef32 COCOAPODS: 1.4.0 diff --git a/Example/VialerSIPLib.xcodeproj/project.pbxproj b/Example/VialerSIPLib.xcodeproj/project.pbxproj index c09c0687..b8e8a092 100644 --- a/Example/VialerSIPLib.xcodeproj/project.pbxproj +++ b/Example/VialerSIPLib.xcodeproj/project.pbxproj @@ -450,7 +450,7 @@ attributes = { CLASSPREFIX = VSL; LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = Harold; TargetAttributes = { 6003F589195388D20070C39A = { @@ -732,12 +732,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -785,12 +787,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/Example/VialerSIPLib.xcodeproj/xcshareddata/xcschemes/VialerSIPLib-Example.xcscheme b/Example/VialerSIPLib.xcodeproj/xcshareddata/xcschemes/VialerSIPLib-Example.xcscheme index 370d8478..935715de 100644 --- a/Example/VialerSIPLib.xcodeproj/xcshareddata/xcschemes/VialerSIPLib-Example.xcscheme +++ b/Example/VialerSIPLib.xcodeproj/xcshareddata/xcschemes/VialerSIPLib-Example.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -57,7 +56,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Example/VialerSIPLib.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/VialerSIPLib.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/Example/VialerSIPLib.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/VialerSIPLib/AppDelegate.swift b/Example/VialerSIPLib/AppDelegate.swift index 04654f64..66d2ff4f 100644 --- a/Example/VialerSIPLib/AppDelegate.swift +++ b/Example/VialerSIPLib/AppDelegate.swift @@ -7,21 +7,23 @@ import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - - class var shared: AppDelegate { - return UIApplication.shared.delegate as! AppDelegate - } - struct Configuration { struct Notifications { static let incomingCall = Notification.Name("AppDelegate.Notification.IncomingCall") } } + static var shared: AppDelegate! + var window: UIWindow? var providerDelegate: CallKitProviderDelegate? var account: VSLAccount! + override init() { + super.init() + AppDelegate.shared = self + } + // MARK: - Lifecycle func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { @@ -31,7 +33,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { setupCallKit() } -// setupLogCallBack() + setupLogCallBack() setupVialerEndpoint() setupAccount() return true @@ -63,6 +65,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate { endpointConfiguration.userAgent = "VialerSIPLib Example App" endpointConfiguration.transportConfigurations = transportToUse endpointConfiguration.disableVideoSupport = !prefs.bool(forKey: "useVideo") + endpointConfiguration.unregisterAfterCall = prefs.bool(forKey: "unregisterAfterCall") + + let ipChangeConfiguration = VSLIpChangeConfiguration() + ipChangeConfiguration.ipChangeCallsUpdate = .update + ipChangeConfiguration.ipAddressChangeReinviteFlags = VSLIpChangeConfiguration.defaultReinviteFlags() + + endpointConfiguration.ipChangeConfiguration = ipChangeConfiguration; do { try VialerSIPLib.sharedInstance().configureLibrary(withEndPointConfiguration: endpointConfiguration) @@ -82,6 +91,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { assert(false) } } + + func getAccount() -> VSLAccount! { + return account + } func setupIncomingCallBlock() { // The code from this block will be called when the framework receives an incoming call. @@ -92,11 +105,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } } -// func setupLogCallBack() { -// VialerSIPLib.sharedInstance().setLogCallBack { (logMessage) in -// DDLogWrapper.log(message: logMessage) -// } -// } + func setupLogCallBack() { + VialerSIPLib.sharedInstance().setLogCallBack { (logMessage) in + DDLogWrapper.log(message: logMessage) + } + } func displayIncomingCall(call: VSLCall) { if #available(iOS 10, *) { diff --git a/Example/VialerSIPLib/Base.lproj/Main.storyboard b/Example/VialerSIPLib/Base.lproj/Main.storyboard index 07d09308..1c61a85b 100644 --- a/Example/VialerSIPLib/Base.lproj/Main.storyboard +++ b/Example/VialerSIPLib/Base.lproj/Main.storyboard @@ -1,20 +1,15 @@ - + - + - - - HelveticaNeue - - @@ -60,40 +55,58 @@ - + + + + + + + + + - + - + + + + + + @@ -207,9 +220,9 @@ - + diff --git a/Example/VialerSIPLib/VSLIncomingCallViewController.swift b/Example/VialerSIPLib/VSLIncomingCallViewController.swift index acac0a7e..e4362eeb 100644 --- a/Example/VialerSIPLib/VSLIncomingCallViewController.swift +++ b/Example/VialerSIPLib/VSLIncomingCallViewController.swift @@ -90,7 +90,11 @@ class VSLIncomingCallViewController: UIViewController { statusLabel?.text = "" return } - numberLabel?.text = call.callerNumber + if (call.callerName != "") { + numberLabel?.text = call.callerName + } else { + numberLabel?.text = call.callerNumber + } switch call.callState { case .incoming: statusLabel?.text = "Incoming call" diff --git a/Example/VialerSIPLib/VSLMainViewController.swift b/Example/VialerSIPLib/VSLMainViewController.swift index 5a241732..6a9130b1 100644 --- a/Example/VialerSIPLib/VSLMainViewController.swift +++ b/Example/VialerSIPLib/VSLMainViewController.swift @@ -23,7 +23,7 @@ class VSLMainViewController: UIViewController, UIPickerViewDataSource, UIPickerV fileprivate var account: VSLAccount { get { - return AppDelegate.shared.account + return AppDelegate.shared.getAccount() } } @@ -84,18 +84,34 @@ class VSLMainViewController: UIViewController, UIPickerViewDataSource, UIPickerV @IBOutlet weak var registerAccountButton: UIButton! @IBOutlet weak var transportPicker: UIPickerView! @IBOutlet weak var useVideoSwitch: UISwitch! - + @IBOutlet weak var unregisterAfterCallSwitch: UISwitch! + // MARK: - Actions @IBAction func useVideoSwichPressed(_ sender: UISwitch) { + guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } let prefs = UserDefaults.standard prefs.set(sender.isOn, forKey: "useVideo") account.removeObserver(self, forKeyPath: #keyPath(VSLAccount.accountState)) VialerSIPLib.sharedInstance().removeEndpoint() - AppDelegate.shared.setupVialerEndpoint() - AppDelegate.shared.setupAccount() + appDelegate.setupVialerEndpoint() + appDelegate.setupAccount() account.addObserver(self, forKeyPath: #keyPath(VSLAccount.accountState), options: .new, context: &myContext) } + @IBAction func unregisterAfterCallPressed(_ sender: UISwitch) { + DispatchQueue.main.async { [weak self] in + guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } + let prefs = UserDefaults.standard + prefs.set(sender.isOn, forKey: "unregisterAfterCall") + self!.account.removeObserver(self!, forKeyPath: #keyPath(VSLAccount.accountState)) + VialerSIPLib.sharedInstance().removeEndpoint() + appDelegate.setupVialerEndpoint() + appDelegate.setupAccount() + self!.account.addObserver(self!, forKeyPath: #keyPath(VSLAccount.accountState), options: .new, context: &myContext) + } + } + + @IBAction func registerAccountButtonPressed(_ sender: UIButton) { if account.isRegistered { try! account.unregisterAccount() @@ -122,8 +138,9 @@ class VSLMainViewController: UIViewController, UIPickerViewDataSource, UIPickerV prefs.set(transportPickerData[row], forKey: "transportType") account.removeObserver(self, forKeyPath: #keyPath(VSLAccount.accountState)) VialerSIPLib.sharedInstance().removeEndpoint() - AppDelegate.shared.setupVialerEndpoint() - AppDelegate.shared.setupAccount() + guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return } + appDelegate.setupVialerEndpoint() + appDelegate.setupAccount() account.addObserver(self, forKeyPath: #keyPath(VSLAccount.accountState), options: .new, context: &myContext) } @@ -140,9 +157,16 @@ class VSLMainViewController: UIViewController, UIPickerViewDataSource, UIPickerV self.useVideoSwitch.setOn(useVideo, animated: true) } + let unregisterAfterCall = prefs.bool(forKey: "unregisterAfterCall") + DispatchQueue.main.async { + self.unregisterAfterCallSwitch.setOn(unregisterAfterCall, animated: true) + } + let transportType = prefs.string(forKey: "transportType") if transportType != nil, let defaultRowIndex = transportPickerData.index(of: transportType!) { - transportPicker.selectRow(defaultRowIndex, inComponent: 0, animated: true) + DispatchQueue.main.async { [weak self] in + self?.transportPicker.selectRow(defaultRowIndex, inComponent: 0, animated: true) + } } } diff --git a/Pod/Classes/Configurations/VSLIpChangeConfiguration.h b/Pod/Classes/Configurations/VSLIpChangeConfiguration.h index 8fb7f529..a98e6864 100644 --- a/Pod/Classes/Configurations/VSLIpChangeConfiguration.h +++ b/Pod/Classes/Configurations/VSLIpChangeConfiguration.h @@ -79,4 +79,9 @@ typedef NS_ENUM(NSUInteger, VSLReinviteFlags) { * Default: VSLReinviteFlagsReinitMedia | VSLReinviteFlagsUpdateVia | VSLReinviteFlagsUpdateContact */ @property (nonatomic) VSLReinviteFlags ipAddressChangeReinviteFlags; + +/** + * Return the default reinvite flags + */ ++ (VSLReinviteFlags)defaultReinviteFlags; @end diff --git a/Pod/Classes/Configurations/VSLIpChangeConfiguration.m b/Pod/Classes/Configurations/VSLIpChangeConfiguration.m index f5c7b5dc..1804c90c 100644 --- a/Pod/Classes/Configurations/VSLIpChangeConfiguration.m +++ b/Pod/Classes/Configurations/VSLIpChangeConfiguration.m @@ -17,4 +17,8 @@ - (instancetype)init { return self; } ++ (VSLReinviteFlags)defaultReinviteFlags { + return VSLReinviteFlagsReinitMedia | VSLReinviteFlagsUpdateVia | VSLReinviteFlagsUpdateContact; +} + @end From bcbb4f84b095fff1b7ac00153bed5054bb9fc9b4 Mon Sep 17 00:00:00 2001 From: Redmer Loen Date: Thu, 5 Apr 2018 11:49:54 +0200 Subject: [PATCH 4/5] Fix issue when there were no calls possible from the background when video is disabled remove the video codec option from the INVITE (#131) --- Pod/Classes/CallKitProviderDelegate.m | 3 ++- Pod/Classes/VSLAccount.h | 2 +- Pod/Classes/VSLAccount.m | 1 + Pod/Classes/VSLCall.m | 9 ++++++++- Pod/Classes/VialerSIPLib.h | 5 +++++ Pod/Classes/VialerSIPLib.m | 9 +++++---- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Pod/Classes/CallKitProviderDelegate.m b/Pod/Classes/CallKitProviderDelegate.m index 40dde591..62d7b9eb 100644 --- a/Pod/Classes/CallKitProviderDelegate.m +++ b/Pod/Classes/CallKitProviderDelegate.m @@ -8,6 +8,7 @@ #import "VialerSIPLib.h" #import "VSLAudioController.h" +#import "VSLEndpoint.h" #import "VSLLogging.h" NSString * const CallKitProviderDelegateOutboundCallStartedNotification = @"CallKitProviderDelegateOutboundCallStarted"; @@ -50,7 +51,7 @@ - (CXProviderConfiguration *)providerConfiguration NS_AVAILABLE_IOS(10.0){ providerConfiguration.maximumCallGroups = 2; providerConfiguration.maximumCallsPerCallGroup = 1; - providerConfiguration.supportsVideo = false; + providerConfiguration.supportsVideo = ![VSLEndpoint sharedEndpoint].endpointConfiguration.disableVideoSupport; NSString *ringtoneFileName = [[NSBundle mainBundle] pathForResource:@"ringtone" ofType:@"wav"]; if (ringtoneFileName) { diff --git a/Pod/Classes/VSLAccount.h b/Pod/Classes/VSLAccount.h index 76862917..8ea6006b 100644 --- a/Pod/Classes/VSLAccount.h +++ b/Pod/Classes/VSLAccount.h @@ -134,7 +134,7 @@ typedef void (^RegistrationCompletionBlock)(BOOL success, NSError * _Nullable er * Will unregister the account and will re-register the account once the account * state reaches "unregistered". */ -- (void) reregisterAccount; +- (void)reregisterAccount; /** * This will remove the account from the Endpoint and will also de-register the account from the server. diff --git a/Pod/Classes/VSLAccount.m b/Pod/Classes/VSLAccount.m index 70881875..6707fcd0 100644 --- a/Pod/Classes/VSLAccount.m +++ b/Pod/Classes/VSLAccount.m @@ -246,6 +246,7 @@ - (void)registerAccountWithCompletion:(RegistrationCompletionBlock)completion { } } else { VSLLogVerbose(@"VSLAccount registered or registration in progress, cannot sent another registration"); + VSLLogVerbose(@"VSLAccount state: %ld", (long)self.accountState); } // Check if account is connected, otherwise set completionblock. diff --git a/Pod/Classes/VSLCall.m b/Pod/Classes/VSLCall.m index 0501f8d3..01fcd044 100644 --- a/Pod/Classes/VSLCall.m +++ b/Pod/Classes/VSLCall.m @@ -378,7 +378,14 @@ - (void)answerWithCompletion:(void (^)(NSError *error))completion { pj_status_t status; if (self.callId != PJSUA_INVALID_ID) { - status = pjsua_call_answer((int)self.callId, PJSIP_SC_OK, NULL, NULL); + pjsua_call_setting callSetting; + pjsua_call_setting_default(&callSetting); + + if ([VSLEndpoint sharedEndpoint].endpointConfiguration.disableVideoSupport) { + callSetting.vid_cnt = 0; + } + + status = pjsua_call_answer2((int)self.callId, &callSetting, PJSIP_SC_OK, NULL, NULL); if (status != PJ_SUCCESS) { VSLLogError(@"Could not answer call PJSIP returned status code:%d", status); diff --git a/Pod/Classes/VialerSIPLib.h b/Pod/Classes/VialerSIPLib.h index 118be566..dd70d932 100644 --- a/Pod/Classes/VialerSIPLib.h +++ b/Pod/Classes/VialerSIPLib.h @@ -174,6 +174,11 @@ typedef NS_ENUM(NSUInteger, VialerSIPLibErrors) { */ @property (readonly, nonatomic) BOOL endpointAvailable; +/** + * If the endpoint is configured with TLS. + */ +@property (readonly, nonatomic) BOOL hasTLSTransport; + /* * The callManager used by the Lib. */ diff --git a/Pod/Classes/VialerSIPLib.m b/Pod/Classes/VialerSIPLib.m index db2e579b..bc4861d5 100644 --- a/Pod/Classes/VialerSIPLib.m +++ b/Pod/Classes/VialerSIPLib.m @@ -54,10 +54,11 @@ - (VSLEndpoint *)endpoint { } - (BOOL)endpointAvailable { - if (self.endpoint.state == VSLEndpointStarted) { - return YES; - } - return NO; + return self.endpoint.state == VSLEndpointStarted; +} + +- (BOOL)hasTLSTransport { + return self.endpoint.state == VSLEndpointStarted && self.endpoint.endpointConfiguration.hasTLSConfiguration; } - (VSLCallManager *)callManager { From 04b3032043c18221f86d472eaa47967678b8eb07 Mon Sep 17 00:00:00 2001 From: Redmer Loen Date: Fri, 6 Apr 2018 11:03:46 +0200 Subject: [PATCH 5/5] Release 3.1.3 --- CHANGELOG.md | 17 ++++++++-- Example/Podfile.lock | 15 ++++++--- .../VialerSIPLib.xcodeproj/project.pbxproj | 32 ------------------- VialerSIPLib.podspec | 2 +- 4 files changed, 26 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc3fa8f..51fca488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,17 +3,28 @@ All notable changes to this project will be documented in this file. --- -## [3.1.2](https://github.com/VoIPGRID/VialerSIPLib/tree/3.1.2) (13/06/2018) +## [3.1.3](https://github.com/VoIPGRID/VialerSIPLib/tree/3.1.2) (04/06/2018) +Released on Friday, April 6, 2018. + +### Added +- Updated Vialer-pjsip-iOS to the newest version. + +### Fixed +- Fix issue when there were no calls possible from the background when video is disabled remove the video codec option from the INVITE (#131) +- Incoming callername not showing #124 (#130) +- Fixed issue that call was not being to release on hold status (#129) + +## [3.1.2](https://github.com/VoIPGRID/VialerSIPLib/tree/3.1.2) (03/16/2018) Released on Tuesday, March 16, 2018. ### Added -* Update Vialer-PJSIP-IOS pod to the newest version +- Update Vialer-PJSIP-IOS pod to the newest version ## [3.1.1](https://github.com/VoIPGRID/VialerSIPLib/tree/3.1.1) (03/06/2018) Released on Tuesday, March 06, 2018. ### Added -* Update Vialer-PJSIP-IOS pod to the newest version +- Update Vialer-PJSIP-IOS pod to the newest version ## [3.1.0](https://github.com/VoIPGRID/VialerSIPLib/tree/3.1.0) (02/19/2018) Released on Monday, February 19, 2018. diff --git a/Example/Podfile.lock b/Example/Podfile.lock index f9622a3d..d1812fdf 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -10,7 +10,7 @@ PODS: - SPLumberjackLogFormatter (0.0.1): - CocoaLumberjack - Vialer-pjsip-iOS (3.3.5) - - VialerSIPLib (3.1.2): + - VialerSIPLib (3.1.3): - CocoaLumberjack - Reachability - Vialer-pjsip-iOS @@ -20,11 +20,18 @@ DEPENDENCIES: - SPLumberjackLogFormatter (from `https://github.com/VoIPGRID/SPLumberjackLogFormatter.git`) - VialerSIPLib (from `../`) +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - CocoaLumberjack + - OCMock + - Reachability + - Vialer-pjsip-iOS + EXTERNAL SOURCES: SPLumberjackLogFormatter: :git: https://github.com/VoIPGRID/SPLumberjackLogFormatter.git VialerSIPLib: - :path: ../ + :path: "../" CHECKOUT OPTIONS: SPLumberjackLogFormatter: @@ -37,8 +44,8 @@ SPEC CHECKSUMS: Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 SPLumberjackLogFormatter: a2290c9b880f3166b2d1bace45dc1fc1302b28ab Vialer-pjsip-iOS: 73572fa0f9cf8791c318580c606d1b95163a4ca4 - VialerSIPLib: 5527085f3eee970ef7f0c6f762be53dd3fac9e79 + VialerSIPLib: dfcf0f28bc9e77f9f763a7562bc8db7b6b82477d PODFILE CHECKSUM: d5d9deca56ac68b69c70ab9a6d89a30c6d4fef32 -COCOAPODS: 1.4.0 +COCOAPODS: 1.5.0 diff --git a/Example/VialerSIPLib.xcodeproj/project.pbxproj b/Example/VialerSIPLib.xcodeproj/project.pbxproj index b8e8a092..4a9101cd 100644 --- a/Example/VialerSIPLib.xcodeproj/project.pbxproj +++ b/Example/VialerSIPLib.xcodeproj/project.pbxproj @@ -391,7 +391,6 @@ 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, F271B5561DABD18F0028D620 /* Embed App Extensions */, - D897CEC3B244448989CE9535 /* [CP] Embed Pods Frameworks */, 9867CF3405BE944EA05D1127 /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -412,7 +411,6 @@ 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - 03357C1676371026BC156CA3 /* [CP] Embed Pods Frameworks */, 4CC6A93B1A74CE8A94C2B1D1 /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -526,21 +524,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 03357C1676371026BC156CA3 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-VialerSIPLib_Tests/Pods-VialerSIPLib_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 4CC6A93B1A74CE8A94C2B1D1 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -613,21 +596,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D897CEC3B244448989CE9535 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-VialerSIPLib_Example/Pods-VialerSIPLib_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/VialerSIPLib.podspec b/VialerSIPLib.podspec index 278c7c05..682df371 100644 --- a/VialerSIPLib.podspec +++ b/VialerSIPLib.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "VialerSIPLib" - s.version = "3.1.2" + s.version = "3.1.3" s.summary = "Vialer SIP Library for iOS" s.description = "Objective-C wrapper around PJSIP." s.homepage = "https://github.com/VoIPGRID/VialerSIPLib"