I just added the "session_id" field to the existing "agent_status" Non-Agent API function.
I also went ahead and added a new "logged_in_agents" Non-Agent API function:
--------------------------------------------------------------------------------
logged_in_agents - list of agents that are logged in to the system
NOTE: api user for this function must have user_level set to 7 or higher and "view reports" enabled
REQUIRED FIELDS-
source - description of what originated the API call (maximum 20 characters)
OPTIONAL FIELDS-
campaigns - pipe-delimited list of campaigns to get status information for "TESTCAMP|INBOUND", default is all campaigns shown
user_groups - pipe-delimited list of user groups to get status information for "ADMIN|AGENTS", default is all user groups shown
show_sub_status - show agent sub-status and pause_code, requires log lookup, (YES|NO) default is NO
SETTINGS FIELDS-
stage - the format of the exported data: csv, tab, pipe(default)
header - include a header(YES) or not(NO). This is optional, default is not to include a header
Example URL strings for API calls:
http://server/vicidial/non_agent_api.ph ... header=YESExample responses:
ERROR: logged_in_agents USER DOES NOT HAVE PERMISSION TO GET AGENT INFO - 6666|0
ERROR: logged_in_agents NO LOGGED IN AGENTS
A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following format:
user|campaign_id|session_id|status|lead_id|callerid|calls_today|full_name|user_group|user_level
6666|TESTCAMP|8600051|PAUSED|1079409||1|Admin|ADMIN|9
user,campaign_id,session_id,status,lead_id,callerid,calls_today,full_name,user_group,user_level,pause_code,sub_status
6666,TESTCAMP,8600051,INCALL,1079409,M2260919190001079409,1,Admin,ADMIN,9,LOGIN,DEAD
4545,TESTCAMP,8600052,PAUSED,0,,0,4545,MIKESGROUP,8,LOGIN,
NOTE: real_time_sub_status field can consist of: DEAD, DISPO, 3-WAY, PARK, RING, PREVIEW or it can be empty