diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 31b1f027b..e11481415 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -336,16 +336,21 @@ [errView addAction:yesAction]; [PhoneMainView.instance presentViewController:errView animated:YES completion:nil]; - } else { - if ([[url scheme] isEqualToString:@"sip"]) { - // remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and - // trailing "/" - NSString *sipUri = [[url resourceSpecifier] - stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]]; - [VIEW(DialerView) setAddress:sipUri]; - } - } - return YES; + } else { + if ([[url scheme] isEqualToString:@"sip"]) { + // remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and + // trailing "/" + if ([[url host] isEqualToString:@"call_log"] && + [[url path] isEqualToString:@"/show"]) { + [VIEW(HistoryDetailsView) setCallLogId:[url query]]; + [PhoneMainView.instance popToView:HistoryDetailsView.compositeViewDescription]; + } else { + NSString *sipUri = [[url resourceSpecifier] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]]; + [VIEW(DialerView) setAddress:sipUri]; + } + } + } + return YES; } - (void)fixRing { diff --git a/latestCallsWidget/TodayViewController.m b/latestCallsWidget/TodayViewController.m index 6e2b44380..b8e2d92d8 100644 --- a/latestCallsWidget/TodayViewController.m +++ b/latestCallsWidget/TodayViewController.m @@ -39,19 +39,23 @@ completionHandler:nil]; } +- (void)launchOnHistoryDetailsWithId:(NSString *)logId { + [self launchAppWithURL:[NSURL URLWithString:[@"sip://call_log/show?" stringByAppendingString:logId]]]; +} + - (IBAction)firstButtonTapped { - [self launchAppWithURL:[NSURL URLWithString:@"sip://"]]; + [self launchOnHistoryDetailsWithId:@""]; } - (IBAction)secondButtonTapped { - [self launchAppWithURL:[NSURL URLWithString:@"sip://"]]; + [self launchOnHistoryDetailsWithId:@""]; } - (IBAction)thirdButtonTapped { - [self launchAppWithURL:[NSURL URLWithString:@"sip://"]]; + [self launchOnHistoryDetailsWithId:@""]; } - (IBAction)fourthButtonTapped { - [self launchAppWithURL:[NSURL URLWithString:@"sip://"]]; + [self launchOnHistoryDetailsWithId:@""]; } @end