Rename directories

This commit is contained in:
Mark Backman
2025-04-07 10:44:41 -04:00
parent fc4c1e4110
commit 9e0a57a6de
14 changed files with 39 additions and 46 deletions

View File

@@ -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 In addition you can use `/api/dial` to trigger dial-out, and
eventually, call-transfers. 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 A FastAPI implementation that handles PSTN (Public Switched Telephone
Network) and SIP (Session Initiation Protocol) calls using the Daily API. 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 A Next.js API implementation designed for deployment on Vercel's
serverless platform. serverless platform.
@@ -24,16 +24,16 @@ Both implementations provide:
## Choosing an Implementation ## Choosing an Implementation
- Use the **Simple Python Server** if you: - Use the **FastAPI Server** if you:
- Need a standalone server - Need a standalone server
- Prefer Python and FastAPI - Prefer Python and FastAPI
- Want to deploy to traditional hosting platforms - 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 - Want serverless deployment
- Prefer JavaScript/TypeScript - Prefer JavaScript/TypeScript
- Already use Vercel for other projects - Already use Next.js and Vercel for other projects
- Need quick scaling and zero maintenance - Need quick scaling and zero maintenance
## Prerequisites ## Prerequisites

View File

@@ -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. 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 1. Clone the repository
2. Install dependencies: 2. Navigate to the `fastapi-webhook-server` directory:
```bash
cd fastapi-webhook-server
```
3. Install dependencies:
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt
``` ```
3. Copy `env.example` to `.env`: 4. Copy `env.example` to `.env`:
```bash ```bash
cp env.example .env cp env.example .env
``` ```
4. Update `.env` with your credentials: 5. Update `.env` with your credentials:
- `AGENT_NAME`: Your Daily agent name - `AGENT_NAME`: Your Daily agent name
- `PIPECAT_CLOUD_API_KEY`: Your Daily API key - `PIPECAT_CLOUD_API_KEY`: Your Daily API key

View File

@@ -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 ## Features
- API endpoint for handling Daily Pipecat requests - API endpoint for handling Daily PSTN/SIP Pipecat requests
- HMAC signature validation - HMAC signature validation
- Structured logging with Pino - Structured logging with Pino
- Support for dial-in and dial-out settings - 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 1. Clone the repository
2. Navigate to the `vercel` directory: 2. Navigate to the `nextjs-webhook-server` directory:
```bash ```bash
cd vercel cd nextjs-webhook-server
``` ```
3. Install dependencies: 3. Install dependencies:
```bash ```bash
npm install npm install
``` ```
4. Create `.env.local` file with your credentials: 4. Create `.env.local` file with your credentials:
```bash ```bash
cp env.local.example .env.local cp env.local.example .env.local
``` ```
Add your secrets: 5. Update your `.env` with your secrets:
```bash ```bash
PIPECAT_CLOUD_API_KEY=pk_* PIPECAT_CLOUD_API_KEY=pk_*
AGENT_NAME=my-first-agent AGENT_NAME=my-first-agent
PINLESS_HMAC_SECRET=your_hmac_secret PINLESS_HMAC_SECRET=your_hmac_secret
LOG_LEVEL=info LOG_LEVEL=info
``` ```
5. Run the development server: 6. Run the development server:
```bash ```bash
npm run dev npm run dev
``` ```
## API Endpoints ## API Endpoints

View File

@@ -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),
}
}
});