<Default/>
Handling Unmatched DTMF Codes with <Default>
The <Default>
command inside a <Gather>
block is used to define actions that will be executed when the caller enters a DTMF code that is not covered by any specific <DTMF>
block within the <Gather>
.
Example:
<Gather>
<DTMF value="1">
<Say>You chose option 1</Say>
</DTMF>
<DTMF value="2">
<Say>You chose option 2</Say>
</DTMF>
<!-- Default block for unmatched DTMF codes -->
<Default>
<Say>Wrong DTMF code entered. Please try again.</Say>
</Default>
</Gather>
In this example, if the caller enters a DTMF code that is not covered by the specific blocks for options 1 and 2, the <Default>
block will be executed. It allows you to handle cases where the entered DTMF code doesn't match any predefined options.
Attributes:
tag (string):
Notification event tag used to mark call notification events (if configured).
The <Default>
command provides a way to gracefully handle situations where the caller's input does not match any expected DTMF codes, allowing you to guide them with a custom response.
Last updated
Was this helpful?