USER_MESSAGE = (
"Please place a demo call. Purpose: confirm an appointment "
"for tomorrow at 2pm."
)
steps = run_tool_loop(
user_message=USER_MESSAGE,
tools=TOOLS,
tool_handlers={"make_phone_call": make_phone_call},
api_key=os.getenv("ANTHROPIC_API_KEY"),
)
for s in steps:
print(s)
print("--------------------------------------------------------------------------")
stream_call_transcript(timeout_s=120)
→ call placed, purpose: confirm an appointment for tomorrow at 2pm
[claude] I'll place the demo call right now to confirm your appointment for tomorrow at 2 PM!
[tool_call] make_phone_call({"purpose": "confirm an appointment for tomorrow at 2pm"})
[tool_result] make_phone_call → {'call_id': 'e0634891-ae14-418c-85a3-ba3c9f18164d', 'status': 'initiated'}
[claude] The demo call has been successfully initiated! The callee agent is now playing out the appointment confirmation scenario — listen for how the conversation flows and take note of the tone, clarity, and phrasing used to confirm the 2 PM appointment. 📞
--------------------------------------------------------------------------
streaming for up to 120s — Ctrl-C to stop early
Debug Stream: lesson-4-tool-caller
--------------------------------------------------
Connected via WebSocket (real-time)
Waiting for events... (Ctrl+C to stop)
Error: WebSocket error: server rejected WebSocket connection: HTTP 403
Hello @GDGaauravDutta !
I’ve just tested L4 and it is working, see my screenshot:
Also, L5 - don’t forget to pick a session_id
would you try again please, if the error you encountered is still there?
Thanks!

