onRequest
Public hook called on every inbound request before the SWML document is
rendered. The default implementation delegates to
onSwmlRequest(). Override it to return a dictionary of SWML
modifications, or void to render with the default behavior.
Most subclasses override onSwmlRequest() instead, which is
the conventional per-request customization hook. onRequest is the lower-level
WebMixin parity entry point.
This hook returns a dictionary of SWML modifications to merge into the
rendered document. To replace the entire SWML document for a request instead,
use setOnRequestCallback() on SWMLService.
Parameters
requestData
The parsed request body. Contains call metadata such as call_id and
caller_id_number.
callbackPath
Optional callback path from the request.
Returns
Record<string, unknown> | void (or a Promise of these) — A dict of SWML
modifications to merge before rendering, or void for default rendering.