Plivo Configuration

Webhook URLs โ€” paste these into Plivo Dashboard

Plivo Dashboard Setup:
1. Go to Plivo Console โ†’ Phone Numbers โ†’ your number โ†’ Configure
2. Under Call: set Answer URL = Voice Webhook above, method = POST
3. Under Message: set Message URL = SMS Webhook above, method = POST
4. Save, then upload your restaurant menu in the Menus tab

Speech Recognition (ASR)

โœ… No Deepgram or Google ASR key needed.

Voice calls use Plivo's built-in <GetInput inputType="speech"> verb, which runs Google Speech-to-Text internally. Plivo returns the transcribed text as SpeechResult in the POST to your gather webhook. Billed as Plivo Speech Recognition โ€” check your Plivo plan for included minutes.

SMS uses the caller's own text directly โ€” no ASR needed.

Claude (Anthropic API) handles recommendation generation only, using the menu text and the caller's question. Set ANTHROPIC_API_KEY in /home/azureuser/work/recsys/.env.

Assigned Plivo Number

+16464408480

After editing .env, run: sudo systemctl restart recsys

.env Variables Required

VariableWhere to get it
ANTHROPIC_API_KEYconsole.anthropic.com โ†’ API Keys
PLIVO_AUTH_IDPlivo Console โ†’ Overview
PLIVO_AUTH_TOKENPlivo Console โ†’ Overview
PLIVO_NUMBERPlivo Console โ†’ Phone Numbers (E.164 format, e.g. +14155551234)

Payment Wallets

After a phone order completes, the caller is sent an SMS with a checkout link. The checkout page renders PayPal Smart Buttons (PayPal account, Pay Later, and an inline Card field).
VariableWhere to get it
PAYPAL_CLIENT_IDdeveloper.paypal.com โ†’ Apps & Credentials โ†’ your app โ†’ Client ID
PAYPAL_SECRETdeveloper.paypal.com โ†’ Apps & Credentials โ†’ your app โ†’ Secret
PAYPAL_MODEsandbox for testing, live for production
PUBLIC_BASE_URLOrigin used in SMS links โ€” default https://support.hostbuddy.io/recsys

Sandbox setup: visit developer.paypal.com, create a Merchant app, copy the Client ID and Secret into .env, then sudo systemctl restart recsys.