# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class PlayDtmfToolConfig(UncheckedBaseModel):
    """
    Allows the agent to play DTMF tones during a phone call.

    This tool can be used to interact with automated phone systems, such as
    navigating phone menus, entering extensions, or inputting numeric codes.
    """

    use_out_of_band_dtmf: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Send DTMF tones as out-of-band RTP events (RFC 4733) instead of in-band audio. Only effective for SIP trunk imported numbers.
    """

    suppress_turn_after_dtmf: typing.Optional[bool] = pydantic.Field(default=None)
    """
    If true, the agent will not generate further speech after playing DTMF tones. This prevents the agent's speech from interfering with IVR systems.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
