Overview
How to call your bots (or have them call you)
Introduction
You can dial-in to your Pipecat bots, and have them dial-out too, across both PSTN and SIP. The technical implementation will depend on your chosen transport and phone number vendor; each will likely have their own methods and events to consider.
Which transport should I use?
This really depends on your project. We have examples that cover both WebRTC (Daily) and Twilio (WebSockets), and Pipecat supports multiple different types of media transport: local, WebSockets, WebRTC etc.
-
Use Pipecat’s native Twilio WebSockets integration for simple workflows that are only telephony-based.
- The call is managed by Twilio (or similar telephony provider), which means that the bot is not able to perform any form of complex call control. Typically Twilio-specific APIs need to be implemented (for example, when you’re already using Twilio Studio, Twilio Flex, etc).
- We strongly recommend against using WebSockets for non-telephony use cases (mobile apps, web browsers, etc.). See below.
-
You must use SIP for use cases like the below. These require SIP-based call control:
- Multi-agents or multi-party calls
- Connect to legacy call centers powered by open source or cloud
- Forwarding calls, agent assist/co-pilot, warm transfers, etc.
- Supporting different telephony vendors without having telephony platform-specific code
-
We strongly recommend using WebRTC for non telephony use cases — ie, mobile apps, web-based experiences. WebRTC is designed to support users on devices with varying network conditions at scale. Learn more in the Voice AI & Voice Agents Illustrated Primer here
Please note: you can configure your Pipecat bots to handle multiple vendors. You could,for example, use both Daily and Twilio as phone number vendors concurrently.
What are PSTN and SIP? What are the differences?
PSTN is an abbreviation for traditional phone networks, consisting of the physical phone lines, cables and transmission links. One of the main differences to consider between these two forms of telephony is PSTN operates on a one user per line basis while SIP can have multiple users per line.
Depending on your use-case, you may or may not want to have a single phone number that routes users to a specific bot session, something we’ll cover in the following guides.