The per-request context for a USSD interaction: who is dialing in (uid), which
group/session the request belongs to (gid), what they typed (input), and any
extra values the caller wants states/actions to see (bag).
Summary
Functions
Reads a value out of the bag set via with_bag/2, or nil if key isn't present.
The identifier shared across a caller's redials (typically their phone number).
What the caller typed for this request. An empty string on the very first request of a session.
Builds a new context. Raises if uid or gid is empty, mirroring the guarantees
callers need: every session must be uniquely and group-addressable.
The unique identifier for this specific dial-in (changes on every redial).
Attaches arbitrary extra values (e.g. the phone's network, a request header) that
render/1, Ussd.Action.execute/1 and transition/back/paginate callbacks
can read back via get/2. Replaces any bag set previously - it isn't merged.
Types
Functions
Reads a value out of the bag set via with_bag/2, or nil if key isn't present.
The identifier shared across a caller's redials (typically their phone number).
What the caller typed for this request. An empty string on the very first request of a session.
Builds a new context. Raises if uid or gid is empty, mirroring the guarantees
callers need: every session must be uniquely and group-addressable.
The unique identifier for this specific dial-in (changes on every redial).
Attaches arbitrary extra values (e.g. the phone's network, a request header) that
render/1, Ussd.Action.execute/1 and transition/back/paginate callbacks
can read back via get/2. Replaces any bag set previously - it isn't merged.