Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flexydial
/
hdfc-beu-v2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e261c73c
authored
2019-08-27 14:50:09 +0000
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added inbound call logic when follow up tagged by same agent
1 parent
3d274f1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
34 deletions
application/app/Http/Controllers/DialerController.php
application/app/Jobs/KHRMSLib.php
application/app/Jobs/KPAMIListen.php
application/app/Http/Controllers/DialerController.php
View file @
e261c73
...
...
@@ -192,6 +192,8 @@ class DialerController extends Controller {
$wakka
=
new
KHRMSLib
();
$roclientstr
=
array
();
$authId
=
Auth
::
user
()
->
id
;
$oclientlst
=
$wakka
->
clientsReadAccess
();
if
(
!
empty
(
$oclientlst
))
foreach
(
$oclientlst
as
$tclnt
)
if
(
$tclnt
!=
""
){
$roclientstr
[]
=
"'
$tclnt
'"
;}
if
(
!
empty
(
$roclientstr
))
$roclientstr
=
"and client in ("
.
implode
(
","
,
$roclientstr
)
.
")"
;
else
$roclientstr
=
""
;
...
...
@@ -365,7 +367,7 @@ class DialerController extends Controller {
if
(
$dialline
)
{
$dialline
->
user_id
=
Auth
::
user
()
->
i
d
;
$dialline
->
user_id
=
$authI
d
;
$dialline
->
number
=
$callnumber
;
$dialline
->
status
=
"Blocked"
;
$dialline
->
regexstr
=
$client
;
...
...
@@ -405,8 +407,10 @@ class DialerController extends Controller {
if
(
$users
[
0
][
'id'
]
>
0
){
if
(
$client
!=
''
)
$records
=
'records_'
.
$client
;
else
$records
=
'records'
;
DB
::
table
(
$records
)
->
where
(
'id'
,
$users
[
0
][
'id'
])
->
update
([
'filter_condition'
=>
'3'
,
'usr_id'
=>
Auth
::
user
()
->
id
]);
DB
::
table
(
'records'
)
->
where
(
'id'
,
$users
[
0
][
'id'
])
->
update
([
'usr_id'
=>
Auth
::
user
()
->
id
]);
DB
::
table
(
$records
)
->
where
(
'id'
,
$users
[
0
][
'id'
])
->
update
([
'filter_condition'
=>
'3'
,
'usr_id'
=>
$authId
]);
DB
::
table
(
'records'
)
->
where
(
'id'
,
$users
[
0
][
'id'
])
->
update
([
'usr_id'
=>
$authId
]);
$ppldata
[
'usr_id'
]
=
$authId
;
}
//start actual calls
$ppldata
[
'dialer_lastcall'
]
=
date
(
"Y-m-d H:i:s"
);
...
...
application/app/Jobs/KHRMSLib.php
View file @
e261c73
...
...
@@ -13,7 +13,7 @@ class KHRMSLib
public
$dblink
;
public
$user
=
NULL
;
public
$EMPCacheCols
=
"mobile,emailid,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,client,status,clientinternalid,dialer_status,dialer_substatus,dialer_callback,dialer_remarks,dialer_flag,dialer_lastcall,priority,crmlist_id,group,bttc,service_vs_product,resolution,satisfaction,final_call_assessment,question,mf_isa,DOB,other_information,agreementid,applied_amount,city,comp_code,company,completeddate,cust_id,cust_name,customer_name,disb_date,emi_hl,eqty_amt,foir,ins_amt,int_rate,irr,loan_amount,location,mf_amt,nth,offer_amt,outstanding,pf,ph_mob,ph_off,ph_res,pl_offer,proc_fee,product_flag,profile_new,rank,segment,tenure,tu_application_id,ucic_id,filler1,filler2,filler3,filler4,filler5,filler6,filler7,filler8,filler9,filler10,filler11,filler12,filler13,filler14,filler15,dialer_appointment"
;
public
$EMPCacheCols
=
"mobile,emailid,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,client,status,clientinternalid,dialer_status,dialer_substatus,dialer_callback,dialer_remarks,dialer_flag,dialer_lastcall,priority,crmlist_id,group,bttc,service_vs_product,resolution,satisfaction,final_call_assessment,question,mf_isa,DOB,other_information,agreementid,applied_amount,city,comp_code,company,completeddate,cust_id,cust_name,customer_name,disb_date,emi_hl,eqty_amt,foir,ins_amt,int_rate,irr,loan_amount,location,mf_amt,nth,offer_amt,outstanding,pf,ph_mob,ph_off,ph_res,pl_offer,proc_fee,product_flag,profile_new,rank,segment,tenure,tu_application_id,ucic_id,filler1,filler2,filler3,filler4,filler5,filler6,filler7,filler8,filler9,filler10,filler11,filler12,filler13,filler14,filler15,dialer_appointment
,usr_id
"
;
public
$USRCacheCols
=
"id,username,password,fullname,email,status,organization,group,data,presence,timezone,invisible,usertype,diskuse,source,meta,lteam,lteam2,supervisor,created_at,updated_at,remember_token,passwordreset,number1,number2,exten,extencontext,manager"
;
...
...
@@ -1914,12 +1914,11 @@ function popMail($userid)
return $users;
}*/
//Changes Done By Manish on 13-11-17
function searchPhone($key,$number)
{
$users=array();
$mobile10=substr($number,-10);
$tusers=$this->getPersons("RIGHT($key,10) = $mobile10", "");
$tusers=$this->getPersons("RIGHT($key,10) = $mobile10
order by modified desc limit 1
", "");
if($tusers)
{
foreach($tusers as $tusr)
...
...
application/app/Jobs/KPAMIListen.php
View file @
e261c73
...
...
@@ -658,7 +658,7 @@ class KPAMIListen implements IEventListener
$crmcall
->
statuscode
=
$cause
;
$crmcall
->
substatus
=
$causetxt
;
if
(
$crmcall
->
type
==
"Inbound"
&&
$crmcall
->
user
_id
==
0
)
//InboundDROP
if
(
$crmcall
->
type
==
"Inbound"
&&
$crmcall
->
sipid
_id
==
0
)
//InboundDROP
{
$userslist
=
User
::
where
(
'exten'
,
'like'
,
'%'
.
$crmcall
->
did
.
'%'
)
->
get
();
foreach
(
$userslist
as
$ulist
)
{
...
...
@@ -1482,7 +1482,7 @@ class KPAMIListen implements IEventListener
{
$mode
=
"Incoming"
;
$sipid
=
$this
->
getSipid
(
$dialline
->
regexstr
);
$sipid
=
$this
->
getSipid
(
$dialline
->
regexstr
,
$crmcall
);
}
if
(
!
empty
(
$sipid
))
...
...
@@ -1504,7 +1504,7 @@ class KPAMIListen implements IEventListener
{
$flag
=
"alert"
;
$sipids
=
$this
->
getSipid
(
$client
,
$flag
);
$sipids
=
$this
->
getSipid
(
$client
,
$
crmcall
,
$
flag
);
foreach
(
$sipids
as
$sipid
)
{
...
...
@@ -1513,12 +1513,16 @@ class KPAMIListen implements IEventListener
}
}
private
function
getSipid
(
$client
,
$flag
=
null
)
private
function
getSipid
(
$client
,
$
crmcall
,
$
flag
=
null
)
{
$data
=
[];
$campaignUserIds
=
[];
$did
=
$crmcall
->
did
;
if
(
$client
!=
""
)
$campaignUserIds
=
$this
->
getUsersAvailableInCampaign
(
$client
);
if
(
$crmcall
->
user_id
!=
0
)
$campaignUserIds
[]
=
$crmcall
->
user_id
;
else
$campaignUserIds
=
$this
->
getUsersAvailableInCampaign
(
$client
,
$did
);
if
(
$flag
==
null
)
{
...
...
@@ -1530,18 +1534,9 @@ class KPAMIListen implements IEventListener
->
where
(
"ready"
,
"="
,
"1"
)
->
orderBy
(
"updated_at"
,
"asc"
)
->
first
();
}
else
{
$sipid
=
Sipid
::
where
(
'server'
,
'='
,
$this
->
sipip
)
->
where
(
"user"
,
"!="
,
"0"
)
->
where
(
"status"
,
"="
,
"1"
)
->
where
(
"ready"
,
"="
,
"1"
)
->
orderBy
(
"updated_at"
,
"asc"
)
->
first
();
}
$data
=
$sipid
;
$data
=
$sipid
;
}
}
else
{
...
...
@@ -1552,30 +1547,33 @@ class KPAMIListen implements IEventListener
->
where
(
"status"
,
"="
,
"1"
)
->
orderBy
(
"updated_at"
,
"asc"
)
->
get
();
}
else
{
$sipids
=
Sipid
::
where
(
'server'
,
'='
,
$this
->
sipip
)
->
where
(
"user"
,
"!="
,
"0"
)
->
where
(
"status"
,
"="
,
"1"
)
->
orderBy
(
"updated_at"
,
"asc"
)
->
get
();
$data
=
$sipids
;
}
$data
=
$sipids
;
}
return
$data
;
}
private
function
getUsersAvailableInCampaign
(
$client
)
private
function
getUsersAvailableInCampaign
(
$client
,
$did
=
null
)
{
$data
=
[];
$data
=
User
::
where
(
'presence'
,
'='
,
"1"
)
if
(
$did
==
null
)
{
$data
=
User
::
where
(
'presence'
,
'='
,
"1"
)
->
where
(
'sel_campaign'
,
'='
,
$client
)
->
select
(
'id'
)
->
get
()
->
toArray
();
}
else
{
$data
=
User
::
where
(
'presence'
,
'='
,
"1"
)
->
where
(
'exten'
,
'like'
,
"%"
.
$did
.
"%"
)
->
select
(
'id'
)
->
get
()
->
toArray
();
}
return
$data
;
}
...
...
@@ -1588,6 +1586,8 @@ class KPAMIListen implements IEventListener
{
$ppldata
=
unserialize
(
$users
[
0
][
'peopledata'
]);
if
(
stristr
(
$ppldata
[
'dialer_substatus'
],
"follow"
))
$crmcall
->
user_id
=
$users
[
0
][
'usr_id'
];
$crmcall
->
crm_id
=
$users
[
0
][
'id'
];
$crmcall
->
number
=
$users
[
0
][
'mobile'
];
$crmcall
->
client
=
(
$ppldata
[
'client'
]
?
$ppldata
[
'client'
]
:
""
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment