Page 1 of 1

Check if agent is waiting for manual call

PostPosted: Tue Jun 28, 2011 4:17 am
by ANisus
Single question:

I want to be able to see if agent is currently waiting for a manual call to be transfered.

I have the user and therefor all the information in the vicidial_live_agents table.

I know that vicidial_live_agents
status = 'INCALL'
comments = 'MANUAL'

But can I somehow check with the callerid in the vicidial_manager table to see if the agent is actually just waiting for call?

Mvh,
Samuel Jirénius

PostPosted: Tue Jun 28, 2011 6:47 am
by ANisus
I'll add another similar question:

How to check in the database if a lead has hung up the phone while user is INCALL. Will this be registered in vicidial_manager?

PostPosted: Tue Jun 28, 2011 7:08 am
by mflorell
The manDiaLlookCaLL function in vdc_db_query.php handles the monitoring of a manually dialed channel.

The conf_exten_check.php file has the code that detects a customer hangup while INCALL, this is also known as the DEAD state, and it is currently logged.

PostPosted: Tue Jun 28, 2011 7:41 am
by ANisus
Thanks for the reply Matt!

Yes, currently manDiaLlookCaLL monitors it when the client requests it.

But in order to reduce the number of server requests, I'd like to move this controll over to conf_exten_check.php (or the equivalance), which already is called every second.

In conf_exten_check.php I'd like to check the user's current state by quering the database instead of relying on information about user state passed from the client.

In manDiaLlookCaLL, a connection is detected by vicidial_manager status being 'UPDATED' or 'DEAD'. Would it be safe to assume that any other status means that the user is not connected yet?
Or better yet! (Just found it):
A better place to look is perhaps vicidial_auto_calls status..?

I feel my knowledge about vicidial_manager and vicidial_auto_calls is very limited as they are modified by the dialer scripts, an area which I haven't explored yet.

Mvh,
Samuel Jirénius

EDIT: Added my discovery of vicidial_auto_calls

PostPosted: Tue Jun 28, 2011 8:33 am
by mflorell
You will have to just try it. The code works as is in all cases, and has worked for years. So trying something different you will just have to see what cases will work and what will not.