Transfer the execution of the script to a different SWML section, URL, or RELAY application. Once
the transfer is complete, the script will continue executing SWML from the new location.
An object that accepts the following properties.
Specifies where to transfer to. The value can be one of:
"<section_name>" - section in the SWML document to jump tousername:password@url.Named parameters to send to a section, URL, or application.
User data, ignored by SignalWire. Accepts an object mapping variable names to values.
The destination string can be one of:
"section_name" - section in the current document to execute.
(For example: execute: main)"relay:<relay application>" - relay application to notify (currently not implemented)"https://example.com/sub-swml.yaml" - URL pointing to the document to execute.
An HTTP POST request will be sent to the URL. Authentication can also be set in the url in the format of username:password@url.
The params object is passed, along with the variables and the call object.A minimal server for this SWML script can be written as follows:
This server (running on localhost) can be made accessible to the wider web (and thus this SWML script) using forwarding tools like ngrok.
Visit ngrok.com to learn how.
The server will be sent the payload in the following format:
The call object is described in detail in the introduction.
All variables created within the SWML document are passed inside vars,
and the params object contains the parameters defined in the params parameter of transfer.