Remote Agent - Phone Login & Phone Dispo

Discussions about new features or changes in existing features

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

Remote Agent - Phone Login & Phone Dispo

Postby hellocaller » Mon Nov 18, 2013 10:34 am

Hi Guys,

I have remote agent setup working perfectly. But there is a scope of improvement in our process, for which I need advice.

Is it possible for Remote Agent to "Login" or "Enable" themself by calling a specific extension? I think that will be possible messing around the asterisk dial plans.

Now comes the tough part, our agent need to sit down in evening on a computer to dispose there call which they have attended during the day. Is there anyway using which they can use DTMF after the call to dispose it off?

Regards,
Hello Caller Team,

ViciBox5.x86_64-5.0.3.preload from .iso | Vicidial: 2.8-381c BUILD: 130925-2119 | Asterisk 1.8.23 | Single Server
hellocaller
 
Posts: 1
Joined: Mon Nov 18, 2013 10:08 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby williamconley » Sat Nov 30, 2013 9:41 pm

I can do you one better than that! LOL

Have a look at remote_dispo.php & vdremote.php both in the /vicidial/ folder.

Of course, if you want to have some fun ... we could always set the system up to either allow your DTMF tone after the call or allow the system to auto-call the agent after the call and present a menu. But that's a lot more work than allowing the agents to log in and dispo their calls. We've altered those two pages a bit for a couple clients to allow linking between them for simplified modifications.
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Remote Agent - Phone Login & Phone Dispo

Postby jmathew » Fri Feb 28, 2014 5:14 am

Is it possible for Remote Agent to "Login" or "Enable" themself by calling a specific extension? I think that will be possible messing around the asterisk dial plans.


Is there anyway using which they can use DTMF after the call to dispose it off?


Can we have a bounty on it. This is for a small call centre where we don't have desktop computers for users making calls.
jmathew
 
Posts: 50
Joined: Sat Jan 14, 2012 10:29 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby williamconley » Sat Mar 01, 2014 1:20 pm

If your users do not have desktop computers, all you have to do is set the agents up with "Remote Agent" settings. That's what "Remote Agent" is for.

If you want some form of after-the-fact dispositioning (audio, not via computer), it would be possible to have the system call back after each call (allowing the agent to terminate the connection with the prospect, and then dispo'ing as a separate act) and have the dispo's read to them and allow them to select. It would also be possible for the agent to "call in" and dispo (and less expensive, too).

I think this would take somewhere around 10 hours to build and test.
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Remote Agent - Phone Login & Phone Dispo

Postby jmathew » Mon Mar 03, 2014 12:31 am

Thank you William for your reply...... We have tried using remote agents with vicidial system. We could log in users to campaign and have the campaign dial lead sets automatically and answered calls are getting sent to enabled agents. But with "Remote Agent", the administrator who has a computer has to login and logout remote agents. When somebody has to go for a break, they then have to inform the administrator to log them out. Now, what i was looking for is to have the agents have the independency to login and logout from the desired campaign and dispose calls, just like you do with normal agents, with computers. :-)
jmathew
 
Posts: 50
Joined: Sat Jan 14, 2012 10:29 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby jmathew » Sun May 01, 2016 3:33 am

I have been using ODBC to get the Remote Agent login and logout from the phone itself, without using computers. Just by dialling extensions.

ODBC for asterisk can be installed with help at this link.

http://www.asteriskdocs.org/en/3rd_Edit ... _odbc.html

Once done, this you put in the context your phone uses. all you have to do is keep the phone, user and remote agent as same. and this trick works.

exten => 543,1,Answer()
exten => 543,n,SET(_CLI=${CALLERID(num)})
exten => 543,n,SET(ODBC_REMOTELOGIN(${CLI})=)
exten => 543,n,Playback(agent-loginok)
exten => 543,n,Hangup()




exten => 544,1,Answer()
exten => 544,n,SET(_CLI=${CALLERID(num)})
exten => 544,n,SET(ODBC_REMOTELOGOUT(${CLI})=)
exten => 544,n,Playback(agent-loggedoff)
exten => 544,n,Hangup()



In func_odbc.conf you can put the sql query as below.

[REMOTELOGIN]
dsn=asterisk
write=UPDATE vicidial_remote_agents SET status = 'ACTIVE' WHERE user_start=${ARG1} LIMIT 1;


[REMOTELOGOUT]
dsn=asterisk
write=UPDATE vicidial_remote_agents SET status = 'INACTIVE' WHERE user_start=${ARG1} LIMIT 1;
jmathew
 
Posts: 50
Joined: Sat Jan 14, 2012 10:29 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby mflorell » Sun May 01, 2016 6:16 am

Thanks for the update!
mflorell
Site Admin
 
Posts: 18384
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Remote Agent - Phone Login & Phone Dispo

Postby jmathew » Mon May 02, 2016 3:30 am

It should be the other way...

thank you Matt for the wonderful application you have provided.

the thing that remained pending is to dispose calls after the call.

Just create another table in asterisk database with the dispositions that you require the agent to dispose the calls.

I have created another table as "dipos" and put the below values in it. This i guess should match with the statuses that is available in the existing "vicidial_statuses"

srno dispo
1 A
2 SALE
3 NI
4 DC


Once done, put this in the context the phone uses;

exten => _55X,1,Answer()
exten => _55X,n,SET(_DISP=${EXTEN:2})
exten => _55X,n,SET(_CLI=${CALLERID(num)})
exten => _55X,n,SET(_DIP=${ODBC_STALIST(${DISP})})
exten => _55X,n,SET(_LEAD=${ODBC_RMDISPO(${CLI})})
exten => _55X,n,SET(ODBC_UPDISPO(${DIP},${LEAD})=)
exten => _55X,n,SET(ODBC_UPLIST(${DIP},${LEAD})=)
exten => _55X,n,Hangup()

put this in func_odbc.conf

[RMDISPO]
dsn=asterisk
read=Select lead_id From vicidial_log where user = ${ARG1} order by uniqueid desc LIMIT 1;


[STALIST]
dsn=asterisk
read=Select dispo from dipos where srno=${ARG1};

[UPDISPO]
dsn=asterisk
write=UPDATE vicidial_log SET status = '${ARG1}' WHERE lead_id=${ARG2};

[UPLIST]
dsn=asterisk
write=UPDATE vicidial_list SET status = '${ARG1}' where lead_id=${ARG2};

Once this is configured and setup properly. The agent has to dial 55[1-4] from their phones immediately from their phones when they finish their call. so, I guess this has to be real quick that they need to dispose the call before receiving another call.


For example if the last call has to be disposed as A then the agent has to dial 551, if SALE, then they have to dial 552, if NI, then 553 like wise ....

The things to remember part is to have the statuses part match exactly with "vicidial_statuses". If new statuses are created, and they have to be put in '"dipos" table and should be created from Admin>>System Statues in the vicidial web interface too.

I hope it has scope of improvement and veterans can look into and suggest.

thanks again Matt for the wonderful application.
jmathew
 
Posts: 50
Joined: Sat Jan 14, 2012 10:29 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby susam » Tue May 12, 2020 1:37 pm

Is it working in new vicidial 9.0.2 version? Actually I am looking for some solution in this lock down situation, agent login into softphone in mobile and disposition those calls after hung-up, and can remote agents do manual dial from softphone?
susam
 
Posts: 30
Joined: Wed Oct 11, 2017 9:27 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby jmathew » Thu May 04, 2023 2:34 am

Apologies for the late response.

Since, we found it quite difficult to install ODBC to suse OS. We have since then moved on to execute mysql commands through simple PHP scripts.


[default]


;add this in default context, this is for local sip users logged in through x-lite/zoiper
;for agent login dial 543
exten => 543,1,Answer()
exten => 543,n,SET(_CLI=${CALLERID(num)})
exten => 543,n,Set(STA=${CURL(http://192.168.68.114/vicidial/odbc/on_off.php?id=${CLI}&status=y)})
exten => 543,n,Playback(agent-loginok)
exten => 543,n,Hangup()

;for agent logout dial 544
exten => 544,1,Answer()
exten => 544,n,SET(_CLI=${CALLERID(num)})
exten => 544,n,Set(STA=${CURL(http://192.168.68.114/vicidial/odbc/on_off.php?id=${CLI}&status=n)})
exten => 544,n,Playback(agent-loggedoff)
exten => 544,n,Hangup()

;to know the extension number dial 1234
exten => 1234,1,Answer()
exten => 1234,2,SET(RCLI=${CALLERID(num)})
exten => 1234,3,SayAlpha(${RCLI})
exten => 1234,4,Hangup()

;to know the last number received on the extension dial 555 from same extension
exten => 555,1,Answer()
exten => 555,n,SET(_CLI=${CALLERID(num)})
exten => 555,n,Set(R1CLI=${CURL(http://192.168.68.114/vicidial/odbc/las ... r.php?id=${CLI})})
exten => 555,n,SayAlpha(${R1CLI})
exten => 555,n,Hangup()

;dispose call by dialling 52 and disposition number
exten => _52X,1,Answer()
exten => _52X,n,SET(_DISP=${EXTEN:2})
exten => _52X,n,SET(_CLI=${CALLERID(num)})
exten => _52X,n,Set(R1CLI=${CURL(http://192.168.68.114/vicidial/odbc/dispo.php?id=${CLI}&key=${DISP})})
exten => _52X,n,SayAlpha(${R1CLI})
exten => _52X,n,Hangup()

;chanspy
exten => _88,1,ChanSpy()
exten => _88,n,Hangup()


Create a folder odbc in /srv/www/htdocs/vicidial

Now create following files odbc folder,

dispo.php
last_number.php
on_off.php
wfh_on_off.php
make sure you give rwx rights to all the files. 
dispo.php

<?php
$localhost="localhost";
$user="cron";
$pwd="1234";
$database="asterisk";
$con = mysqli_connect($localhost, $user, $pwd) or die(mysqli_error());
mysqli_select_db($con,$database) or die(mysqli_error());

$id = $_REQUEST['id'];
$key = $_REQUEST['key'];

//----------------------------------------------getting last number and lead id from user id

$sel = "select phone_number, lead_id from vicidial_log where user='$id' order by end_epoch desc limit 1";
$res = mysqli_query($con, $sel);

while($row = mysqli_fetch_array($res))
{
$number = $row['phone_number'];
$lead_id = $row['lead_id'];
}

//----------------------------------------------getting dispo from from key (srno)
$sel1 = "select dispo from dispos where id='$key'";
$res1 = mysqli_query($con, $sel1);

while($row1 = mysqli_fetch_array($res1))
{
$status = $row1['dispo'];
}

//----------------------------------------------update records in vicidial_log table
$update = "UPDATE vicidial_log SET status = '$status' WHERE lead_id='$lead_id' LIMIT 1";
mysqli_query($con, $update);


//----------------------------------------------update records in vicidail_list table
$update = "UPDATE vicidial_list SET status = '$status' where lead_id='$lead_id'";
mysqli_query($con, $update);


echo $updatedstatus = $status;

?>



last_number.php

<?php
$localhost="localhost";
$user="cron";
$pwd="1234";
$database="asterisk";
$con = mysqli_connect($localhost, $user, $pwd) or die(mysqli_error());
mysqli_select_db($con,$database) or die(mysqli_error());

$id = $_REQUEST['id'];
//----------------------------------------------getting last number and lead id from user id
$sel = "select phone_number from vicidial_log where user='$id' order by end_epoch desc limit 1";
$res = mysqli_query($con, $sel);

while($row = mysqli_fetch_array($res))
{
echo $number = $row['phone_number'];
}

?>



on_off.php

<?php
$localhost="localhost";
$user="cron";
$pwd="1234";
$database="asterisk";
$con = mysqli_connect($localhost, $user, $pwd) or die(mysqli_error());
mysqli_select_db($con,$database) or die(mysqli_error());

$id = $_REQUEST['id'];
$status = $_REQUEST['status'];


if($status == y)
{
$update = "UPDATE vicidial_remote_agents SET status = 'ACTIVE' WHERE user_start='$id' LIMIT 1";
mysqli_query($con, $update);
echo "ACTIVE";
}
else
{
$update = "UPDATE vicidial_remote_agents SET status = 'INACTIVE' WHERE user_start='$id' LIMIT 1";
mysqli_query($con, $update);
echo "INACTIVE";
}

?>




wfh_on_off.php

<?php
$localhost="localhost";
$user="cron";
$pwd="1234";
$database="asterisk";
$con = mysqli_connect($localhost, $user, $pwd) or die(mysqli_error());
mysqli_select_db($con,$database) or die(mysqli_error());

$number = $_REQUEST['number'];
$status = $_REQUEST['status'];


if($status == y)
{
$update = "UPDATE vicidial_remote_agents SET status = 'ACTIVE' WHERE conf_exten='$number' LIMIT 1";
mysqli_query($con, $update);
echo "ACTIVE";
}
else
{
$update = "UPDATE vicidial_remote_agents SET status = 'INACTIVE' WHERE conf_exten='$number' LIMIT 1";
mysqli_query($con, $update);
echo "INACTIVE";
}
?>





If you face any issue configuring, let us know, we will add additional steps to it.
This is tested with ViciBox v.8.1.2, VERSION: 2.14-882a
jmathew
 
Posts: 50
Joined: Sat Jan 14, 2012 10:29 am

Re: Remote Agent - Phone Login & Phone Dispo

Postby jmathew » Thu May 04, 2023 2:35 am

[trunkinbound]



;Add this for users who wish to login from remote using their mobile numbers.

exten => 4444,1,Answer()
exten => 4444,n,Set(_CLI=${CALLERID(num):-10})
exten => 4444,n,SET(STA=${CURL(http://192.168.68.114/vicidial/odbc/wfh ... ?number=0${CLI}&status=y)})
exten => 4444,n,Playback(agent-loginok)
exten => 4444,n,Hangup()


exten => 5555,1,Answer()
exten => 5555,n,Set(_CLI=${CALLERID(num):-10})
exten => 5555,n,SET(STA=${CURL(http://192.168.68.114/vicidial/odbc/wfh ... ?number=0${CLI}&status=n)})
exten => 5555,n,Playback(agent-loggedoff)
exten => 5555,n,Hangup()
jmathew
 
Posts: 50
Joined: Sat Jan 14, 2012 10:29 am


Return to Features

Who is online

Users browsing this forum: No registered users and 62 guests