【问题标题】:Call from ios app with Pause使用暂停从 ios 应用程序调用
【发布时间】:2016-10-03 04:35:13
【问题描述】:

我正在使用 VOIP 应用程序。我正在尝试从我的 ios 应用 拨打电话,其中包含用 (,) 指示的暂停。

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

拨打号码时,通话未接通。我可以使用什么来暂停我的号码。

【问题讨论】:

    标签: ios voip phone-call tel telprompt


    【解决方案1】:

    尝试使用 tel:// 方案:

    目标-C

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

    斯威夫特

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

    并确保您的字符串没有空格。

    干杯。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-12
      • 2018-04-13
      • 1970-01-01
      • 1970-01-01
      • 2014-02-03
      相关资源
      最近更新 更多