feat: add Edge Robo-Call Screener example (TypeScript Stateful Actor) - #70
Open
sonamg-droid wants to merge 1 commit into
Open
feat: add Edge Robo-Call Screener example (TypeScript Stateful Actor)#70sonamg-droid wants to merge 1 commit into
sonamg-droid wants to merge 1 commit into
Conversation
Inbound call screener deployed on Telnyx Edge Compute Stateful Actors. Answers calls, asks a screening question via TTS, gathers speech via STT, then AI Inference judges if it's a robocall. Hangs up on robocalls (and auto-blocklists the caller), forwards legitimate callers to your phone. Per-number actor instance with durable storage for blocklist, call history, and stats. No ngrok needed — runs at *.telnyxcompute.com. Files: src/index.ts (fetch handler + webhook routing), src/callScreener.ts (StatefulActor), telnyx.toml (actor binding), package.json, tsconfig.json. Uses Call Control (answer, gather, hangup, transfer, reject) + AI Inference. Also updates scripts/verify.py to accept telnyx.toml as a valid code file for edge examples (alongside existing func.toml support).
sonamg-droid
requested review from
harpreetTelnyx,
ireither and
somemothersson
as code owners
July 28, 2026 00:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New example: Edge Robo-Call Screener — inbound call screener on Telnyx Edge Compute Stateful Actors. Answers calls, asks a screening question, AI judges if it's a robocall, hangs up on robocalls and forwards legitimate callers.
Why
First TypeScript example in the repo using Edge Compute Stateful Actors — demonstrates the stateful actor pattern with durable per-number storage. No ngrok needed; runs at
*.telnyxcompute.com. Solves a real problem (robocalls) using Voice API + AI Inference together.What's included
edge-robo-call-screener-typescript/— TypeScript project withsrc/index.ts(fetch handler),src/callScreener.ts(StatefulActor),telnyx.toml(actor binding),package.json,tsconfig.json, README/API.md/GUIDE.md,.env.example@telnyx/edge-runtime@0.8.0— includes StatefulActor exportsHow it works
call.answeredwebhook to Edgecall.gather.endedwebhookStateful Actor
CallScreenerinstance per screened phone numberEndpoints
POST /webhooks/voice— Telnyx voice webhook targetGET /stats— cumulative screening statsGET /calls— recent call recordsPOST /blocklist/clear— clear the blocklistGET /health/{liveness,readiness}— health checksInfrastructure changes
scripts/verify.pyto accepttelnyx.tomlas a valid code file for edge examples (alongside existingfunc.tomlsupport). This is needed for stateful actor projects which usetelnyx.tomlinstead offunc.toml.Registry
scripts/examples_mapping.yaml(product: voice, language: nodejs, framework: edge)llms.txtandcatalog.jsonviascripts/gen_llms_txt.pyVerification
npx tsc --noEmit→ 0 errors (with@telnyx/edge-runtime@0.8.0)scripts/verify.py --only edge-robo-call-screener-typescript→ 0 errorsscripts/gen_llms_txt.py --check→ PASS