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
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
        • addSection
        • addVerb
        • addVerbToSection
        • asRouter
        • extractSipUsername
        • getApp
        • getBasicAuthCredentials
        • getBuilder
        • getDocument
        • manualSetProxyUrl
        • onRequest
        • registerRoutingCallback
        • registerVerbHandler
        • renderDocument
        • renderSwml
        • resetDocument
        • run
        • serve
        • setOnRequestCallback
        • stop
    • 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
AgentsSWMLService

manualSetProxyUrl

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

onRequest

Next
Built with

Manually set the proxy URL base used for generating webhook callback URLs. Call this when automatic proxy detection does not work for your deployment (e.g., behind a custom load balancer or tunneling service).

Overrides any value auto-detected from the SWML_PROXY_URL_BASE environment variable or inferred from request headers, and clears the “from env” flag so subsequent env changes won’t overwrite your explicit setting.

The proxy URL affects how webhook URLs are generated for SWAIG function callbacks, post-prompt URLs, and other webhook endpoints. Without a correct proxy URL, SignalWire cannot reach your service’s webhook endpoints when deployed behind a reverse proxy or tunnel.

Parameters

url
stringRequired

The base URL to use for webhook generation (e.g., "https://my-agent.ngrok.io"). Trailing slashes are stripped automatically. Empty strings are ignored.

Returns

this — returns the service for fluent chaining.

Example

1import { SWMLService } from '@signalwire/sdk';
2
3const service = new SWMLService({ name: 'my-service' });
4
5// Set proxy URL for ngrok tunnel
6service.manualSetProxyUrl('https://abc123.ngrok.io');
7
8service.addVerb('answer', {});
9await service.serve();