async def dial_operator(params: FunctionCallParams):
        """Function the bot can call to dial an operator."""
        nonlocal dialout_params

        if operator_number:
            call_flow_state.set_operator_dialed()
            logger.info(f"Dialing operator number: {operator_number}")

            # Create a message to add
            content = "The user has requested a supervisor, indicate that you will attempt to connect them with a supervisor."
            message = {
                "role": "system",
                "content": content,
            }

            # Append the message to the list
            messages.append(message)
            # Queue the message to the context
            await task.queue_frames([LLMMessagesFrame(messages)])

            # Set up dialout parameters and start attempt
            dialout_params = {"phoneNumber": operator_number}
            logger.debug(f"Dialout parameters: {dialout_params}")
            await attempt_operator_dialout()

        else:
            # Create a message to add
            content = "Indicate that there are no operator dialout settings available."
            message = {
                "role": "system",
                "content": content,
            }
            # Append the message to the list
            messages.append(message)
            # Queue the message to the context
            await task.queue_frames([LLMMessagesFrame(messages)])
            logger.info("No operator dialout settings available")
Function the bot can call to dial an operator.
examples/phone-chatbot/daily-pstn-call-transfer/bot.py