How make user group for extension

bwg

Joined
Aug 14, 2008
Messages
62
Likes
0
Points
0
#1
Hi

I have extensions
101
102
103
104
105
106
107
108
109
110
111
If add new user for extensions numer 101 type is Operador or Extension and login I see CDR report only this extensions.
I will for example Extensions 101-102-103 one group. If user 101 login if can see CDR report 101-102-103

How make this expectation
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#2
what you are asking for is that an user may see the CDR info for all extensions in a particular "group" ?
 

bwg

Joined
Aug 14, 2008
Messages
62
Likes
0
Points
0
#3
Yes
 

bwg

Joined
Aug 14, 2008
Messages
62
Likes
0
Points
0
#4
jgutierrez said:
what you are asking for is that an user may see the CDR info for all extensions in a particular "group" ?
Hi
I'm wait help
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#5
hello,


try editing the following line in /var/www/html/libs/paloSantoCDR.class.php

if(!empty($extension)) $strWhere .= " AND (src='$extension' OR dst='$extension') ";

in the if statement add some conditions that states that if the logged extension differs from 101, 102, ... 111, send the $strWhere as it is (original query).

But if the logged extension is 101 or 102 ... or 111, change the query, so the $strWhere variable will show up CDR from other extensions too...

Don't forget to backup the original file before editing it, ok ?? B)
 

bwg

Joined
Aug 14, 2008
Messages
62
Likes
0
Points
0
#6
Hi jgutierrez

Maybe very easy but my english not enaught. Please tell me how make I see file

if(!empty($calltype) && $calltype=="incoming") $strWhere .= " AND channel like '%zap%' ";
if(!empty($extension)) $strWhere .= " AND (src='$extension' OR dst='$extension') ";

$query = "SELECT calldate, src, dst, channel, dstchannel, disposition, uniqueid, duration, billsec, accountcode FROM cdr ";
// Clausula WHERE aqui
if(!empty($strWhere)) $query .= "WHERE $strWhere ";
// Limit
if(!empty($limit)) {
$query .= " LIMIT $limit OFFSET $offset";
}

exapmle group is numbers 101,154,155,177 how make this change in the file
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#7

bwg

Joined
Aug 14, 2008
Messages
62
Likes
0
Points
0
#8
Hi

I'm modify paloSantoCDR.class.php

// -------------------------------- Modifications done by Jorge Gutierrez, Santiago de Guayaquil - Ecuador, Oct 25 / 2008 -----------------------



// if(!empty($extension)) $strWhere .= " AND (src='$extension' OR dst='$extension') ";


if(!empty($extension))
{
if ($extension=="103" or $extension=="105" or $extension=="106")
{
$strWhere .= " AND ((src='103' OR dst='100') ";
$strWhere .= " OR (src='105' OR dst='105') ";
$strWhere .= " OR (src='106' OR dst='106') ";
}
else
$strWhere .= " AND (src='$extension' OR dst='$extension') ";
}


// -------------------------------- Modifications done by Jorge Gutierrez, Santiago de Guayaquil - Ecuador, Oct 25 / 2008 -----------------------
and login 103 but not make a rapor


I think mistake red line and modify this type
$strWhere .= " AND (src='103' OR dst='100') ";
but not change
If login admin the same not generate rapor
 

jgutierrez

Joined
Feb 28, 2008
Messages
5,737
Likes
0
Points
0
#9
Hi there,

Yep, seems to me that I have a little mistake :p

You may contact me at jgutierr_007@hotmail.com , if you want you may give me access into your server to fix the CDR report
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top