> For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt.

# makePhoneCall

拨打电话。

## 扫码预览

![扫码预览 makePhoneCall](https://api.qrserver.com/v1/create-qr-code/?size=200x200\&data=doubao%3A%2F%2Fdoubao_apps%3Fapp_id%3Ddb_1McM5Ni%26path%3D%252Fpages%252Fapi%252Fdevice%252Fmake-phone-call%252Findex)

## 使用限制

> \[!WARNING]
> **Android、iOS**：Android 通过 ACTION\_DIAL 打开拨号盘即成功，iOS 通过 open(tel:) 唤起，是否进入拨号盘取决于系统处理结果；相同调用在双端"成功"代表的实际状态不同。

## 支持版本

前端库版本不低于 `0.0.19`。

## 支持平台

<table>
<thead>
<tr><th>平台</th><th>支持情况</th></tr>
</thead>
<tbody>
<tr><td>Android</td><td>支持</td></tr>
<tr><td>iOS</td><td>支持</td></tr>
<tr><td>PC</td><td>不支持</td></tr>
<tr><td>HarmonyOS</td><td>不支持</td></tr>
</tbody>
</table>

## 支持场景

<table>
<thead>
<tr><th>场景</th><th>支持情况</th></tr>
</thead>
<tbody>
<tr><td>页面</td><td>支持</td></tr>
<tr><td>卡片</td><td>支持</td></tr>
</tbody>
</table>

## 使用说明

- 该接口仅唤起系统拨号界面，最终是否拨出由用户在系统界面确认

## 调用方式

### 异步 API

```typescript
makePhoneCall(params: MakePhoneCallParams): Promise<object>
```

## 入参

<table>
<thead>
<tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>phoneNumber</code></td><td><code>string</code></td><td>是</td><td>-</td><td>-</td><td>需要拨打的电话号码</td></tr>
</tbody>
</table>

## 调用示例

```typescript
import { makePhoneCall } from '@doubao-dev/framework/api';

await makePhoneCall({ phoneNumber: '13800000000' });
```

## 成功返回

无返回字段。

### 返回示例

```json
{}
```

## 错误处理

错误对象和通用错误码见 [通用错误处理](/apps-plugin/docs/js-api/common-errors.md#错误返回)。

### 失败示例

```json
{
  "errNo": 104,
  "errMsg": "invalid parameter"
}
```

### 错误码

<table>
<thead>
<tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
</thead>
<tbody>
<tr><td><code>104</code></td><td><code>invalid parameter</code></td><td>Android、iOS</td><td>phoneNumber 为空，或在 iOS 上无法拼接为有效的拨号 URL</td><td>传入合法的电话号码后重试。</td></tr>
<tr><td><code>103</code></td><td><code>feature not support</code></td><td>iOS</td><td>当前设备不支持拨打电话</td><td>在支持拨号的设备上调用，或提前提示用户设备不支持拨号。</td></tr>
</tbody>
</table>

#### 通用错误码

<table>
<thead>
<tr><th>errNo</th><th>errMsg</th><th>说明</th><th>平台</th></tr>
</thead>
<tbody>
<tr><td><code>102</code></td><td><code>internal error</code></td><td>内部错误</td><td>Android、iOS</td></tr>
</tbody>
</table>
