[Spce-user] Database Question (CDRs) v2.6
Gavin Sweet
gavin.sweet at skyracktelecom.com
Fri Jun 28 17:53:23 EDT 2013
Hi everyone -
We have this problem occasionally also as far as I can see (on 2.7).
I didnt see an end to this thread ... did this duplicated CDR (double bye
problem) get fixed in v2.8 or due to be fixed in v3.0 ??
Thanks
Gavin
> -----Original Message-----
> From: spce-user-bounces at lists.sipwise.com [mailto:spce-user-
> bounces at lists.sipwise.com] On Behalf Of Aníbal Cañada
> Sent: 05 April 2013 00:23
> To: Andreas Granig
> Cc: spce-user at lists.sipwise.com
> Subject: Re: [Spce-user] Database Question (CDRs) v2.6
>
> Hi , sorry for my late response:
>
> - I put the archives in plain text:
>
> File repetidas:
>
> usr/bin/mysql -u sipwise --password=arsa <
> /root/limpieza/repetidas.sql2 >> /root/limpieza/registro.txt
> /usr/bin/mysql -u sipwise --password=arsa <
> /root/limpieza/repetidas.sql > /root/limpieza/repetidas.txt /bin/bash
> /root/limpieza/borrar_repetidas /root/limpieza/repetidas.txt
> /usr/bin/mysql -u sipwise --password=arsa < /root/limpieza/borrar.sql
> /bin/echo "$(($(date +%s)/3600%24))":"$(($(date
> +%s)/60%60))":"$(($(date +%s)%60))"" realizado" >>
> /root/limpieza/registro.txt /bin/touch /root/limpieza/repetidas.txt cp
> -R /var/lib/my/ /var/db/
>
> File repetidas.sql2:
>
> select id,call_type,init_time,source_external_subscriber_id,
> destination_user_dialed,customer_cost,call_id
> ,update_time,count(call_id) as count from accounting.cdr where
> call_type='call' group by call_id having count(*) > 1 ORDER BY id;
>
> File repetidas.sql:
>
> select id from accounting.cdr where call_type='call' group by call_id
> having count(*) > 1 ORDER BY id;
>
> File borrar_repetidas:
>
> !/bin/bash
> declare -a ARRAY
> # leemos archivo
> exec < $1
> let count=0
> while read LINE; do
> ARRAY[$count]=$LINE
> ((count++))
> done
> #echo Number of elements: ${#ARRAY[@]}
> #borramos llamadas repetidas
> max=${#ARRAY[@]}
> for i in `seq 2 $max`
> do
> echo "delete from accounting.cdr where id='"${ARRAY[$i-1]}"';" >>
> /root/limpieza/borrar.sql done # restore stdin from filedescriptor 10 #
> and close filedescriptor 10 #exec 0<&10 10<&-
>
>
> That are the files than i used to clean the mysql tables.
> I put all the files in /root , and i put file repetidas in cron every
> one hour.
> Put all the log in /root/limpieza/registro.txt, for control the deleted
> CDRs.
>
> Cheers,
> Anibal
>
> El 04/04/2013, a las 22:26, Andreas Granig <agranig at sipwise.com>
> escribió:
>
> > Hi,
> >
> > On 04/04/2013 07:43 PM, Kevin Masse wrote:
> >> Thank you for the valuable input Mario, currently it is on a
> dedicated system and our programmers have just reworked what we pull
> for records making sure we have (distinct(start_time)) and this allowed
> us to move forward without the duplicates.
> >
> > This will break correct billing for call forwards, as there are two
> records with the same start time, but different call types (one call,
> and one (or more) cfb or cft or similar).
> >
> > We'll look into mediator to check whether we can reproduce this
> double-bye -> duplicate cdr issue.
> >
> > Andreas
> >
> > _______________________________________________
> > Spce-user mailing list
> > Spce-user at lists.sipwise.com
> > http://lists.sipwise.com/listinfo/spce-user
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2904 / Virus Database: 2641/6218 - Release Date:
> 04/01/13
More information about the Spce-user
mailing list