[OpenSIPS-Users] CDR search slow in CDRTool

Tomas Andersen tomas.andersen at ipco.no
Mon Nov 30 13:43:36 CET 2015


Sorry for “spamming” the list, but the sql query request/response itself to the subscriber list is fast.
So as you say there must be some more logic before the next caller is checked that takes time.
CDRTool “waits” 10 seconds between each query.

Regards,
Tomas


From: <users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>> on behalf of Tomas Andersen
Reply-To: OpenSIPS users mailling list
Date: Monday 30 November 2015 at 13:31
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] CDR search slow in CDRTool

Hi.

Thank you for responding. I have now tried to add the parameter you specified in my global.inc file. I have also added “skipNormalize” => 1.
The search does still use forever, and according to my RadiusAcct table all CDRs are already normalized, as the value is set to 1. I don’t see why it still should use that much time..
as they already are normalized..?

By checking wireshark, the calls to OpenSIPS db still searches for rpid in the subscriber table and each call takes 10 minutes.
The latest search i did now resulted in 8 CDRs and the search took 8x10seconds = 1m 20s.

My concern is that CDRTool relies on a strict way to use OpenSIPS, as it need certain tables to be filled out?

We have made another approach to OpenSIPS and are using the grp table for listing our subscribers (not the subscriber table).
We are also using dr_gateways to list our external Gateways (e.g other SIP servers or external GWs).

We do not use the trusted_peers or subscriber tables which I see are queried from cdrtool.

My hope was to use CDRTool to rate calls differently if the call is placed internally (userloc-userloc) or from an internal user to an external user (and then lookup destinations with country code).

Do you see any limitations based on how we use OpenSIPS?

I really appreciate if you could assist me in the question.

Regards,
Tomas Andersen

From: <users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>> on behalf of Tijmen de Mes
Reply-To: OpenSIPS users mailling list
Date: Monday 30 November 2015 at 13:01
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] CDR search slow in CDRTool

Hi Tomas,

That query should not take 10 seconds. Here it completes in 0.02s according to mysql. The query is used to determine the flow of the calls. After the query is executed in CDRTool, more logic follows. It can easily be that the delay is in there.

If web normalizing is enabled and the call is not normalized,  it will also try to normalize and rate the calls while searching. This can be disabled if you don’t need/want it. Perhaps you can disable this to check if this causes the delay.

To disable it add to the opensips datasource in global.inc:  "skipNormalizeOnPageLoad" => 1


Best regards,

Tijmen de Mes
—
AG Projects


On 30 nov. 2015, at 10:26, Tomas Andersen <tomas.andersen at ipco.no<mailto:tomas.andersen at ipco.no>> wrote:

Hi again.

I have set up wireshark to check why the CDR rating engine uses so much time.

The following SQL queries are run from CDRTool to my OpenSIPS server:
select * from domain;
select * from trusted_peers;
Select rpid from subscriber where username = ‘+47xxxxxxxx’ and domain = ‘example.sip.com<http://example.sip.com>’

(with username and domain scrambled here)

The rpid select statement is run for each caller in the search period. What is strange is that these selects are only run each 10 second, and if I am searching
Within a period of time and there has been 7 different callers, it will take 70 seconds. After this the GUI is “released” and updated with the maching CDR list.

My subscriber table in open sips is empty. Why does this take so long?

Regards,
Tomas Andersen


From: Tomas Andersen
Date: Friday 27 November 2015 at 09:10
To: "users at lists.opensips.org<mailto:users at lists.opensips.org>"
Subject: CDR search slow in CDRTool

Hi

I have set up CDRTool to read CDRs from my radius database for OpenSIP calls. I am successfully rating calls, but everytime I search for CDR records using the
CDRTool GUI it takes 1-3 minutes before the search result window is shown.

If there are no matching records the result window is shown immediately. Does anyone else have any experience with this? I suspect that there might be a database lock,
Database connection pool problems or just some configuration error somewhere.

In my browser I get the following in my developer console / network (note the huge duration for the HTTP POST):

200 POST callsearch.pthml<destip>html105.41 kb150212 ms
200 GET date picker.css<destip>css9.96 kb14 ms

Followed by several lines of
304 GETs


When checking with Wireshark I notice that after the HTTP POST to callsearch, I get several TCP Keep-Alive messages as the server is slow..
After 2m 38 seconds everything is suddenly released and some HTTP GETs make the page to update.

I see nothing in syslog (from cdrtool) but some mysql connection statements.. No lock/unlock or similar statements..

I appreciate if anyone could enlighten me on this subject.


Best Regards,
Tomas Andersen

_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151130/18a0684c/attachment.htm>


More information about the Users mailing list