Call your Pipecat bot using Daily WebRTC
start_bot
method, we’ll need to grab both callId
and callDomain
from the incoming web request that is triggered by Daily when someone dials the number:
daily-helpers.py
included in Pipecat has some useful imports that make this easy. We just need to pass through new SIP parameters as part of room creation:
callId
and callDomain
properties in the body of the request; we’ll need to pass to the Pipecat agent.
For simplicity, our agents are spawned as sub-processes of the bot runner, so we’ll pass the callId and callDomain through as command line arguments:
bot_runner.py
.
bot_daily.py
and step through the differences from other examples.
First, it’s setup to receive additional command line parameters which are passed through to the DailyTransport
object:
on_dialin_ready
event manually. This is useful if you have specific scenarios in whih you want to indicates that the SIP worker and is ready to be forwarded to the call.
This would stop any hold music and connect the end-user to our Pipecat bot.
on_first_participant_joined
event after the user has joined the session.