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:
@@ -22,7 +22,7 @@ spec:
|
|||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
containers:
|
containers:
|
||||||
- name: hermes-mcp
|
- name: hermes-mcp
|
||||||
image: localhost:32000/hermes-mcp@sha256:0bd3355cc4b5a3727e56cd62364127deb8801d41f4e3b9dc48e9051e11f52b8f
|
image: localhost:32000/hermes-mcp@sha256:e7ac49a82ec89af0d362de644a435ff717d22b1f177b16b82b375727d89bc2d1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
|
|||||||
@@ -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 ──────────────────────────────────────────────
|
// ── Auth endpoints ──────────────────────────────────────────────
|
||||||
|
|
||||||
app.post('/api/auth/signup', express.json(), async (req, res) => {
|
app.post('/api/auth/signup', express.json(), async (req, res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user