# Version 1.9 Telnyx Migration Notes

This version switches the live SMS/voice provider from Twilio-style handlers to Telnyx.

## New/updated environment variables

Use these in cPanel > Setup Node.js App > Environment Variables:

SMS_PROVIDER=telnyx
TELNYX_API_KEY=your_telnyx_api_key
TELNYX_PHONE_NUMBER=+1your_telnyx_number
TELNYX_VALIDATE_SIGNATURE=false

Keep these existing values:

BASE_URL=https://demo.recovermissedcall.com
BUSINESS_PHONE=+1number_to_forward_calls_to
OWNER_PHONE=+1owner_alert_number
OPENAI_API_KEY=your_openai_key
ADMIN_PASSWORD=your_admin_password

## Telnyx Messaging Profile webhook

Set your Telnyx Messaging Profile inbound webhook to:

https://demo.recovermissedcall.com/sms/incoming

Method: POST

## Telnyx Voice / Call Control webhook

Set your Telnyx Call Control Application webhook to:

https://demo.recovermissedcall.com/voice/incoming

Method: POST

## Important

Switching from Twilio to Telnyx does not bypass US carrier compliance.
For US local-number business texting, you still need 10DLC brand/campaign registration or messages may be blocked or filtered.

## What changed

- Added `src/telnyxClient.js`
- Replaced Twilio SMS webhook parsing with Telnyx `message.received` webhook parsing
- Replaced Twilio SMS sending with Telnyx `/v2/messages`
- Replaced TwiML voice response with Telnyx Call Control commands
- Kept `/voice/after-dial` as a harmless compatibility endpoint
