Docs / CallTrackingMetrics setup · 9 min
CallTrackingMetrics setup
Screen callers in-flight with a CTM Lambda, or tag and report with webhooks.
What the integration can do
CallTrackingMetrics is one of the few trackers that can gate routing on a live verdict. A CTM Lambda runs Node.js 18 with a 15 second budget on each inbound call, can call external APIs, and decides where the call routes. That is a perfect fit: CallerSift answers in milliseconds, the Lambda reads the verdict, and a blocked caller never reaches your buyer.
Plain CTM webhooks are notification-only (CTM does not route on their responses), so use them for tagging and reporting, not blocking.
Lambdas are available on CTM's Sales Engage, Enterprise, and Connect plans. Check your plan before starting.
Your lookup URL
Every workspace gets one lookup URL, shown on your dashboard home page. POST the caller number to it and the JSON response answers verdict: allow or block.
POSThttps://api.callersift.com/v1/your-workspace
Option A: in-call screening with a Lambda (recommended)
CTM Lambda
const res = await fetch("https://api.callersift.com/v1/your-workspace", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": process.env.CALLERSIFT_KEY,
},
body: JSON.stringify({ caller_number: event.activity.caller_number }),
});
const { verdict } = await res.json().catch(() => ({ verdict: "allow" }));
ctm.update({ tag_list: ["callersift-" + verdict] });
if (verdict === "block") {
// Dead-end a blocked caller: a voicemail box id (VMIxxxx) or a
// Voice Menu whose action is Hang Up.
context.done(null, { route: "VMIxxxx" });
} else {
// Your buyer or receiving number.
context.done(null, { route: "+18005550100" });
}- In CTM, go to Flows, then Lambdas, and create a new Lambda.
- Add an environment variable named CALLERSIFT_KEY holding your screening API key (use +Add Variable in the editor).
- Paste the code below and replace your-workspace, the allow route, and the block route with your own values.
- Point a tracking number at the Lambda: set the number's Dial Route to the Lambda, or reach it from a Voice Menu Lambda Action or a Smart Router.
- Use the editor's test tool against a recent call to confirm the verdict tag lands on the activity.
The catch() default keeps CTM fail-open too: if the lookup cannot run for any reason, the caller routes normally. Never invert that.
Option B: tag and report with a webhook
- Go to Settings, then Integrations, then Webhooks, and create a webhook.
- Pick the trigger phase for inbound call received (fires at call start).
- Set the URL to your lookup URL, method POST, and a custom body of {"caller_number":"{{caller_number}}","api_key":"fck_your_key"}.
- Every call now lands in your CallerSift lookup log with a verdict, ready for export and review. CTM does not act on the response; pair this with Triggers and the Add to Blocked Numbers action for numbers you confirm as fraud.
Official CallTrackingMetrics docs
- Lambda functions: runtime, limits, and call routing from code.
- Webhooks: trigger phases, tokens like {{caller_number}}, custom bodies, auth headers.
- Triggers: conditions on caller number and actions like Add to Blocked Numbers.
- Smart Routing: rule-based routes including Hang up.
- Voice Menus (IVR): menus with Lambda Action and Hang Up.