r/Asterisk • • Oct 24 '26

I built a free, self-hosted call screening plugin for Asterisk

GitHub: https://github.com/CallerAPI/Falcon
Adapter docs: https://github.com/CallerAPI/Falcon/blob/main/adapters/README.md

I'm Dmitry, founder of CallerAPI, and I built this with my small team. The code is Apache 2.0 and the engine runs without an account on our platform, just to clarify

Falcon is a lightweight screening engine that runs next to Asterisk. Asterisk hands it each inbound INVITE over AGI (or ARI). Falcon reads the SIP headers, verifies STIR/SHAKEN when there is an Identity header, names the provider behind the source IP, applies your own allow and deny lists, scores the request, and returns allow, flag, challenge or reject with the reasons. Asterisk keeps signaling and media. Falcon is not in the call path

The dialplan side:

[from-trunk-falcon]
exten => _[+0-9]X.,1,NoOp(Falcon screen ${EXTEN})
same => n,AGI(falcon.agi)
same => n,GotoIf({FALCON_ACTION}"="reject"]?drop)
same => n,GotoIf({FALCON_ACTION}"="challenge"]?drop)
same => n,Set(PJSIP_HEADER(add,X-Falcon-Score)=${FALCON_SCORE})
same => n,Goto(your-inbound-context,${EXTEN},1)
same => n(drop),Hangup(21)

Point the trunk's inbound context at it. The AGI sets FALCON_ACTION, FALCON_SCORE and FALCON_REASONS, so you can do whatever you like with them instead of hanging up… send flagged calls to voicemail, tag them, route them to a queue, etc.

I’m posting it here because I want real feedback from professionals and people who experience the pain of robocalls on their infrastructure

Let me know what you think :)

14 Upvotes

6 comments sorted by

2

u/expert_chipmunk9409 Oct 24 '26

I just added a recording to one of my lines asking telemarketers to hang up (several seconds pause before connecting the call). Only a call or two here and there since then, but otherwise works pretty well.

1

u/DimonDev Oct 24 '26

Yep, it’s simple and effective :)
But usually for a bigger company it would be a different scenario, at a certain volume of calls you need proper observability

1

u/voxai2025 Oct 25 '26

do you have a version working with freeswitch?

1

u/DimonDev Oct 25 '26

Yes! There is an adapter for FreeSWITCH as well :)

1

u/DimonDev Oct 25 '26

Here’s the FreeSWITCH adapter, a Lua script you call from the dialplan https://github.com/CallerAPI/Falcon/blob/main/adapters/README.md. I'm posting a FreeSWITCH walkthrough in r/freeswitch soon

1

u/metalhheaddude22 Oct 25 '26

Away heathen!