Trigger Conditions
Optional. By default the server delivers inbound calls and inbound WhatsApp messages to the connector.
Configure trigger conditions to change routing - for example, deliver only missed calls, stop inbound calls, or stop inbound messages while retaining outbound capability.
Setup
Build with TriggerConditionsBuilder and send once after connecting:
InboundCallMode
inbound_message
True delivers incoming WhatsApp to @on_incoming_message. False stops
delivery. Call and message routing are independent: calls only, messages only,
or both.
Rules of thumb
- Routing only. Trigger conditions never gate what the SDK can do. Outbound
make_call/dial/send_messagework regardless. - Absolute replace. The config you send fully replaces server-side routing. Set every flow you want; defaults are inbound calls
ALLand inbound messages on. - Send once. Applied across automatic reconnects; you do not need to re-send.
Note: Builder toggles for
outbound_call/outbound_messagebelong to an upcoming “notify me when the subscriber places a call or sends a message” feature and have no effect yet.
VoiceAgent(..., inbound=...) also sends an absolute trigger config on startup
and resets message-flow toggles to defaults. Pass inbound=None to leave the
connector configuration untouched.
