How to get call status depending on the current call event?

This is the forum used by people to post job openings or requests for quotes or consultations

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

How to get call status depending on the current call event?

Postby jcogay » Tue Feb 23, 2016 12:57 am

I am working using Vicidial API . I have to get every call status to have them displayed in my site.

VERSION: 2.12-50|BUILD: 150928-1157

I am using this API functions.

http://server/vicidial/non_agent_api.ph ... &header=NO

When I am going to Make a call -> Transfer a call -> Hangup the call, the responses I'll get are just:

PAUSED||0|LEADX|31|agent|ADMIN|9|LOGIN||||1234567
INCALL|M2230013340003695496|3695496|LEADX|32|agent|.....
CLOSER||0|LEADX|32|agent|ADMIN|9|||||1234567

Is there a way to get these status?
Ringing
Transferred
Leaved

Thanks,
jcogay
 
Posts: 1
Joined: Tue Feb 23, 2016 12:27 am

Re: How to get call status depending on the current call eve

Postby proper » Tue Feb 23, 2016 12:31 pm

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
proper
 
Posts: 50
Joined: Sun Dec 06, 2015 7:25 pm

Re: How to get call status depending on the current call eve

Postby williamconley » Tue Feb 23, 2016 4:11 pm

This information is available in the asterisk/vicidial system but is not available as yet in an api. To write these (new api functions) would likely be a couple hours each with testing.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Jobs - Requests for Consultation

Who is online

Users browsing this forum: No registered users and 27 guests