diff --git a/examples/deployment/pipecat-cloud-dialin-server/README.md b/examples/deployment/pipecat-cloud-daily-pstn-server/README.md similarity index 94% rename from examples/deployment/pipecat-cloud-dialin-server/README.md rename to examples/deployment/pipecat-cloud-daily-pstn-server/README.md index ceb29cbd3..075b69399 100644 --- a/examples/deployment/pipecat-cloud-dialin-server/README.md +++ b/examples/deployment/pipecat-cloud-daily-pstn-server/README.md @@ -6,11 +6,11 @@ Pipecat Cloud [pstn_sip starter image](https://github.com/daily-co/pipecat-cloud In addition you can use `/api/dial` to trigger dial-out, and eventually, call-transfers. -1. [FastAPI Server](simple-python/README.md) - +1. [FastAPI Server](fastapi-webhook-server/README.md) - A FastAPI implementation that handles PSTN (Public Switched Telephone Network) and SIP (Session Initiation Protocol) calls using the Daily API. -2. [Vercel Serverless](vercel/README.md) - +2. [Next.js Serverless](nextjs-webhook-server/README.md) - A Next.js API implementation designed for deployment on Vercel's serverless platform. @@ -24,16 +24,16 @@ Both implementations provide: ## Choosing an Implementation -- Use the **Simple Python Server** if you: +- Use the **FastAPI Server** if you: - Need a standalone server - Prefer Python and FastAPI - Want to deploy to traditional hosting platforms -- Use the **Vercel Serverless** implementation if you: +- Use the **Next.js Serverless** implementation if you: - Want serverless deployment - Prefer JavaScript/TypeScript - - Already use Vercel for other projects + - Already use Next.js and Vercel for other projects - Need quick scaling and zero maintenance ## Prerequisites diff --git a/examples/deployment/pipecat-cloud-dialin-server/simple-python/README.md b/examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/README.md similarity index 88% rename from examples/deployment/pipecat-cloud-dialin-server/simple-python/README.md rename to examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/README.md index a0cdbc8a7..2fa2dc776 100644 --- a/examples/deployment/pipecat-cloud-dialin-server/simple-python/README.md +++ b/examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/README.md @@ -1,4 +1,4 @@ -# PSTN/SIP Webhook Handler +# FastAPI server for handling Daily PSTN/SIP Webhook A FastAPI server that handles PSTN (Public Switched Telephone Network) and SIP (Session Initiation Protocol) calls using the Daily API. @@ -6,19 +6,25 @@ A FastAPI server that handles PSTN (Public Switched Telephone Network) and SIP ( 1. Clone the repository -2. Install dependencies: +2. Navigate to the `fastapi-webhook-server` directory: + + ```bash + cd fastapi-webhook-server + ``` + +3. Install dependencies: ```bash pip install -r requirements.txt ``` -3. Copy `env.example` to `.env`: +4. Copy `env.example` to `.env`: ```bash cp env.example .env ``` -4. Update `.env` with your credentials: +5. Update `.env` with your credentials: - `AGENT_NAME`: Your Daily agent name - `PIPECAT_CLOUD_API_KEY`: Your Daily API key diff --git a/examples/deployment/pipecat-cloud-dialin-server/simple-python/env.example b/examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/env.example similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/simple-python/env.example rename to examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/env.example diff --git a/examples/deployment/pipecat-cloud-dialin-server/simple-python/requirements.txt b/examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/requirements.txt similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/simple-python/requirements.txt rename to examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/requirements.txt diff --git a/examples/deployment/pipecat-cloud-dialin-server/simple-python/server.py b/examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/server.py similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/simple-python/server.py rename to examples/deployment/pipecat-cloud-daily-pstn-server/fastapi-webhook-server/server.py diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/.gitignore b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/.gitignore similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/.gitignore rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/.gitignore diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/README.md b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/README.md similarity index 72% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/README.md rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/README.md index 946f6b096..bbce81a5c 100644 --- a/examples/deployment/pipecat-cloud-dialin-server/vercel/README.md +++ b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/README.md @@ -1,10 +1,10 @@ -# Daily API Backend +# Next.js server for handling Daily PSTN/SIP Webhook -Next.js API routes for handling Daily Pipecat requests. +Next.js API routes for handling Daily PSTN/SIP Pipecat requests. ## Features -- API endpoint for handling Daily Pipecat requests +- API endpoint for handling Daily PSTN/SIP Pipecat requests - HMAC signature validation - Structured logging with Pino - Support for dial-in and dial-out settings @@ -15,38 +15,38 @@ Next.js API routes for handling Daily Pipecat requests. 1. Clone the repository -2. Navigate to the `vercel` directory: +2. Navigate to the `nextjs-webhook-server` directory: -```bash -cd vercel -``` + ```bash + cd nextjs-webhook-server + ``` 3. Install dependencies: -```bash -npm install -``` + ```bash + npm install + ``` 4. Create `.env.local` file with your credentials: -```bash -cp env.local.example .env.local -``` + ```bash + cp env.local.example .env.local + ``` -Add your secrets: +5. Update your `.env` with your secrets: -```bash -PIPECAT_CLOUD_API_KEY=pk_* -AGENT_NAME=my-first-agent -PINLESS_HMAC_SECRET=your_hmac_secret -LOG_LEVEL=info -``` + ```bash + PIPECAT_CLOUD_API_KEY=pk_* + AGENT_NAME=my-first-agent + PINLESS_HMAC_SECRET=your_hmac_secret + LOG_LEVEL=info + ``` -5. Run the development server: +6. Run the development server: -```bash -npm run dev -``` + ```bash + npm run dev + ``` ## API Endpoints diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/env.local.example b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/env.local.example similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/env.local.example rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/env.local.example diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/package-lock.json b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/package-lock.json similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/package-lock.json rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/package-lock.json diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/package.json b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/package.json similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/package.json rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/package.json diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/pages/api/dial.js b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/pages/api/dial.js similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/pages/api/dial.js rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/pages/api/dial.js diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/pages/api/index.js b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/pages/api/index.js similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/pages/api/index.js rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/pages/api/index.js diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/vercel.js b/examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/vercel.js similarity index 100% rename from examples/deployment/pipecat-cloud-dialin-server/vercel/vercel.js rename to examples/deployment/pipecat-cloud-daily-pstn-server/nextjs-webhook-server/vercel.js diff --git a/examples/deployment/pipecat-cloud-dialin-server/vercel/lib/utils.js b/examples/deployment/pipecat-cloud-dialin-server/vercel/lib/utils.js deleted file mode 100644 index ad9b6c08a..000000000 --- a/examples/deployment/pipecat-cloud-dialin-server/vercel/lib/utils.js +++ /dev/null @@ -1,13 +0,0 @@ -// File: vercel/lib/utils.js -import pino from 'pino'; - -export const logger = pino({ - level: process.env.LOG_LEVEL || 'info', - browser: { - write: { - info: (...args) => console.log(...args), - error: (...args) => console.error(...args), - debug: (...args) => console.debug(...args), - } - } -}); \ No newline at end of file