I am trying to make a call from my app using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://1800000002"]];
This is a toll free number in India.But while dialing, it is converting to +1(800)-000-000 (Converting and Saying dialing to United states number)
I have referred Copy/paste phone number into keypad And When I'm redialing a Toll free No. in India, iPhone is connecting USA]. But could not find the solution.
So can any please help me to avoid this ISD call Indian local call..
On the Keypad screen, locate the blank white area near the top of the screen that normally displays the phone number as you dial it. Place your finger on that area and hold it for a moment, then release. After releasing your finger, a tiny “Paste” button will pop up.
The telprompt wants the number in the international format. So you need to convert it to that. I think for India and the number you are trying to call, this should be +911800000002
.
So this should work:
NSURL *phoneURL = [NSURL URLWithString:@"telprompt://+911800000002"];
if ([[UIApplication sharedApplication] canOpenURL:phoneURL]) {
[[UIApplication sharedApplication] openURL:phoneURL];
} else {
// handle that case. e.g show number to user so that they can
// type it in a phone manually or copy it to the clipboard and
// notify user about that.
}
Depending on how the local numbers compared to international format works in India, you might need to remove the 1
on your number, not sure about that.
On a sidenote: You should always use the international format when dealing with phone numbers. Otherwise a device that is currently outside of the destination country may call somebody else or simply can't place the call at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With