user non-admin audit calls

Discussion in 'General' started by dariotarcizo, Aug 10, 2009.

  1. dariotarcizo

    Joined:
    Aug 10, 2009
    Messages:
    2
    Likes Received:
    0
    Hi,

    I had an Elastix working with a PABX and it's fine but I've got a singular situation. One user need to audit all calls but this user not is a PBX-Admin.
    Is there a way to a single user (operator/extension) see all record calls?
     
  2. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    Sure, it is possible, if you would like an user (extension associated to the user) to be able to see all the CDR records, then you will need to do the following:
    1. backup /var/www/html/libs/paloSantoCDR.class.php
    2. edit /var/www/html/libs/paloSantoCDR.class.php
    3. edit function obtenerCDRs
    4. find the section that says:
    Code:
    if(!empty($calltype) && $calltype=="incoming") $strWhere .= " AND channel like '%DAHDI%' ";
    if(!empty($extension)) $strWhere .= " AND (src='$extension' OR dst='$extension') ";
    
    $query   = "SELECT calldate, src, dst, channel, dstchannel, disposition, uniqueid, duration, billsec, accountcode FROM cdr ";
    
    5. edit that section, and let it like:
    Code:
    if(!empty($calltype) && $calltype=="incoming") $strWhere .= " AND channel like '%DAHDI%' ";
    if(!empty($extension) and $extension!=503) $strWhere .= " AND (src='$extension' OR dst='$extension') ";
    
    $query   = "SELECT calldate, src, dst, channel, dstchannel, disposition, uniqueid, duration, billsec, accountcode FROM cdr ";
    
    where 503 is the extension that you have assigned to a non-administrator user on the user management menu on Elastix
     
  3. alvarix

    Joined:
    Mar 4, 2009
    Messages:
    11
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    Thanks a lot, this information was very helpful for me too.
     
  4. Makushisan

    Joined:
    Mar 12, 2011
    Messages:
    16
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    Hi, i have the newest version of elastix where the code has this format

    if (!empty($troncales)) $param['troncales'] = $troncales;
    if (!empty($extension)) $param['extension'] = $extension;
    return $param;

    you can help me to modify it? would appreciate you because I have no knowledge of php

    thank you very much

    jgutierrez escribió:
     
  5. soborno

    Joined:
    Dec 19, 2011
    Messages:
    1,358
    Likes Received:
    4
  6. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    You can do the following;

    1) Create a new group called: Reports
    2) Assign monitoring and report permissions for that group
    3) Create an user and associate it with the Reports group, don't choose any extension
    4) Edit /var/www/html/libs/paloSantoACL.class.php
    And leave it like:
    function isUserAdministratorGroup($username)
    {
    $is=false;
    $idUser = $this->getIdUser($username);
    if($idUser){
    $arrGroup = $this->getMembership($idUser);
    //$is = array_key_exists('administrator',$arrGroup);
    $is = array_search('1', $arrGroup);

    if(isset($arrGroup['Reports']))
    $is=true;

    }
    return $is;
    }
    That will allow any user on that group to have full access of all records on the monitoring and reports modules
     
  7. Makushisan

    Joined:
    Mar 12, 2011
    Messages:
    16
    Likes Received:
    0
    Claudio thank you very much for your dedication and for the prompt response!
    Jgutierrez, that was the solution I was looking for. Thank you very much. They helped me a lot. Greetings!
     
  8. mahan

    Joined:
    Apr 19, 2012
    Messages:
    33
    Likes Received:
    0
    jgutierrez ,

    I did this and any user that become a member of this group will be the same as admin for monitoring section.

    The drawback is because of that the can delete the recorded files too,is there a way to make a user able to listen and download to all recorded files but without delete ability?
     
  9. mahan

    Joined:
    Apr 19, 2012
    Messages:
    33
    Likes Received:
    0
    jgutierrez ,

    I did this and any user that become a member of this group will be the same as admin for monitoring section.

    The drawback is because of that they can delete the recorded files too,is there a way to make a user able to listen and download to all recorded files but without delete ability?
     
  10. soborno

    Joined:
    Dec 19, 2011
    Messages:
    1,358
    Likes Received:
    4
    Re: Re:user non-admin audit calls

    Yes you can,

    In the previous post I wrote in this thread, there is a link that might be useful for you...
    There you will find a possible workaround that gives you way of only enable listen and download.

    Regards,
    Claudio
     
  11. mahan

    Joined:
    Apr 19, 2012
    Messages:
    33
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    I did that before,the monitoring page will show all of recorded files but if you click on the listen it will say you "you are not authorized" and if you click on download nothing happens.
     
  12. mahan

    Joined:
    Apr 19, 2012
    Messages:
    33
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    I did that before,the monitoring page will show all of recorded files but if you click on the listen it will say you "you are not authorized" and if you click on download nothing happens.
     
  13. soborno

    Joined:
    Dec 19, 2011
    Messages:
    1,358
    Likes Received:
    4
    Re: Re:user non-admin audit calls

    Are you under v2.2?

    I just check it and works, are you seeing the second page of that thread?
    Check especially the post #97031 the key part is in the change of firm and in the existens of group "4".

    Regards,
    Claudio
     
  14. mahan

    Joined:
    Apr 19, 2012
    Messages:
    33
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    I read that again.
    What i want is a page without Delete button which user can listen and download all recorded files.
     
  15. a7med

    Joined:
    Aug 16, 2012
    Messages:
    14
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    Dear all,

    I found this thread very useful, yet is there a way that I can allow specific user to get access to monitor specific extensions ? Thank you so much
     
  16. soborno

    Joined:
    Dec 19, 2011
    Messages:
    1,358
    Likes Received:
    4
    Re: Re:user non-admin audit calls

    It could be done, I have done it before, but it requires further coding and some database changes that are beyond what I can put in a post...
    The key idea is to have an structure that holds which 'user' has which 'extensions', and later change the sql queries to reflect that.

    You can also, request the mod to PaloSanto.

    Regards,
    Claudio
     
  17. a7med

    Joined:
    Aug 16, 2012
    Messages:
    14
    Likes Received:
    0
    Re: Re:user non-admin audit calls

    WOW, Thanks alot for your prompt reply. much appreciated!
    wondering if you can create a paid addon to be listed on the addon page so it can do the whole thing at the backend and eventually would appear without going into editing the MySQL which would lead to a disaster especially for a newbie like me.
     
  18. soborno

    Joined:
    Dec 19, 2011
    Messages:
    1,358
    Likes Received:
    4
    Re: Re:user non-admin audit calls

    It's not a bad idea, but I don't really know how to make and addon, never check it...
    And I'm really short on time for a couple of months, so I can't check it for a while.
    Besides, the modifications I believe aren't enough for an addon...

    For your own benefit try with palosanto (sales@palosanto.com), maybe you can afford the cost of the project (it's a small one, since it only needs a couple of modifications).
    Or obviously you can go by yourself.

    Regards,
    Claudio
     
  19. kamion

    Joined:
    Sep 14, 2011
    Messages:
    12
    Likes Received:
    0
    Ok, I can use groups (as I do now), but can we make this as a right to assign? It will be more easy to have a rights called "Access all report records" and "Access all monitoring records" and admin to have it by default.

    Can you help me to find how to add rights?
     
  20. pmurphy

    Joined:
    Feb 2, 2012
    Messages:
    890
    Likes Received:
    0
    Hi Jorge,

    Wanted to say a big thanks again. I used your directions to elevate a group to be recognized as administrator and then gave them a restricted view of exactly what my Call Center Managers need. They had to be able to download and play recordings, and I didn't want them to have the ability to poking around inside the entire configs. I gave them all the reporting and call center campaign and agent options pages and they are thrilled. A trimmed down view is easier for them to use.

    That was a great post and should be part of a sticky how to some where. I will be putting it in my list of tips.
     

Share This Page