Using dynamic routes to test for a condition, then route call to normal inbound routes

Inbound calls passed to our PBX that are tagged as potential SPAM by our upstream provider/gateway have their caller ID names pre-pended with “SPAM”

I’d like to leverage dynamic routes to test if the caller ID name starts with SPAM, if it does, we want to drop the call (eventually an IVR to confirm if a human is on the line). If the caller ID name doesnt start with SPAM, we want the call to progress normally.

Is this possible?

Yes. Using an asterisk expression of ${CALLERID(name):0,4} will isolate the first four characters of the CID name string. You can then create an alternate destination to send calls when it equals spam or SPAM or whatever. Send all other calls to the default dynroutes destination.

Thank you - I was struggling with the expression to obtain the first 4 chars.

Is it possible to check for the CID name match, before the call hits inbound routes?
i.e. I want all calls to checked for a match, if the CID != SPAM, I want the call to progress through inbound routes as it normally would.

There are spam interception features in superfecta, check the trunk provided module.

We’re already performing logic upstream that prepends caller ID names with “SPAM”

I simply want to perform an action if calls have a CID name of SPAM, otherwise call should progress as normally.

Is superfecta still the best method to do this, or would a custom context make more sense?

A user defined context for the trunk to use is the more efficient way.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.