-1

I am working with VOIP application. I am trying to make call from my ios app which contains Pauses indicated with (,).

      NSString *phoneNumber = [@"telprompt://" stringByAppendingString:finalNumber];
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];

On dialling number, call is not connected. What I can use to allow pause in my number.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Megha Parmar
  • 248
  • 2
  • 15

1 Answers1

1

Try using tel:// scheme:

Objective-C

NSString *telUrl = [NSString stringWithFormat:@"tel://%@,%@", contactPhone, contactExtension];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telUrl]];

Swift

    let formattedPhone = "tel://\(contactPhone),\(contactExtension)"
    if let phoneURL = NSURL(string:formattedPhone) {
        print(phoneURL)
        UIApplication.sharedApplication().openURL(phoneURL)
    }

And make sure your string doesn't have white spaces.

Cheers.

MontiRabbit
  • 1,020
  • 12
  • 17