Using Daily’s Transport to receive calls from external SIP Addresses and PSTN numbers
Next.js
and FastAPI
to help you get started with your own implementation.
room_creation_api
){service}/start
—to handle this automatically.
When someone calls your purchased number, Daily sends a webhook request containing information about the call. Your server can use this data to take the call off hold and connect it to a Pipecat Bot.
Here’s a sample of the webhook payload:
createDailyRoom
to truedailyRoomProperties
with the following sip
settings:
sip_mode
: “dial-in”num_endpoints
: 1 (set to 2 for call transfers)display_name
: typically set to the From
numberdialin_settings
and convert camelCase to snake_case (e.g., callId
→ call_id
).{service}/start
endpoint creates a Pipecat bot instance and forwards the incoming request to it. Within the bot, pass the dialin_settings
from the request body to the DailyTransport
, see example below. The incoming PSTN or SIP call will then be automatically routed to the bot.