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
689245de
authored
2019-07-15 22:18:54 +0530
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Code Optimized while connecting the calls
1 parent
4cbac761
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
40 deletions
application/app/Jobs/KPAMIListen.php
application/app/Jobs/KPAMIListen.php
View file @
689245d
...
...
@@ -1420,37 +1420,6 @@ class KPAMIListen implements IEventListener
{
foreach
(
$diallines
as
$dialline
)
{
$lastUpdatedTime
=
strtotime
(
date
(
"Y-m-d H:i:s"
))
-
strtotime
(
$dialline
->
updated_at
);
if
(
$lastUpdatedTime
<
5
)
continue
;
/*exec("/usr/sbin/asterisk -rx 'core show channels'",$allChnnlsArr);
$cnt = 0;
foreach($allChnnlsArr as $allChnnls)
{
if(stristr($allChnnls, substr(stripslashes($dialline->channel),0, 20)))
{
$cnt++;
}
}
if($cnt == 0)
{
Log::useFiles(storage_path()."/logs/Predictive/predictive_".date("Y_m_d").".log");
Log::info($dialline);
$dialline->status="Free";
$dialline->conf="";
$dialline->number="";
$dialline->uniqueid="";
$dialline->src_channel="";
$dialline->channel="";
$dialline->regexstr="";
$dialline->save();
continue;
}*/
$crmcall
=
CRMCall
::
where
(
"uniqueid"
,
"like"
,
"%"
.
$dialline
->
uniqueid
.
"%"
)
->
first
();
if
(
$crmcall
)
...
...
@@ -1512,7 +1481,7 @@ class KPAMIListen implements IEventListener
if
(
$userEntry
->
current_dialmode
!=
"Predictive"
||
$found
->
ready
!=
1
)
return
;
}
exec
(
"/usr/sbin/asterisk -rx 'core show channel
s
'"
,
$allChnnlsArr
);
exec
(
"/usr/sbin/asterisk -rx 'core show channel
$dialline->channel
'"
,
$allChnnlsArr
);
$cnt
=
0
;
foreach
(
$allChnnlsArr
as
$allChnnls
)
{
...
...
@@ -1537,7 +1506,14 @@ class KPAMIListen implements IEventListener
$dialline
->
save
();
continue
;
}
}
//start recording
$newqueue
=
new
Kqueue
();
$newqueue
->
recordChannel
(
$dialline
->
server
,
$dialline
->
channel
,
$recfile
);
$newqueue
=
new
Kqueue
();
$newqueue
->
channelRedirectToExten
(
$found
->
server
,
$dialline
->
channel
,
"1000"
.
$found
->
id
,
"kstychDialer"
,
"1"
);
$dialline
->
user_id
=
$found
->
user
;
$dialline
->
conf
=
"1000"
.
$found
->
id
;
...
...
@@ -1579,13 +1555,6 @@ class KPAMIListen implements IEventListener
$crmcall
->
setTs
(
'ts_Recstart'
,
$nowts
);
$crmcall
->
save
();
//start recording
$newqueue
=
new
Kqueue
();
$newqueue
->
recordChannel
(
$dialline
->
server
,
$dialline
->
channel
,
$recfile
);
$newqueue
=
new
Kqueue
();
$newqueue
->
channelRedirectToExten
(
$found
->
server
,
$dialline
->
channel
,
"1000"
.
$found
->
id
,
"kstychDialer"
,
"1"
);
$newqueue
=
new
Kqueue
();
$newqueue
->
sipNotify
(
$found
,
"incomingCall"
,
$crmcall
->
id
,
$crmcall
->
crm_id
,
$crmcall
->
number
.
"@"
.
$dialline
->
channel
);
}
...
...
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