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
f77d51bb
authored
2019-04-02 12:27:37 +0530
by
G Manojkumar
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
changed sipids server_ip condition
1 parent
472fcdb2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
application/app/Http/Controllers/HomeController.php
application/app/Http/Controllers/HomeController.php
View file @
f77d51b
...
...
@@ -103,11 +103,11 @@ class HomeController extends Controller {
$cliarr
[
'keepconf'
]
=
Config
::
get
(
"app.kDialer_keeplocalconf"
);
//get a free sip id
$server
=
explode
(
":"
,
$user
->
exten
);
//
$sipid=Sipid::where("status","=","0")->where('updated_at','<=',date("Y-m-d H:i:s",time()-600))->orderBy('updated_at','asc')->where('server','!=','');
$sipid
=
Sipid
::
where
(
"status"
,
"="
,
"0"
)
->
where
(
'updated_at'
,
'<='
,
date
(
"Y-m-d H:i:s"
,
time
()
-
600
))
->
orderBy
(
'updated_at'
,
'asc'
)
->
where
(
'server'
,
'='
,
env
(
'app_ip'
))
->
first
();
//
if(isset($server[2]))$sipid=$sipid->where('server','=',$server[2]);
$sipid
=
Sipid
::
where
(
"status"
,
"="
,
"0"
)
->
where
(
'updated_at'
,
'<='
,
date
(
"Y-m-d H:i:s"
,
time
()
-
600
))
->
orderBy
(
'updated_at'
,
'asc'
)
->
where
(
'server'
,
'!='
,
''
);
//
$sipid=Sipid::where("status","=","0")->where('updated_at','<=',date("Y-m-d H:i:s",time()-600))->orderBy('updated_at','asc')->where('server','=',env('app_ip'))->first();
if
(
isset
(
$server
[
2
]))
$sipid
=
$sipid
->
where
(
'server'
,
'='
,
$server
[
2
]);
//
$sipid=$sipid->first();
$sipid
=
$sipid
->
first
();
if
(
!
$sipid
)
return
Response
::
make
(
"Error : Cant Allocate Data Channel. Giving Up."
);
$sipid
->
clients
=
json_encode
(
$cliarr
);
$sipid
->
user
=
$user
->
id
;
...
...
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