For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
        • addAction
        • addActions
        • addDynamicHints
        • clearDynamicHints
        • connect
        • createPaymentAction
        • createPaymentParameter
        • createPaymentPrompt
        • enableExtensiveData
        • enableFunctionsOnTimeout
        • executeRpc
        • executeSwml
        • hangup
        • hold
        • joinConference
        • joinRoom
        • pay
        • playBackgroundFile
        • recordCall
        • removeGlobalData
        • removeMetadata
        • replaceInHistory
        • rpcAiMessage
        • rpcAiUnhold
        • rpcDial
        • say
        • sendSms
        • setEndOfSpeechTimeout
        • setMetadata
        • setPostProcess
        • setResponse
        • setSpeechEventTimeout
        • simulateUserInput
        • sipRefer
        • stop
        • stopBackgroundFile
        • stopRecordCall
        • stopTap
        • switchContext
        • swmlChangeContext
        • swmlChangeStep
        • swmlTransfer
        • swmlUserEvent
        • tap
        • toDict
        • toggleFunctions
        • updateGlobalData
        • updateSettings
        • waitForUser
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Parameters
  • Returns
  • Example
AgentsFunctionResult

rpcDial

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

say

Next
Built with

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(), then dial out to a human whose call is handled by a separate SWML agent.

Parameters

toNumber
stringRequired

Phone number to dial in E.164 format.

fromNumber
stringRequired

Caller ID to display in E.164 format.

destSwml
stringRequired

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
stringDefaults to phone

Device type for the outbound leg.

Returns

FunctionResult — this, for chaining.

Example

1import { FunctionResult } from '@signalwire/sdk';
2
3const result = new FunctionResult()
4 .rpcDial('+15551234567', '+15559876543', 'https://example.com/swml');