OptionalallowedOptionalallowedAllowed-callers filter for inbound calls. Unset = any caller accepted.
OptionalfetchOptional fetch override for the REST client. Tests pass an in-memory
mock so unit tests can verify REST traffic without real Twilio.
OptionalhttpHTTP server port. 0 = OS-assigned (recommended for tests).
OptionalonCallback invoked when the remote side sends DTMF mid-call.
Twilio-owned phone number in E.164 format (e.g. "+14155551234").
OptionalpublicHTTPS URL routing to this machine. Required at connect() time.
OptionalrestOptional REST helper override. When provided, replaces the default
TwilioRESTHelper constructed from accountSid/authToken. Lets tests
inject a fully-stubbed REST surface.
OptionalroleRole under test — AGENT (default) or USER.
OptionalspeechEnergy gate on INBOUND call audio (see ./twilio-speech-gate.ts). On by
default with the measured phone-line thresholds: Twilio streams a media
frame every 20 ms for the life of the call, silence included, so without
the gate the drain's tail-silence turn end (responseTailSilence) can
never fire and the callee's turn only ends on hangup or the hard ceiling.
Pass an object to tune the thresholds, or false to admit every frame
(the pre-gate behaviour — only sensible for a transport that already
stops sending during silence).
OptionaltunnelEdge-readiness probe consulted before a-leg origination (#762 guardrail (c)). Unset means the caller owns a stable public URL and has nothing to wait for.
OptionalvalidateReject inbound webhooks without a valid X-Twilio-Signature. Tests pass
false to bypass; production callers must leave on.
Destination allowlist for a-leg outbound calls (#762 guardrail (c)). Unset denies EVERY a-leg destination: a-leg dials numbers this account does not own, so an unguarded
tois an unbounded dialer and the capability has to be opted into per destination. Entries are validated at construction, so a typo fails at setup instead of when a PSTN call is about to be billed. b-leg is deliberately not gated on this — it can only reach numbers on this account, which is its own guardrail.