[Spce-user] cdr error

David Martínez davidmlafuente at gmail.com
Mon May 29 11:25:59 EDT 2017


Could you tell me some points to get stated with that package?

Thank you!

On 29 may 2017 16:48 +0200, Rene Krenn <rkrenn at sipwise.com>, wrote:
> > I do a select on kamailio.acc table filtering ... and it returns 67000+
> rows from 169000 rows that table has.
>
> thats by far too much (due to long suspension) and the reason why your
> mediator has problems to come up again. as it seems you have test
> records only, you could empty that table and mediator should work again.
>
> instead of deleting, you could move it to acc_trash temporarly, there is
> a tool (see bulk-processor package) to put them back to kamailio.acc in
> doses, so your (not up-to-date) mediator will be able to handle it.
>
> regards, rene
>
> On Mon, 2017-05-29 at 16:24 +0200, David Martínez wrote:
> > Hi,
> >
> >
> > Sql statement returns:
> >
> >
> > mysql> select count(*) from accounting.cdr;
> > +----------+
> > | count(*) |
> > +----------+
> > | 8877 |
> > +----------+
> > 1 row in set (0.00 sec)
> >
> >
> > When i select last row from cdr table, it returns:
> >
> >
> >
> >
> > mysql> select * from accounting.cdr order by start_time desc limit 1\G
> > *************************** 1. row ***************************
> > id: 10946
> > update_time: 2017-04-04 11:55:03
> > source_user_id:
> > 45542209-1c07-4069-bb9b-f8ed9d11c560
> > source_provider_id: 2
> > source_external_subscriber_id:
> > source_external_contract_id: 0003597001
> > source_account_id: 261
> > source_user: 0003597001
> > source_domain: sip00.XXXXXXX.com
> > source_cli: XXXXXXXXXXX
> > source_clir: 0
> > source_ip: 10.0.17.48
> > source_gpp0: NULL
> > source_gpp1: NULL
> > source_gpp2: NULL
> > source_gpp3: NULL
> > source_gpp4: NULL
> > source_gpp5: NULL
> > source_gpp6: NULL
> > source_gpp7: NULL
> > source_gpp8: NULL
> > source_gpp9: NULL
> > destination_user_id: 0
> > destination_provider_id: 5
> > destination_external_subscriber_id:
> > destination_external_contract_id:
> > destination_account_id: 0
> > destination_user: XXXXXXXXXXX
> > destination_domain: YYY.YYY.YYY.YYY
> > destination_user_dialed: XXXXXXXXXX
> > destination_user_in: XXXXXXXXXX
> > destination_domain_in: sip00.XXXXX.com
> > destination_gpp0: NULL
> > destination_gpp1: NULL
> > destination_gpp2: NULL
> > destination_gpp3: NULL
> > destination_gpp4: NULL
> > destination_gpp5: NULL
> > destination_gpp6: NULL
> > destination_gpp7: NULL
> > destination_gpp8: NULL
> > destination_gpp9: NULL
> > peer_auth_user:
> > peer_auth_realm:
> > call_type: call
> > call_status: ok
> > call_code: 200
> > init_time: 1491298656.210
> > start_time: 1491298679.704
> > duration: 2.873
> > call_id: 907020824-5060-14 at BA.A.BH.EI
> > source_carrier_cost: 0.166600
> > source_reseller_cost: 0.166600
> > source_customer_cost: 0.166600
> > source_carrier_free_time: 0
> > source_reseller_free_time: 0
> > source_customer_free_time: 0
> > source_carrier_billing_fee_id: 41270
> > source_reseller_billing_fee_id: 41270
> > source_customer_billing_fee_id: 41270
> > source_carrier_billing_zone_id: 2094
> > source_reseller_billing_zone_id: 2094
> > source_customer_billing_zone_id: 2094
> > destination_carrier_cost: 0.000000
> > destination_reseller_cost: 0.000000
> > destination_customer_cost: 0.000000
> > destination_carrier_free_time: 0
> > destination_reseller_free_time: 0
> > destination_customer_free_time: 0
> > destination_carrier_billing_fee_id: NULL
> > destination_reseller_billing_fee_id: NULL
> > destination_customer_billing_fee_id: NULL
> > destination_carrier_billing_zone_id: NULL
> > destination_reseller_billing_zone_id: NULL
> > destination_customer_billing_zone_id: NULL
> > frag_carrier_onpeak: NULL
> > frag_reseller_onpeak: NULL
> > frag_customer_onpeak: NULL
> > is_fragmented: NULL
> > split: 0
> > rated_at: 2017-04-04 11:38:16
> > rating_status: ok
> > exported_at: 2017-04-04 11:55:03
> > export_status: ok
> > 1 row in set (0.09 sec)
> >
> >
> >
> > Searching kamailio-proxy.log, the only strange thing i see is this
> > line:
> >
> >
> > Apr 4 11:37:36 sip00 proxy[11007]: NOTICE: <script>: Setting acc
> > destination-leg for uuid '0': '0|||0|XXXXXXXXX|0|YYYYYYYYYYY|
> > ZZZ.ZZZ.ZZZ.ZZ|YYYYYYYYYYY|sip00.XXXXXXXX.com|1|||||||||||' -
> > R=sip:YYYYYYYYYYY at ZZZ.ZZZ.ZZZ.ZZZ:5060;transport=udp
> > ID=907020824-5060-14 at BA.A.BH.EI UA='Grandstream HT701 1.0.8.2'
> >
> >
> >
> > where it's appear that acc dst-leg is not set.
> >
> >
> > I do a select on kamailio.acc table filtering where rows have blank
> > dst_leg, and it returns 67000+ rows from 169000 rows that table has.
> >
> >
> > I don't know what is next step.
> >
> >
> > Regards
> >
> >
> >
> >
> >
> >
> >
> > On 29 may 2017 14:43 +0200, Andreas Granig <agranig at sipwise.com>,
> > wrote:
> > > Hi,
> > >
> > > You can try a "select count(*) from accounting.cdr" in MySQL to see
> > > how
> > > many records you have there, since this is where mediator puts its
> > > results to. Fetch some random ones and check them in detail, e.g.
> > > taking
> > > the call_id column and grep for it in kamailio-proxy.log to see
> > > what's
> > > going on.
> > >
> > > Andreas
> > >
> > > On 05/29/2017 01:06 PM, David Martínez wrote:
> > > > Hi,
> > > >
> > > > Since some days ago, cdr stops working. Seeing whats happening I
> > > > noticed
> > > > that mediator service was not running. So i started it and then i
> > > > see
> > > > this on cdr.log file:
> > > >
> > > > /May 24 13:31:31 sip00 mediator[28631]: Locking process./
> > > > /May 24 13:31:31 sip00 mediator[28631]: Daemonizing process./
> > > > /May 24 13:31:31 sip00 mediator[28632]: Writing pid file./
> > > > /May 24 13:31:31 sip00 mediator[28632]: ACC acc database
> > > > host='localhost', port='3306', user='kamailio', name='kamailio'/
> > > > /May 24 13:31:31 sip00 mediator[28632]: CDR acc database
> > > > host='localhost', port='3306', user='mediator', name='accounting'/
> > > > /May 24 13:31:31 sip00 mediator[28632]: PROV database
> > > > host='localhost',
> > > > port='3306', user='mediator', name='provisioning'/
> > > > /May 24 13:31:31 sip00 mediator[28632]: STATS database
> > > > host='localhost',
> > > > port='3306', user='mediator', name='stats'/
> > > > /May 24 13:31:31 sip00 mediator[28632]: Setting up mysql
> > > > connections./
> > > > /May 24 13:31:31 sip00 mediator[28632]: Up and running,
> > > > daemonized=1,
> > > > pid-path='/var/run/mediator.pid', interval=10/
> > > > /May 24 13:37:12 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 24 13:37:22 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 24 13:37:32 sip00 mediator[28632]: Overall 93418 CDRs created
> > > > so far./
> > > > /May 24 13:43:06 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 24 13:43:16 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 24 13:43:26 sip00 mediator[28632]: Overall 186855 CDRs
> > > > created so far./
> > > >
> > > > After some days, i see that log says:
> > > >
> > > > /May 29 11:06:31 sip00 mediator[28632]: Overall 118815884 CDRs
> > > > created
> > > > so far./
> > > > /May 29 11:13:55 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:14:05 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:14:15 sip00 mediator[28632]: Overall 118916574 CDRs
> > > > created
> > > > so far./
> > > > /May 29 11:21:10 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:21:20 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:21:30 sip00 mediator[28632]: Overall 119017291 CDRs
> > > > created
> > > > so far./
> > > > /May 29 11:28:18 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:28:28 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:28:38 sip00 mediator[28632]: Overall 119118049 CDRs
> > > > created
> > > > so far./
> > > > /May 29 11:34:32 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:34:42 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:34:52 sip00 mediator[28632]: Overall 119218842 CDRs
> > > > created
> > > > so far./
> > > > /May 29 11:41:24 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:41:34 sip00 mediator[28632]: Lost connection to SQL
> > > > server
> > > > during query, retrying.../
> > > > /May 29 11:41:44 sip00 mediator[28632]: Overall 119319664 CDRs
> > > > created
> > > > so far./
> > > > /
> > > > /
> > > > /
> > > > /
> > > > I think that our system is too young to have that number of calls,
> > > > so i
> > > > search log file when mediator stops and i see:
> > > >
> > > > /Apr 4 11:38:08 sip00 mediator[3948]: Overall 3038 CDRs created so
> > > > far./
> > > > /Apr 4 11:38:32 sip00 mediator[3948]: Overall 3039 CDRs created so
> > > > far./
> > > > /Apr 4 11:38:45 sip00 mediator[3948]: Overall 3040 CDRs created so
> > > > far./
> > > > /Apr 4 11:38:58 sip00 mediator[3948]: Error getting acc callids:
> > > > Server
> > > > shutdown in progress/
> > > > /Apr 4 11:38:58 sip00 mediator[3948]: Shutting down./
> > > > /Apr 4 11:38:58 sip00 mediator[3948]: Successfully shut down./
> > > > /Apr 4 11:38:58 sip00 mediator[3948]: Unlocking mediator./
> > > > /
> > > > /
> > > > / /I searched on mailing list (using google cache, because server
> > > > is
> > > > down now) and i didn’t found how to debug mediator.
> > > >
> > > > Can anyone help?
> > > >
> > > > Regards
> > > >
> > > >
> > > > _______________________________________________
> > > > Spce-user mailing list
> > > > Spce-user at lists.sipwise.com
> > > > https://lists.sipwise.com/listinfo/spce-user
> > > >
> > > _______________________________________________
> > > Spce-user mailing list
> > > Spce-user at lists.sipwise.com
> > > https://lists.sipwise.com/listinfo/spce-user
> > _______________________________________________
> > Spce-user mailing list
> > Spce-user at lists.sipwise.com
> > https://lists.sipwise.com/listinfo/spce-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20170529/d29f56a4/attachment-0001.html>


More information about the Spce-user mailing list