Reputation: 3811
I am facing an issue while dialing a call as it is automatically assigning international or local prefixes when making calls for toll free local numbers Which starts with one to ISD
NSString *phNo = @"18605003000";
NSURL *phoneUrl = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",phNo]];
NSLog(@"in call");
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
[[UIApplication sharedApplication] openURL:phoneUrl];
}
For above code, when Dail assist is ON, it is prefixing number and converting with +1 (860) 500-3000 which is actually a Indian toll free redirecting to ISD to call ..To avoid this I want to check whether Dail assist is ON or way to disable this programatically.
I have even referred this iOS dial assist auto formats local number to USA number but this way it is Dailing to wrong number
So can any please suggest me for possible way?
Upvotes: 2
Views: 493
Reputation: 1247
I tried the code, and had the dial assist on, but it dialed "18005003000" and did not converted to +1 (800) 500-3000
NSURL *url = [NSURL URLWithString:@"tel://18005003000"];
[[UIApplication sharedApplication] openURL:url];
Upvotes: 1