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
8531fe49
authored
2019-07-03 20:43:02 +0530
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added report changes and changed logic in createcall to pick up dialline channel
1 parent
fa27a3e9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
14 deletions
application/app/Console/Commands/CreateCall.php
application/app/Constants/gatewaydispo.php
application/app/Http/Controllers/ReportController.php
application/app/Jobs/KPAMIListen.php
application/resources/views/layout/module/reports/calllog.blade.php
application/resources/views/layout/module/reports/reports.blade.php
application/app/Console/Commands/CreateCall.php
View file @
8531fe4
...
...
@@ -268,6 +268,7 @@ class CreateCall extends Command {
public
function
useChannelToDial
(
$client
,
$availDialStr
)
{
$retCrmCall
=
0
;
$dialline
=
Dialline
::
where
(
'server'
,
'='
,
env
(
'app_ip'
))
->
where
(
"status"
,
"="
,
"Free"
)
->
where
(
"enabled"
,
"="
,
"1"
)
->
where
(
"dialstr"
,
"="
,
$availDialStr
)
->
orderBy
(
'updated_at'
,
'ASC'
)
->
first
();
//TODO::Need To Code Dspan Logic as per discussion
...
...
@@ -276,9 +277,17 @@ class CreateCall extends Command {
if
(
!
empty
(
$dialline
))
{
$this
->
createCrmCall
(
$client
,
$dialline
);
$dialline
->
status
=
"Incall"
;
$dialline
->
save
();
$retCrmCall
=
$this
->
createCrmCall
(
$client
,
$dialline
);
}
if
(
!
$retCrmCall
)
{
$dialline
->
status
=
"Free"
;
$dialline
->
save
();
}
return
;
}
...
...
@@ -303,7 +312,7 @@ class CreateCall extends Command {
$dialline
->
user_id
=
$user_id
;
$dialline
->
status
=
"AutoCall"
;
$dialline
->
regexstr
=
$users
[
0
][
'client'
];
$dialline
->
regexstr
=
$users
[
0
][
"client"
];
$dialline
->
number
=
$users
[
0
][
"mobile"
];
$dialline
->
save
();
...
...
@@ -334,9 +343,10 @@ class CreateCall extends Command {
//start actual calls
$newqueue
=
new
Kqueue
();
$newqueue
->
autoCallOut
(
$users
[
0
][
"mobile"
],
$callerid
,
$crmcall
,
$dialline
);
}
return
;
return
1
;
}
return
0
;
}
public
function
getSpanCount
()
...
...
application/app/Constants/gatewaydispo.php
View file @
8531fe4
<?php
$gatewaydispoArry
=
Array
(
'19'
=>
'NC-BUSY'
,
'17'
=>
'NC-BUSY'
,
'0'
=>
'NC-BUSY'
,
'16'
=>
'NC-Ringing'
);
$gatewaydispoArry
=
Array
(
'0'
=>
'NC-UNALLOCATED'
,
'1'
=>
'NC-UNALLOCATED'
,
'16'
=>
'NC-Ringing'
,
'17'
=>
'NC-BUSY'
,
'18'
=>
'NC-Ringing'
,
'19'
=>
'NC-BUSY'
,
'27'
=>
'NC-CONGESTION'
,
'29'
=>
'NC-BUSY'
,
'34'
=>
'NC-CONGESTION'
,
'38'
=>
'NC-CONGESTION'
,
'102'
=>
'NC-CONGESTION'
);
?>
...
...
application/app/Http/Controllers/ReportController.php
View file @
8531fe4
...
...
@@ -37,9 +37,11 @@ class ReportController extends Controller
$timeoffset
=
$dashboarduser
->
timezone
;
//-330; //$dashboarduser->timezone;
$timeoffset
=
$timeoffset
*
60
;
$data
[
'user'
]
=
$dashboarduser
;
if
(
$id
==
"reports"
)
{
return
view
(
"layout.module.reports.reports"
);
return
view
(
"layout.module.reports.reports"
,
$data
);
}
$logtime
=
(
isset
(
$_GET
[
'logtime'
]))
?
$_GET
[
'logtime'
]
:
9
;
...
...
application/app/Jobs/KPAMIListen.php
View file @
8531fe4
...
...
@@ -1423,6 +1423,10 @@ class KPAMIListen implements IEventListener
{
foreach
(
$diallines
as
$dialline
)
{
$lastUpdatedTime
=
strtotime
(
date
(
"Y-m-d H:i:s"
))
-
strtotime
(
$dialline
->
updated_at
);
if
(
$lastUpdatedTime
<
3
)
continue
;
exec
(
"/usr/sbin/asterisk -rx 'core show channels'"
,
$allChnnlsArr
);
$cnt
=
0
;
foreach
(
$allChnnlsArr
as
$allChnnls
)
...
...
application/resources/views/layout/module/reports/calllog.blade.php
View file @
8531fe4
...
...
@@ -236,7 +236,11 @@ if(Input::has("dllogxls"))
{
$row
=
$baseRow
++
;
$col
=
0
;
if
(
$aline
->
type
==
"Auto"
||
$aline
->
type
==
"AutoCall"
)
{
$aline
->
waitSec
=
0
;
$aline
->
callSec
=
0
;
}
$clientcode
=
""
;
$currentstatus
=
""
;
$legalstatus
=
""
;
if
(
$aline
->
crm_id
>
0
)
...
...
@@ -347,6 +351,12 @@ foreach($alist as $aline)
{
$clientcode
=
""
;
if
(
$aline
->
type
==
"Auto"
||
$aline
->
type
==
"AutoCall"
)
{
$aline
->
waitSec
=
0
;
$aline
->
callSec
=
0
;
}
if
(
$aline
->
crm_id
>
0
)
{
/*$user=$wakka->getPerson($aline->crm_id);
...
...
@@ -716,16 +726,16 @@ series: [{
{
var
sortstr
=
''
;
if
(
sortby
!=
""
)
sortstr
=
"&sort="
+
sortby
var
searchStr
=
dataString
();
doAjax
(
'
dialer
/calllog?'
+
searchStr
+
sortstr
,
''
,
'rightmainreportdiv'
,
'ajax_dialer_reports'
,
'singlethis'
,
'GET'
);
doAjax
(
'
report
/calllog?'
+
searchStr
+
sortstr
,
''
,
'rightmainreportdiv'
,
'ajax_dialer_reports'
,
'singlethis'
,
'GET'
);
}
function
getCallRec
(
id
)
{
doAjax
(
"
dialer
/calllog"
,
"getCallRec=1&calllog="
+
id
+
"&logdate="
+
$
(
"#modfrom"
).
val
(),
'recspan_'
+
id
,
'rec_ajax'
,
'singlefail'
,
'GET'
);
doAjax
(
"
report
/calllog"
,
"getCallRec=1&calllog="
+
id
+
"&logdate="
+
$
(
"#modfrom"
).
val
(),
'recspan_'
+
id
,
'rec_ajax'
,
'singlefail'
,
'GET'
);
}
function
dlCalllogXls
()
{
var
searchStr
=
dataString
();
window
.
open
(
'
dialer
/calllog?dllogxls=1&'
+
searchStr
);
return
false
;
window
.
open
(
'
report
/calllog?dllogxls=1&'
+
searchStr
);
return
false
;
}
...
...
application/resources/views/layout/module/reports/reports.blade.php
View file @
8531fe4
...
...
@@ -24,9 +24,11 @@
<div
class=
"col-app"
>
<ul
class=
"list-group list-group-1 margin-none borders-none"
style=
'padding-right: 26px;'
>
@if($user->usertype != "User")
<li
class=
"list-group-item"
>
<a
href=
"#"
onclick=
"doAjax('report/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"
><i
class=
"fa fa-circle-o"
></i>
Live
</a>
</li>
@endif
<li
class=
"list-group-item"
>
<a
href=
"#"
onclick=
"doAjax('report/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"
><i
class=
"fa fa-circle-o"
></i>
Call
</a>
...
...
@@ -46,7 +48,7 @@
</li>
<li
class=
"list-group-item"
>
<a
href=
"#"
onclick=
"doAjax('report/
relationshipreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"
><i
class=
"fa fa-circle-o"
></i>
Relationship
</a>
<a
href=
"#"
onclick=
"doAjax('report/
campaignwise','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"
><i
class=
"fa fa-circle-o"
></i>
Campaign Wise
</a>
</li>
</ul>
</div>
...
...
@@ -87,9 +89,11 @@
<div
class=
""
id=
rightmainreportdiv
>
<script>
@
if
(
$user
->
usertype
!=
"User"
)
doAjax
(
'report/liveusers'
,
''
,
'rightmainreportdiv'
,
'ajax_dialer_reports'
,
'singlethis'
,
'GET'
);
@
else
doAjax
(
'report/calllog'
,
''
,
'rightmainreportdiv'
,
'ajax_dialer_reports'
,
'singlethis'
,
'GET'
);
@
endif
</script>
</div>
...
...
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