Galaxy Communicator Documentation:

Managing Session Information

License / Documentation home / Help and feedback

What is a session?

The Galaxy Communicator infrastructure is designed to support multiple simultaneous sessions. By session we mean an individual conversation with a Communicator system, such as the sequence of exchanges between the time the system answers the phone and greets an individual user and the time the system or user hangs up. A single Communicator system might support a large number of phone lines, and thus a large number of simultaneous sessions.

Although some servers connected to the Hub might be dedicated to a particular session (such as when they connect using -contact_hub and -session_id), most servers support multiple sessions through the same connection to the Hub. So, for instance, a single parser may be responsible for parsing all the user utterance strings for all the sessions currently connected to the Hub.

Starting and ending sessions

The Hub will start a session whenever it receives a session ID it does not recognize. If logging is enabled in the Hub program file, the Hub will open a log for that session as well. The Builtin server function new_session (somewhat misnamed, at this point) can be called to reset the session's utterance counter and open a new log. Reusing session IDs in this way is not recommended, however, it is supported for convenience. The most common case of reuse is when no session ID is actually declared, and the Hub uses the Default session ID as a result.

If new_session opened a new log every time it was called, any program which calls it would end up writing a very short log which covered the time from when the session was created (essentially, when the Hub first saw the session ID) to when new_session was called. Since this behavior would be unavoidable when new_session is used correctly, new_session has been implemented not to open a new log the first time it is called on a given session.

If you want to end a session explicitly, you can call the Builtin server function end_session.

If you want to control the memory state of a given session, you can do that from the server as well.

Administrative functions

These are the functions the infrastructure uses to manage session information in call environments. You will seldom need to use these functions directly.

void GalSS_EnvUpdateSessionID(GalSS_Environment *env, const char *session_id)
Sets the session_id as the session for this environment. The session_id is copied. This function can safely be called repeatedly on the same call environment to change the session context.

char *GalSS_EnvGetSessionID(GalSS_Environment *env)
Returns the session_id  for this environment. The session_id is not copied. It may be NULL.

License / Documentation home / Help and feedback
Last updated July 29, 2002