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(incustomPayload, or inAttributes). - 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).
- ECV issues it. Your backend calls
POST /api/CallerTokenwithAuthorization: Bearer <key>and a body like{"attributes": {"Customer": "12345"}, "callerName": "Jane Doe"}. The answer holdstokenandexpiresAt; the lifetime isTtlSeconds. - Your backend signs it. An HS256 JWT signed with one of the keys, audience
ecv-caller-attributes, claimsjti(unique id),attr(object of string values), optionalname, andexpno more thanTtlSecondsahead. 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, waitTtlSeconds, then remove the old key.
Switching to Enforce
- Keep Mode on Observe. Watch the metric
ecvnet.caller_token.dialsby result, and DMZ warning lines containingcaller token: CALLER_TOKEN_INVALIDorCALLER_TOKEN_REPLAYED. - Make every app get a token from your backend right before it dials.
- When dials without a valid token have stopped, set Mode to Enforce. Refused dials return
CALLER_TOKEN_MISSING,CALLER_TOKEN_INVALIDorCALLER_TOKEN_REPLAYED.
Widgets have their own mode and signing secret; this setting does not change them.
No comments to display
No comments to display