Page 1 of 1

Implement direct feature call from my website

PostPosted: Mon Jun 10, 2013 4:07 am
by sachink
I am just starting with vicidial. I need to implement direct call feature from my apps.

Let me explain the flow to better understand what I need to do. user would be able to login in vicidial via a webpage of my app. then can call on any number by entering number.

Is there any doc or wiki available to implement this feature. Guidance in simple steps would also be appreciating.

Thanks in advance :)

Re: Implement direct feature call from my website

PostPosted: Mon Jun 10, 2013 7:39 am
by mflorell
The agent API is available here:
http://www.vicidial.org/docs/AGENT_API.txt

Re: Implement direct feature call from my website

PostPosted: Wed Jun 19, 2013 8:36 am
by sachink
I checked the above api doc and didn't find any call to logged in the user through api. It does have call for "Logout" but not for the "log in "

Also How do i find the value for "agent_user" that need to pass in api ?

Re: Implement direct feature call from my website

PostPosted: Mon Jun 24, 2013 4:25 am
by sachink
Is there a way to check the status of agent through API that he/she is logged-in or not?

Re: Implement direct feature call from my website

PostPosted: Mon Jun 24, 2013 6:42 am
by mflorell
We added that to the NON-AGENT API back in April 2013. It's in the most recent svn/trunk codebase.

--------------------------------------------------------------------------------
agent_status - real-time status of one agent user

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)
agent_user - 2-20 characters, use only for one agent status

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=YES

Example responses:
ERROR: agent_status USER DOES NOT HAVE PERMISSION TO GET AGENT INFO - 6666|0
ERROR: agent_status INVALID SEARCH PARAMETERS - 6666||
ERROR: agent_status AGENT NOT FOUND - 6666||
ERROR: agent_status AGENT NOT LOGGED IN - 6666||

A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following format:
status,call_id,lead_id,campaign_id,calls_today,full_name,user_group,user_level
INCALL,M4050908070000012345,12345,TESTCAMP,1,Test Agent,AGENTS,3