mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix #2008: correctly handle sip addresses
This commit is contained in:
parent
49188892f5
commit
2eb5458592
1 changed files with 5 additions and 3 deletions
|
|
@ -245,10 +245,12 @@
|
|||
[confirmation release];
|
||||
} else {
|
||||
if([[url scheme] isEqualToString:@"sip"]) {
|
||||
// Go to Dialer view
|
||||
DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
|
||||
// remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and trailing "/"
|
||||
NSString* sipUri = [[url resourceSpecifier] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];
|
||||
|
||||
DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
|
||||
if(controller != nil) {
|
||||
[controller setAddress:[url absoluteString]];
|
||||
[controller setAddress:sipUri];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue