Fixed a few things
This commit is contained in:
@@ -41,6 +41,7 @@ async def start_terminate_call(
|
|||||||
async def terminate_call(
|
async def terminate_call(
|
||||||
function_name, tool_call_id, args, llm: LLMService, context, result_callback
|
function_name, tool_call_id, args, llm: LLMService, context, result_callback
|
||||||
):
|
):
|
||||||
|
"""Function the bot can call to terminate the call upon completion of a voicemail message."""
|
||||||
print("Terminating call", {"msg": function_name})
|
print("Terminating call", {"msg": function_name})
|
||||||
await llm.queue_frame(EndTaskFrame(), FrameDirection.UPSTREAM)
|
await llm.queue_frame(EndTaskFrame(), FrameDirection.UPSTREAM)
|
||||||
await result_callback("Goodbye")
|
await result_callback("Goodbye")
|
||||||
@@ -58,7 +59,7 @@ async def main():
|
|||||||
transport = DailyTransport(
|
transport = DailyTransport(
|
||||||
room_url,
|
room_url,
|
||||||
token,
|
token,
|
||||||
"Respond bot",
|
"Voicemail detection bot",
|
||||||
DailyParams(
|
DailyParams(
|
||||||
audio_in_enabled=True,
|
audio_in_enabled=True,
|
||||||
audio_out_enabled=True,
|
audio_out_enabled=True,
|
||||||
@@ -126,7 +127,7 @@ async def main():
|
|||||||
@transport.event_handler("on_call_state_updated")
|
@transport.event_handler("on_call_state_updated")
|
||||||
async def on_call_state_updated(transport, state):
|
async def on_call_state_updated(transport, state):
|
||||||
logger.info(f"Call state updated: {state}")
|
logger.info(f"Call state updated: {state}")
|
||||||
if state == "joined" and dialoutSettings and shouldDialout:
|
if state == "joined" and dialoutSettings and useDialout:
|
||||||
logger.info("Starting dialout")
|
logger.info("Starting dialout")
|
||||||
await start_dialout(transport, dialoutSettings)
|
await start_dialout(transport, dialoutSettings)
|
||||||
if state == "left":
|
if state == "left":
|
||||||
|
|||||||
Reference in New Issue
Block a user