bar top left
bar top right
left curve
right curve
Bienvenido, Invitado

CDR Report, Call Duration...
(1 viendo) (1) Invitado
Abajo
Publicar respuesta
Publicar nuevo tema
Página: 1
TEMA: CDR Report, Call Duration...
#102626
CDR Report, Call Duration... hace 12 Meses Karma: 0
In previous versions of elastix, this would show as a simple numerical value in seconds. The new version of Elastix appends text to convert this into minutes.

When I export to a spreadsheet, the column is now text, and I can't autosum. Is there a way to revert this back to plain text?
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
vperez69
Junior Boarder
Mensajes: 69
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Reply Quote
 
#102931
Re: CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 0
No one has this same problem?
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
vperez69
Junior Boarder
Mensajes: 69
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Reply Quote
 
#102936
Re: CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 98
Hi,

Indeed, that`s how it works now...
I get why it´s not suitable for you, the way around this is to change what is send to the export function itself, I will give it a check and tell you about it.

Regards,
Claudio
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
soborno
Gold Boarder
Mensajes: 1119
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Sexo: Hombre Localización: Uruguay Cumpleaños: 07/22
Última edición: 30/05/2012 11:59 por soborno.
Keep the KARMA UP!
soborno.sr@gmail.com
Reply Quote
 
#102942
Re: CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 98
A minor change in code will be enough to solve your problem:
You need to edit the index of cdr_reports module (do not forget to make a backup!):
Código:

vim /var/www/html/modules/cdrreport/index.php

Later, go almost to the end of the file, in line 259(aprox) you are going to see an if with the ExportAction
Below that you should see this:
Código:

if(is_array($arrResult['cdrs']) && $total>0){
            foreach($arrResult['cdrs'] as $key => $value){
                $arrTmp[0] = $value[0];
                $arrTmp[1] = $value[1];
                $arrTmp[2] = $value[11];
                $arrTmp[3] = $value[2];
                $arrTmp[4] = $value[3];
                $arrTmp[5] = $value[9];
                $arrTmp[6] = $value[4];
                $arrTmp[7] = $value[5];
                $iDuracion = $value[8];
                $iSec = $iDuracion % 60; $iDuracion = (int)(($iDuracion - $iSec) / 60);
                $iMin = $iDuracion % 60; $iDuracion = (int)(($iDuracion - $iMin) / 60);
                $sTiempo = "{$value[8]}s";
                if ($value[8] >= 60) {
                      if ($iDuracion > 0) $sTiempo .= " ({$iDuracion}h {$iMin}m {$iSec}s)";
                      elseif ($iMin > 0)  $sTiempo .= " ({$iMin}m {$iSec}s)";
                }
                $arrTmp[8] = $sTiempo;
                $arrData[] = $arrTmp;
            }
        }


change it for this:
Código:

if(is_array($arrResult['cdrs']) && $total>0){
            foreach($arrResult['cdrs'] as $key => $value){
                $arrTmp[0] = $value[0];
                $arrTmp[1] = $value[1];
                $arrTmp[2] = $value[11];
                $arrTmp[3] = $value[2];
                $arrTmp[4] = $value[3];
                $arrTmp[5] = $value[9];
                $arrTmp[6] = $value[4];
                $arrTmp[7] = $value[5];
                $arrTmp[8] = $value[8];
                /*$iDuracion = $value[8];
                $iSec = $iDuracion % 60; $iDuracion = (int)(($iDuracion - $iSec) / 60);
                $iMin = $iDuracion % 60; $iDuracion = (int)(($iDuracion - $iMin) / 60);
                $sTiempo = "{$value[8]}s";
                if ($value[8] >= 60) {
                      if ($iDuracion > 0) $sTiempo .= " ({$iDuracion}h {$iMin}m {$iSec}s)";
                      elseif ($iMin > 0)  $sTiempo .= " ({$iMin}m {$iSec}s)";
                }
                $arrTmp[8] = $sTiempo;*/
                $arrData[] = $arrTmp;
            }
        }


NOTE: Tested in version 2.2

Regards,
Claudio
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
soborno
Gold Boarder
Mensajes: 1119
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Sexo: Hombre Localización: Uruguay Cumpleaños: 07/22
Última edición: 30/05/2012 12:55 por soborno.
Keep the KARMA UP!
soborno.sr@gmail.com
Reply Quote
 
#102946
Re: CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 0
Claudio,

This is golden, thank you very much. Tonight, when my users are offfline, I will run my backup, and try this out. Again, thank you for the insight.

Victor
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
vperez69
Junior Boarder
Mensajes: 69
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Reply Quote
 
#102955
Re: CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 98
No problem.
As for the backup, you don`t need to make a full system backup, just copy the index.php under cdrreport, so if something happens you can put the 'original' back.

Note: The code changes that I paste before are for version 2.2, for the rest should be similiar or exactly the same, but not really tested.

Regards,
Claudio
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
soborno
Gold Boarder
Mensajes: 1119
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Sexo: Hombre Localización: Uruguay Cumpleaños: 07/22
Keep the KARMA UP!
soborno.sr@gmail.com
Reply Quote
 
#103198
Re:CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 0
Hey Claudio,

I just wanted to say that the report works as intended now. Thank you so much for your valuable assistance.

Victor
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
vperez69
Junior Boarder
Mensajes: 69
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Reply Quote
 
#103236
Re:CDR Report, Call Duration... hace 11 Meses, 3 Semanas Karma: 98
Nice!

Regards,
Claudio
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
soborno
Gold Boarder
Mensajes: 1119
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Sexo: Hombre Localización: Uruguay Cumpleaños: 07/22
Keep the KARMA UP!
soborno.sr@gmail.com
Reply Quote
 
#114800
Re: CDR Report, Call Duration... hace 4 Meses, 1 Semana Karma: 0

in the export action replace with this:

Código:

        if(is_array($arrResult['cdrs']) && $total>0){
            foreach($arrResult['cdrs'] as $key => $value){
                $arrTmp[0] = $value[0];
                $arrTmp[1] = $value[1];
                $arrTmp[2] = $value[11];
                $arrTmp[3] = $value[2];
                $arrTmp[4] = $value[3];
                $arrTmp[5] = $value[9];
                $arrTmp[6] = $value[4];
                $arrTmp[7] = $value[5];
                $iDuracion = $value[8];
                $sTiempo = "{$value[8]}";
                $arrTmp[8] = $sTiempo;
                $arrData[] = $arrTmp;
            }
        }



and you have only numeric values....

Greetings friends
Introducir código aquí   
Por favor, aunque no se vea ningún BBcode ni botones de smiley, son usables igualmente
abrahammontes
Fresh Boarder
Mensajes: 1
graphgraph
Usuario Offline Presiona aquí para ver el perfil de este usuario
Última edición: 10/01/2013 17:21 por abrahammontes.
Reply Quote
 
Arriba
Publicar respuesta
Publicar nuevo tema
Página: 1
Moderadores: Bob, jgutierrez

elastix

Protected by Spam Fighter