rtc_session
rtc_session
Decorator that registers the session entrypoint function. The entrypoint receives
a JobContext and is
responsible for creating an
Agent,
AgentSession, and
calling session.start().
Parameters
func
The entrypoint function. When used as @server.rtc_session() with parentheses,
func is None and the decorator returns a wrapper. When used as
@server.rtc_session without parentheses, the function is passed directly.
agent_name
A name for the agent. Stored on the server for identification.
type
Session type. Only "room" is supported on SignalWire. Other values are accepted
for API compatibility but log an informational message.
on_request
Callback for incoming requests. Accepted for API compatibility.
on_session_end
Callback for session end. Accepted for API compatibility.
Returns
Callable — The decorated function, unmodified.