BestDealOn

Handbook › Callbots

Caller recognition

Caller ID can be spoofed. Every recognition path changes the greeting only. None of them grants access or skips a check (src/xai.js:75-76,93).

Caller ID (live)

  • The caller's number is read from the SIP headers, in this order: P-Asserted-Identity, then From, then Remote-Party-ID.
  • If the caller hides their number (Privacy: id) or it is anonymous, there is no caller ID (src/xai.js:37-55).
  • The bot only ever says the last 4 digits and never asks for the number (src/xai.js:63-65).

Known callers (live)

  • Set with tenant.known_callers: { "+E164": {name, role?, greeting?} }. It is validated at src/tenants.js:23-31 [bdo] and looked up at src/xai.js:151-156 [bdo].
  • The bot greets the caller by name.
  • If the caller is the transfer target, the bot won't offer to transfer them to themselves.
  • If a known caller's role mentions owner or admin, they also count as an owner for the briefing (src/owner/config.js:20).

Returning subscribers (live)

  • If the caller's number matches a newsletter or subscriber entry, the bot says "Welcome back, <first name>" (returningCallerFor, src/xai.js:161 [bdo]).
  • Turn it off with returning_caller_greeting: false.
  • [bdo] returning_caller_include_unconfirmed also matches entries that were never confirmed.

Best Deal On account lookup ([bdo], commit 0d93d7d)

  • Applies only to tenant bestdealon with bdo_caller_lookup: true.
  • It sends a signed lookup to bestdealon.app and waits up to 1.5 s (bdoSiteProfile, src/xai.js:172 [bdo]).
  • The lookup returns only a name, booleans, and an email label. It never returns an address (src/xai.js:165-170 [bdo]).
  • With callback_offer: true, the bot asks "call you back or email you?". A callback is taken as a message for the team (src/xai.js:100-104 [bdo]).
  • Deployed: 0d93d7d is part of merge ee5b1f2, live on callbots-bdo since 10:03 PM EST Nov 3 (Render deploy dep-dbla0lajnfac73fblnlg). Tenant flag bdo_caller_lookup is on; the site side CALLER_LOOKUP is on.
  • Caller ID is never verification: the lookup only personalises the greeting.
Diagram 1 (source below)
Diagram source (Mermaid)
flowchart TD
  A[Incoming call] --> B{Caller ID present?}
  B -- no --> G[Generic greeting]
  B -- yes --> C{In known_callers?}
  C -- yes --> K[Hi name]
  C -- no --> D{Returning subscriber<br/>or BDO account match?}
  D -- yes --> W[Welcome back + optional callback/email offer]
  D -- no --> G