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
5523f66a
authored
2019-08-16 10:16:14 +0000
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added diallines condition before start calling
1 parent
862aa821
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
application/app/Console/Commands/CreateCall.php
application/app/Console/Commands/CreateCall.php
View file @
5523f66
...
...
@@ -305,6 +305,15 @@ class CreateCall extends Command {
if
(
sizeof
(
$users
)
>=
1
)
{
$dialline
=
Dialline
::
where
(
'server'
,
'='
,
env
(
'app_ip'
))
->
where
(
"status"
,
"="
,
"Free"
)
->
where
(
"enabled"
,
"="
,
"1"
)
->
where
(
"dialstr"
,
"="
,
$availDialStr
)
->
orderBy
(
'updated_at'
,
'ASC'
)
->
first
();
if
(
!
empty
(
$dialline
))
{
$dialline
->
status
=
"AutoCall"
;
$dialline
->
regexstr
=
$client
;
$dialline
->
number
=
$users
[
0
][
"mobile"
];
$dialline
->
save
();
DB
::
table
(
'records_'
.
$client
)
->
where
(
'id'
,
$users
[
0
][
'id'
])
->
update
([
'filter_condition'
=>
'2'
,
'modified'
=>
date
(
"Y-m-d H:i:s"
)]);
$record
=
$wakka
->
getPerson
(
$users
[
0
][
'id'
],
$client
);
...
...
@@ -312,16 +321,8 @@ class CreateCall extends Command {
{
$record
[
"peopledata"
][
"status"
]
=
"AutoCall"
;
$wakka
->
setPerson
(
$users
[
0
][
'id'
],
$record
,
$client
);
// DB::table('records_'.$client)->where('id',$users[0]['id'])->update(['filter_condition'=>'2','modified'=>date("Y-m-d H:i:s")]);
}
$dialline
=
Dialline
::
where
(
'server'
,
'='
,
env
(
'app_ip'
))
->
where
(
"status"
,
"="
,
"Free"
)
->
where
(
"enabled"
,
"="
,
"1"
)
->
where
(
"dialstr"
,
"="
,
$availDialStr
)
->
orderBy
(
'updated_at'
,
'ASC'
)
->
first
();
$dialline
->
status
=
"AutoCall"
;
$dialline
->
regexstr
=
$client
;
$dialline
->
number
=
$users
[
0
][
"mobile"
];
$dialline
->
save
();
$nowts
=
microtime
(
true
)
*
1000
;
//start the call log
...
...
@@ -355,6 +356,7 @@ class CreateCall extends Command {
return
1
;
}
}
return
0
;
}
...
...
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