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