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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
37 deletions
application/app/Console/Commands/CreateCall.php
application/app/Console/Commands/CreateCall.php
View file @
5523f66
...
...
@@ -305,55 +305,57 @@ class CreateCall extends Command {
if
(
sizeof
(
$users
)
>=
1
)
{
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
(
);
$record
=
$wakka
->
getPerson
(
$users
[
0
][
'id'
],
$client
);
if
(
$record
)
if
(
!
empty
(
$dialline
))
{
$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
();
$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
);
if
(
$record
)
{
$record
[
"peopledata"
][
"status"
]
=
"AutoCall"
;
$wakka
->
setPerson
(
$users
[
0
][
'id'
],
$record
,
$client
);
}
$nowts
=
microtime
(
true
)
*
1000
;
$nowts
=
microtime
(
true
)
*
1000
;
//start the call log
$crmcall
=
new
CRMCall
();
$crmcall
->
number
=
$users
[
0
][
"mobile"
];
$crmcall
->
user_id
=
0
;
$crmcall
->
sipid_id
=
0
;
$crmcall
->
crm_id
=
$users
[
0
][
'id'
];
//start the call log
$crmcall
=
new
CRMCall
();
$crmcall
->
number
=
$users
[
0
][
"mobile"
];
$crmcall
->
user_id
=
0
;
$crmcall
->
sipid_id
=
0
;
$crmcall
->
crm_id
=
$users
[
0
][
'id'
];
//$crmcall->lan=$users[0]['lan'];
$crmcall
->
client
=
$users
[
0
][
'client'
];
$crmcall
->
department
=
$users
[
0
][
'department'
];
$crmcall
->
state
=
'New'
;
$crmcall
->
type
=
"AutoCall"
;
$crmcall
->
dialline_id
=
$dialline
->
id
;
$crmcall
->
client
=
$users
[
0
][
'client'
];
$crmcall
->
department
=
$users
[
0
][
'department'
];
$crmcall
->
state
=
'New'
;
$crmcall
->
type
=
"AutoCall"
;
$crmcall
->
dialline_id
=
$dialline
->
id
;
$crmcall
->
setTs
(
'ts_Wait'
,
$nowts
);
$crmcall
->
setTs
(
'ts_Call'
,
$nowts
);
$crmcall
->
setTs
(
'ts_Wait'
,
$nowts
);
$crmcall
->
setTs
(
'ts_Call'
,
$nowts
);
$crmcall
->
did
=
$callerid
;
$crmcall
->
did
=
$callerid
;
$tdata
=
array
();
$crmcall
->
data
=
json_encode
(
$tdata
);
$crmcall
->
save
();
$tdata
=
array
();
$crmcall
->
data
=
json_encode
(
$tdata
);
$crmcall
->
save
();
$dialline
->
call_id
=
$crmcall
->
id
;
$dialline
->
save
();
$dialline
->
call_id
=
$crmcall
->
id
;
$dialline
->
save
();
//start actual calls
$newqueue
=
new
Kqueue
();
$newqueue
->
autoCallOut
(
$users
[
0
][
"mobile"
],
$callerid
,
$crmcall
,
$dialline
);
$newqueue
=
new
Kqueue
();
$newqueue
->
autoCallOut
(
$users
[
0
][
"mobile"
],
$callerid
,
$crmcall
,
$dialline
);
return
1
;
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