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
8586b7c4
authored
2019-07-16 08:30:12 +0000
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updated Condition and added dialline id in kqueue model
1 parent
689245de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
28 deletions
application/app/Jobs/KPAMIListen.php
application/app/Models/Kqueue.php
application/app/Jobs/KPAMIListen.php
View file @
8586b7c
...
...
@@ -498,25 +498,25 @@ class KPAMIListen implements IEventListener
}
}
else
if
(
$accountcodearr
[
1
]
==
"a"
)
// Code Added by AmolG: AutoDial
{
{
Log
::
info
(
$accountcodearr
);
Dialline
::
where
(
'id'
,
$accountcodearr
[
3
])
->
where
(
function
(
$query
)
use
(
$channel
)
{
$query
->
where
(
'channel'
,
'='
,
$channel
)
->
orWhere
(
'status'
,
'='
,
'AutoCall'
);
})
->
update
([
'status'
=>
"Free"
,
'conf'
=>
""
,
'number'
=>
""
,
'uniqueid'
=>
""
,
'channel'
=>
""
,
'regexstr'
=>
""
,
'did'
=>
""
,
]);
$crmcall
=
CRMCall
::
find
(
$accountcodearr
[
2
]);
if
(
$crmcall
)
{
$nowts
=
microtime
(
true
)
*
1000
;
$dialline
=
Dialline
::
find
(
$crmcall
->
dialline_id
);
if
(
$dialline
&&
(
$dialline
->
channel
==
$channel
||
$dialline
->
status
==
"AutoCall"
))
{
$dialline
->
status
=
"Free"
;
$dialline
->
conf
=
""
;
$dialline
->
number
=
""
;
$dialline
->
uniqueid
=
""
;
$dialline
->
channel
=
""
;
$dialline
->
regexstr
=
""
;
$dialline
->
did
=
""
;
$dialline
->
save
();
$tsip
=
Sipid
::
find
(
$crmcall
->
sipid_id
);
if
(
!
empty
(
$tsip
))
...
...
@@ -527,7 +527,6 @@ class KPAMIListen implements IEventListener
$newqueue
=
new
Kqueue
();
$newqueue
->
sipNotify
(
$tsip
,
"dialerUI"
,
"hangup"
,
"c"
,
$crmcall
->
id
.
"~"
.
$crmcall
->
number
.
"~"
.
base64_encode
(
$channel
));
}
}
$crmcall
->
setTs
(
'ts_Recend'
,
$nowts
);
...
...
@@ -1481,17 +1480,9 @@ class KPAMIListen implements IEventListener
if
(
$userEntry
->
current_dialmode
!=
"Predictive"
||
$found
->
ready
!=
1
)
return
;
}
exec
(
"/usr/sbin/asterisk -rx 'core show channel
$dialline->channel
'"
,
$allChnnlsArr
);
$cnt
=
0
;
foreach
(
$allChnnlsArr
as
$allChnnls
)
{
if
(
stristr
(
$allChnnls
,
substr
(
stripslashes
(
$dialline
->
channel
),
0
,
20
)))
{
$cnt
++
;
}
}
exec
(
"/usr/sbin/asterisk -rx 'core show channel
$dialline->channel
'"
,
$channelArr
);
if
(
$cnt
==
0
)
if
(
count
(
$channelArr
)
==
1
)
{
Log
::
useFiles
(
storage_path
()
.
"/logs/Predictive/predictive_"
.
date
(
"Y_m_d"
)
.
".log"
);
Log
::
info
(
$crmcall
->
id
);
Log
::
info
(
$dialline
);
...
...
@@ -1508,6 +1499,8 @@ class KPAMIListen implements IEventListener
continue
;
}
$recfile
=
$crmcall
->
newRecFilePath
();
//start recording
$newqueue
=
new
Kqueue
();
$newqueue
->
recordChannel
(
$dialline
->
server
,
$dialline
->
channel
,
$recfile
);
...
...
@@ -1550,8 +1543,6 @@ class KPAMIListen implements IEventListener
}
$recfile
=
$crmcall
->
newRecFilePath
();
$crmcall
->
setTs
(
'ts_Recstart'
,
$nowts
);
$crmcall
->
save
();
...
...
application/app/Models/Kqueue.php
View file @
8586b7c
...
...
@@ -57,7 +57,7 @@ class Kqueue extends Model{
$odata
[
'context'
]
=
"kstychDialer"
;
$odata
[
'callerid'
]
=
$callerid
;
$odata
[
'toext'
]
=
"1002"
.
$callnumber
;
$odata
[
'account'
]
=
'm|a|'
.
$crmcall
->
id
;
$odata
[
'account'
]
=
'm|a|'
.
$crmcall
->
id
.
'|'
.
$dialline
->
id
;
$odata
[
'VARS'
][
'dialstr'
]
=
$dialstr
;
//originate 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