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
f0ce5e68
authored
2019-07-23 08:05:47 +0000
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added new column in the dialline and CRMCall Archive Table, made changes for the same
1 parent
b1a9e157
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletions
application/app/Console/Commands/CreateCall.php
application/app/Console/Commands/PredictiveCallHangUp.php
application/app/Http/Controllers/DialerController.php
application/app/Jobs/KPAMIListen.php
application/app/Console/Commands/CreateCall.php
View file @
f0ce5e6
...
...
@@ -344,6 +344,9 @@ class CreateCall extends Command {
$crmcall
->
data
=
json_encode
(
$tdata
);
$crmcall
->
save
();
$dialline
->
call_id
=
$crmcall
->
id
;
$dialline
->
save
();
//start actual calls
$newqueue
=
new
Kqueue
();
$newqueue
->
autoCallOut
(
$users
[
0
][
"mobile"
],
$callerid
,
$crmcall
,
$dialline
);
...
...
application/app/Console/Commands/PredictiveCallHangUp.php
View file @
f0ce5e6
...
...
@@ -63,18 +63,23 @@ class PredictiveCallHangUp extends Command {
$avgringsec
=
Cutoff
::
select
(
DB
::
Raw
(
'avg(avg_ring) as avgringsec'
))
->
first
();
if
(
$avgringsec
)
$avgringsec
=
intval
(
$avgringsec
->
avgringsec
);
$diallines
=
Dialline
::
whereIn
(
"status"
,
[
"Auto"
,
"AutoCall"
])
->
where
(
"conf"
,
"="
,
""
)
->
select
(
'src_channel'
,
'status'
,
'updated_at'
,
'channel'
,
'server'
)
->
get
();
$diallines
=
Dialline
::
whereIn
(
"status"
,
[
"Auto"
,
"AutoCall"
])
->
where
(
"conf"
,
"="
,
""
)
->
select
(
'
call_id'
,
'
src_channel'
,
'status'
,
'updated_at'
,
'channel'
,
'server'
)
->
get
();
foreach
(
$diallines
as
$dialline
)
{
$newqueue
=
new
Kqueue
();
$lastUpdatedTime
=
strtotime
(
date
(
"Y-m-d H:i:s"
))
-
strtotime
(
$dialline
->
updated_at
);
$callId
=
$dialline
->
call_id
;
if
(
$dialline
->
status
==
'Auto'
&&
$lastUpdatedTime
>
$breathingTime
)
{
$newqueue
->
hangupChannelS
(
$dialline
->
channel
,
$dialline
->
server
);
$this
->
updateCrmCallEntry
(
$callId
);
}
elseif
(
$dialline
->
status
==
'AutoCall'
&&
$lastUpdatedTime
>
(
$avgringsec
+
$breathingTime
))
{
$newqueue
->
hangupChannelS
(
$dialline
->
src_channel
,
$dialline
->
server
);
$this
->
updateCrmCallEntry
(
$callId
);
}
}
}
catch
(
Exception
$e
)
{
...
...
@@ -82,4 +87,14 @@ class PredictiveCallHangUp extends Command {
Log
::
error
(
$e
);
}
}
public
function
updateCrmCallEntry
(
$callId
)
{
$hsource
=
"DTO"
;
CRMCall
::
where
(
'id'
,
$callId
)
->
update
([
'hsource'
=>
$hsource
]);
}
}
...
...
application/app/Http/Controllers/DialerController.php
View file @
f0ce5e6
...
...
@@ -398,6 +398,10 @@ class DialerController extends Controller {
$tdata
=
array
();
$crmcall
->
data
=
json_encode
(
$tdata
);
$crmcall
->
save
();
$dialline
->
call_id
=
$crmcall
->
id
;
$dialline
->
save
();
if
(
$users
[
0
][
'id'
]
>
0
){
if
(
$client
!=
''
)
$records
=
'records_'
.
$client
;
else
$records
=
'records'
;
...
...
application/app/Jobs/KPAMIListen.php
View file @
f0ce5e6
...
...
@@ -468,6 +468,7 @@ class KPAMIListen implements IEventListener
$dialline
=
Dialline
::
find
(
$crmcall
->
dialline_id
);
if
(
$dialline
&&
$dialline
->
status
!=
"Auto"
&&
$dialline
->
status
!=
"AutoCall"
)
{
$dialline
->
call_id
=
0
;
$dialline
->
user_id
=
0
;
$dialline
->
status
=
"Free"
;
$dialline
->
conf
=
""
;
...
...
@@ -526,6 +527,7 @@ class KPAMIListen implements IEventListener
->
orWhere
(
'status'
,
'='
,
'AutoCall'
);
})
->
update
([
'call_id'
=>
0
,
'user_id'
=>
0
,
'status'
=>
"Free"
,
'conf'
=>
""
,
...
...
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