Skip to main content

Signed customer details

CALLER_TOKEN_CONFIG lets your own backend sign the customer details of a dial (call attributes and caller name), so the app cannot change them. Fields: Mode (Observe or Enforce, default Observe) and TtlSeconds (default 600).

How a token is used

  • The app sends the token in the dial request, in the field CallerAttributesToken (in customPayload, or in Attributes).
  • Signed values replace attributes of the same name sent in clear. The call gets the attribute CallerTokenVerified = 1.
  • A token is good for one call. A retry of the same call is accepted.

Two ways to issue tokens

Both use the keys in CALLER_TOKEN_API_KEYS (a comma-separated list in the server configuration, not on the Settings page).

  1. ECV issues it. Your backend calls POST /api/CallerToken with Authorization: Bearer <key> and a body like {"attributes": {"Customer": "12345"}, "callerName": "Jane Doe"}. The answer holds token and expiresAt; the lifetime is TtlSeconds.
  2. Your backend signs it. An HS256 JWT signed with one of the keys, audience ecv-caller-attributes, claims jti (unique id), attr (object of string values), optional name, and exp no more than TtlSeconds ahead. A longer-lived token is refused.

Keys

  • Keep the keys on your backend and in the ECV configuration only, never in an app.
  • Use random keys of at least 32 bytes.
  • Rotation: add the new key next to the old one (old,new), switch the backend to the new key, wait TtlSeconds, then remove the old key.

Switching to Enforce

  1. Keep Mode on Observe. Watch the metric ecvnet.caller_token.dials by result, and DMZ warning lines containing caller token: CALLER_TOKEN_INVALID or CALLER_TOKEN_REPLAYED.
  2. Make every app get a token from your backend right before it dials.
  3. When dials without a valid token have stopped, set Mode to Enforce. Refused dials return CALLER_TOKEN_MISSING, CALLER_TOKEN_INVALID or CALLER_TOKEN_REPLAYED.

Widgets have their own mode and signing secret; this setting does not change them.