diff --git a/Example/Podfile.lock b/Example/Podfile.lock index e3a383fd..ba16dc1f 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -10,7 +10,7 @@ PODS: - OCMock (3.3.1) - Reachability (3.2) - Vialer-pjsip-iOS (1.1.0) - - VialerSIPLib (2.2.0): + - VialerSIPLib (2.3.0): - CocoaLumberjack - Reachability - Vialer-pjsip-iOS @@ -30,7 +30,7 @@ SPEC CHECKSUMS: OCMock: f3f61e6eaa16038c30caa5798c5e49d3307b6f22 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 Vialer-pjsip-iOS: ced3608a20ffdcdf4afdc84a8e381c57525f8f25 - VialerSIPLib: 0f5c476dfbd6b0eadb84e07a761c273c7ddd321c + VialerSIPLib: 1e7e022232f57a4e84f3e270aa029505347e5017 PODFILE CHECKSUM: 0f7b04fb045caf39ed7c2486524959b2d2be90e8 diff --git a/Pod/Classes/CallKitProviderDelegate.m b/Pod/Classes/CallKitProviderDelegate.m index fa223129..3e7c94ae 100644 --- a/Pod/Classes/CallKitProviderDelegate.m +++ b/Pod/Classes/CallKitProviderDelegate.m @@ -52,6 +52,11 @@ - (CXProviderConfiguration *)providerConfiguration { providerConfiguration.maximumCallsPerCallGroup = 1; providerConfiguration.supportsVideo = false; + NSString *ringtoneFileName = [[NSBundle mainBundle] pathForResource:@"ringtone" ofType:@"wav"]; + if (ringtoneFileName) { + providerConfiguration.ringtoneSound = @"ringtone.wav"; + } + providerConfiguration.supportedHandleTypes = [NSSet setWithObject:[NSNumber numberWithInt:CXHandleTypePhoneNumber]]; return providerConfiguration; diff --git a/Pod/Classes/VSLCall.m b/Pod/Classes/VSLCall.m index 2b2f06c0..d48daee3 100644 --- a/Pod/Classes/VSLCall.m +++ b/Pod/Classes/VSLCall.m @@ -225,13 +225,11 @@ - (void)startWithCompletion:(void (^)(NSError * error))completion { NSError *error; if (status != PJ_SUCCESS) { VSLLogError(@"Error creating call"); - if (error != NULL) { - error = [NSError VSLUnderlyingError:nil - localizedDescriptionKey:NSLocalizedString(@"Could not setup call", nil) - localizedFailureReasonError:[NSString stringWithFormat:NSLocalizedString(@"PJSIP status code: %d", nil), status] - errorDomain:VSLCallErrorDomain - errorCode:VSLCallErrorCannotCreateCall]; - } + error = [NSError VSLUnderlyingError:nil + localizedDescriptionKey:NSLocalizedString(@"Could not setup call", nil) + localizedFailureReasonError:[NSString stringWithFormat:NSLocalizedString(@"PJSIP status code: %d", nil), status] + errorDomain:VSLCallErrorDomain + errorCode:VSLCallErrorCannotCreateCall]; } completion(error); }