Jcogay
Your API call is for agent_status, this means you are getting information about what agent account is doing and not call information.
You need to use callid_info API call to get information about specific call. However it will only provide you with general lead info not current system call status. But you can assume that if agent is showing as in given call, it is likely still ongoing.
Most you can get via this API is this - first grab agent info using agent_status call, then if agent is in a call, grab it's call ID and use callif_info call to grab call details.
For this functionality I would work with database directly, and create simple custom API calls for external application to request information it needs. If you decide to go this route, make sure your developer implements caching as these requests can get pretty intensive, and significantly load DB.
Here are API instructions for callid_info
- Code: Select all
--------------------------------------------------------------------------------
callid_info - information about a call based upon the caller_code or call ID
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)
call_id - 16-40 characters
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
detail - if set to YES, more call info will be output. Default is NO, only callid and customer talk time will be output
Example URL strings for API calls:
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=callid_info&call_id=M4050908070000012345&stage=csv&header=YES
Example responses:
ERROR: callid_info USER DOES NOT HAVE PERMISSION TO GET CALL INFO - 6666|0
ERROR: callid_info INVALID SEARCH PARAMETERS - 6666||
ERROR: callid_info CALL NOT FOUND - 6666||
ERROR: callid_info CALL LOG NOT FOUND - 6666||
A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following format:
call_id,custtime
M4050908070000012345,725
Setting "detail=YES" will result in the following output:
call_id,custtime,call_date,campaign_id,list_id,status,user,phone
M4050908070000012345,725,2014-01-24 09:26:09,TESTCAMP,999,A,6666,3125551212