Monitoring files to a simple user

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#1
Hello

I need to have a user that can see all monitor files.
Only admin can do that.I tried to create a user in admin group but no luck (he can only see his own monitoring files).
Is there a way to create a user that he can see all monitoring files?
It's not a good idea to give admin's password to everybody.

Thanks
John
 

tuanvuanh

Joined
Sep 23, 2009
Messages
4
Likes
0
Points
0
#2
Hi John,

you can modify a little the /var/www/html/modules/minitoring/index.php by adding '//' before the 'if($esAdministrador)'
ex:
before
------
....
if($esAdministrador)

after:
-------
(...)
// if($esAdministrador)
(...)

then you can make a group that just have the privilege is to see monitor tag only and then make a user of this group, next logout,
login again with this user when you can see all recorded files in monitor tag as admin user without other tag except for the monitor tag.

Goodluck,
 

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#3
Hi

I did the // if($esAdministrador) but
It didnt work, did you try it in your elastix?
Maybe this not the only step i need.

Please take a second look at your configuration and tell me about.

I use elastix 1.3-2 (maybe something with the version?)

I did a logout and relogin with the new user, and then i did
a reboot to be sure that i see the right results.
But nothing, i can see only the user monitor files that i loged in.

And something else, is there a /var/www/html/modules/minitoring/index.php file in english? I dont know Spanish and i cant read the comment's.

Thanks anyway
John
 

tuanvuanh

Joined
Sep 23, 2009
Messages
4
Likes
0
Points
0
#4
Hi John,

you need to add the "//" in front of some lines in the ../monitoring/index.php file

line 1:
-------
[...]
$pACL->isUserAdministratorGroup($_SESSION['elastix_user']);
$tmpExtension=$extension;
// if($esAdministrador) <-------
$extension="[[:digit:]]+";

line 2:
------

function obtenerCDROnDemand($db, $extension, $start_time, $esAdministrador)
{
$arr_result=array();
$query = "SELECT calldate, src, dst, channel, dstchannel, disposition, uniqueid, duration, billsec, accountcode FROM cdr ";
$query .= "WHERE ($start_time BETWEEN UNIX_TIMESTAMP(calldate) AND (UNIX_TIMESTAMP(calldate)+duration))";
//if(!$esAdministrador) <---------------
$query .= " AND (src='$extension' OR dst='$extension')";

[...]

line 3:
------
function obtenerCDRIncoming($db,$extension, $calldate, $esAdministrador)
{
$arr_result=array();
$query = "SELECT calldate, src, dst, channel, dstchannel, disposition, uniqueid, duration, billsec, accountcode FROM cdr ";
$query .= "WHERE (calldate='$calldate')";
//if(!$esAdministrador) <-------
$query .= " AND (dst='$extension')";

line 4:
------
function obtenerCDROutgoing($db,$extension, $calldate, $vptphonenumber, $esAdministrador)
{
$arr_result=array();
$query = "SELECT calldate, src, dst, channel, dstchannel, disposition, uniqueid, duration, billsec, accountcode FROM cdr ";
$query .= "WHERE (calldate='$calldate')";
//if(!$esAdministrador) <-------
$query .= " AND src='$extension'";

I've done this and it run ok for me.

Cheers,
 

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#5
Hi
and thanks

Well it works but partly.

I can see only incoming calls and internal calls of any extention.
I dont have the outgoing calls, something is missing.
I use mISDN (custom) trunks i dont kmnow if you have any to try.

It needs something more...

Thanks anyway
John
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,915
Messages
130,920
Members
17,595
Latest member
feparra121
Top