From d89df87a6c5d103667c5e0751078ec6bbfbe292b Mon Sep 17 00:00:00 2001 From: Garfield Date: Sat, 16 May 2026 12:31:09 -0400 Subject: [PATCH] feat: Twilio voice webhook to reject calls on WhatsApp number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hermes-k8s.yaml | 2 +- src/index.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hermes-k8s.yaml b/hermes-k8s.yaml index 1a610c1..ce68903 100644 --- a/hermes-k8s.yaml +++ b/hermes-k8s.yaml @@ -22,7 +22,7 @@ spec: fsGroup: 1000 containers: - name: hermes-mcp - image: localhost:32000/hermes-mcp@sha256:0bd3355cc4b5a3727e56cd62364127deb8801d41f4e3b9dc48e9051e11f52b8f + image: localhost:32000/hermes-mcp@sha256:e7ac49a82ec89af0d362de644a435ff717d22b1f177b16b82b375727d89bc2d1 imagePullPolicy: Always securityContext: allowPrivilegeEscalation: false diff --git a/src/index.ts b/src/index.ts index 2c51c00..8e5f253 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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( + '' + + 'This number does not accept voice calls. Please visit squaremcp.com for support.' + ); +}); + // ── Auth endpoints ────────────────────────────────────────────── app.post('/api/auth/signup', express.json(), async (req, res) => {