feat: Twilio voice webhook to reject calls on WhatsApp number
POST /webhook/twilio/voice returns TwiML that says the number doesn't accept voice calls and hangs up — needed for Twilio number config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1253,6 +1253,14 @@ app.post('/webhook/whatsapp', express.raw({ type: '*/*' }), async (req, res) =>
|
||||
}
|
||||
});
|
||||
|
||||
// ── Twilio voice webhook — reject calls on the WhatsApp number ──
|
||||
app.post('/webhook/twilio/voice', (_req, res) => {
|
||||
res.type('text/xml').send(
|
||||
'<?xml version="1.0" encoding="UTF-8"?>' +
|
||||
'<Response><Say>This number does not accept voice calls. Please visit squaremcp.com for support.</Say><Hangup/></Response>'
|
||||
);
|
||||
});
|
||||
|
||||
// ── Auth endpoints ──────────────────────────────────────────────
|
||||
|
||||
app.post('/api/auth/signup', express.json(), async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user