Generally re-usable function to get environment base-domain.
Have queueLogin, queueLogout, callNumber, and callUser return a deferred to communicate success or failure to the caller, like older versions of the library.