***

title: rpcDial
slug: /reference/typescript/agents/function-result/rpc-dial
description: Dial out to a phone number with a destination SWML URL via RPC.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[hold]: /docs/server-sdks/reference/typescript/agents/function-result/hold

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Dial out to a phone number with a destination SWML URL that handles the
outbound call leg. This is commonly used in call screening scenarios: place the
caller on hold with [`hold()`][hold],
then dial out to a human whose call is handled by a separate SWML agent.

## **Parameters**

<ParamField path="toNumber" type="string" required={true} toc={true}>
  Phone number to dial in E.164 format.
</ParamField>

<ParamField path="fromNumber" type="string" required={true} toc={true}>
  Caller ID to display in E.164 format.
</ParamField>

<ParamField path="destSwml" type="string" required={true} toc={true}>
  URL of the SWML document that handles the outbound call leg. The SWML at this
  URL typically runs a screening agent that can accept, reject, or take a message.
</ParamField>

<ParamField path="deviceType" type="string" default="phone" toc={true}>
  Device type for the outbound leg.
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .rpcDial('+15551234567', '+15559876543', 'https://example.com/swml');
```