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

# rpcDial

> Dial out to a phone number with a destination SWML URL via RPC.

[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**

**`toNumber`** `string` — required

Phone number to dial in E.164 format.

---

**`fromNumber`** `string` — required

Caller ID to display in E.164 format.

---

**`destSwml`** `string` — required

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.

---

**`deviceType`** `string` — default: phone

Device type for the outbound leg.

---

## **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');
```