user non-admin audit calls

dariotarcizo

Joined
Aug 10, 2009
Messages
2
Likes
0
Points
0
#1
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?
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#2
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
 

alvarix

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

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

Makushisan

Joined
Mar 12, 2011
Messages
16
Likes
0
Points
0
#4
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ó:
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
 

soborno

Joined
Dec 19, 2011
Messages
1,358
Likes
4
Points
38
#5

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#6
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
 

Makushisan

Joined
Mar 12, 2011
Messages
16
Likes
0
Points
0
#7
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!
 

mahan

Joined
Apr 19, 2012
Messages
33
Likes
0
Points
0
#8
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?
 

mahan

Joined
Apr 19, 2012
Messages
33
Likes
0
Points
0
#9
jgutierrez said:
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
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?
 

soborno

Joined
Dec 19, 2011
Messages
1,358
Likes
4
Points
38
#10
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
 

mahan

Joined
Apr 19, 2012
Messages
33
Likes
0
Points
0
#11
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.
 

mahan

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

soborno said:
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
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.
 

soborno

Joined
Dec 19, 2011
Messages
1,358
Likes
4
Points
38
#13
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
 

mahan

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

soborno said:
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
I read that again.
What i want is a page without Delete button which user can listen and download all recorded files.
 

a7med

Joined
Aug 16, 2012
Messages
14
Likes
0
Points
0
#15
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
 

soborno

Joined
Dec 19, 2011
Messages
1,358
Likes
4
Points
38
#16
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
 

a7med

Joined
Aug 16, 2012
Messages
14
Likes
0
Points
0
#17
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.
 

soborno

Joined
Dec 19, 2011
Messages
1,358
Likes
4
Points
38
#18
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
 

kamion

Joined
Sep 14, 2011
Messages
12
Likes
0
Points
0
#19
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?
 

pmurphy

Joined
Feb 2, 2012
Messages
890
Likes
0
Points
0
#20
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.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top