Monitoring files to a simple user

Discussion in 'General' started by johnme, Jul 10, 2009.

  1. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    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
     
  2. tuanvuanh

    Joined:
    Sep 23, 2009
    Messages:
    4
    Likes Received:
    0
    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,
     
  3. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    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
     
  4. tuanvuanh

    Joined:
    Sep 23, 2009
    Messages:
    4
    Likes Received:
    0
    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,
     
  5. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    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
     

Share This Page