<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Hi again,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Thank you for the information.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Yes, the delay is happening between the select rpid queries. So I see the request/responses from open sips DB immediately and then 10 seconds “void”, before next query.</div>
<div><font face="Calibri,sans-serif">The search resolves in two different flows and the timeout is 10 s for both of them. I see ‘outgoing’ flow and '</font><font face="Menlo" size="2">on-net-diverted-off-net’ flow.</font></div>
<div>php5-geoip seems to lookup the correct country when testing a lookup of an ip address with a simple php script.</div>
<div><br>
</div>
<div>I tried to add some debug info in the rating class, but now I suddenly got another problem with CDRTool starting to get connection reset to the rating engine. Seems like the ratingEngine stops when trying to do a search.</div>
<div>I am investigating this atm.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Tomas</div>
<div><br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>&lt;<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>&gt; on behalf of Tijmen de Mes<br>
<span style="font-weight:bold">Reply-To: </span>OpenSIPS users mailling list<br>
<span style="font-weight:bold">Date: </span>Monday 30 November 2015 at 16:19<br>
<span style="font-weight:bold">To: </span>OpenSIPS users mailling list<br>
<span style="font-weight:bold">Subject: </span>Re: [OpenSIPS-Users] CDR search slow in CDRTool<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi,
<div class=""><br class="">
</div>
<div class="">As for the usability questions, from trusted peers it matches the ip to a reseller so this can be billed. The subscriber table is used to find the RPID from the local caller and get quotas.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">As for the delay, to me it sounds like a timeout of some sort if it is 10s each time. So you see the delay after this query? Can you tell me what it shows for ‘flow', and does the delay change based on the flow?</div>
<div class=""><br class="">
</div>
<div class="">Also does php5-geoip work?</div>
<div class=""><br class="">
</div>
<div class="">Best regards,</div>
<div class=""><br class="">
</div>
<div class="">Tijmen de Mes</div>
<div class="">—</div>
<div class="">AG Projects</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 30 nov. 2015, at 13:43, Tomas Andersen &lt;<a href="mailto:tomas.andersen@ipco.no" class="">tomas.andersen@ipco.no</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">
<div class="">Sorry for “spamming” the list, but the sql query request/response itself to the subscriber list is fast.</div>
<div class="">So as you say there must be some more logic before the next caller is checked that takes time.</div>
<div class="">CDRTool “waits” 10 seconds between each query.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Tomas</div>
<div class=""><br class="">
</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 12pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>&lt;<a href="mailto:users-bounces@lists.opensips.org" class="">users-bounces@lists.opensips.org</a>&gt; on behalf of Tomas Andersen<br class="">
<span style="font-weight:bold" class="">Reply-To: </span>OpenSIPS users mailling list<br class="">
<span style="font-weight:bold" class="">Date: </span>Monday 30 November 2015 at 13:31<br class="">
<span style="font-weight:bold" class="">To: </span>OpenSIPS users mailling list<br class="">
<span style="font-weight:bold" class="">Subject: </span>Re: [OpenSIPS-Users] CDR search slow in CDRTool<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">
<div class="">Hi.</div>
<div class=""><br class="">
</div>
<div class="">Thank you for responding. I have now tried to add the parameter you specified in my global.inc file. I have also added “skipNormalize” =&gt; 1.</div>
<div class="">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..</div>
<div class="">as they already are normalized..?</div>
<div class=""><br class="">
</div>
<div class="">By checking wireshark, the calls to OpenSIPS db still searches for rpid in the subscriber table and each call takes 10 minutes.</div>
<div class="">The latest search i did now resulted in 8 CDRs and the search took 8x10seconds = 1m 20s.</div>
<div class=""><br class="">
</div>
<div class="">My concern is that CDRTool relies on a strict way to use OpenSIPS, as it need certain tables to be filled out?</div>
<div class=""><br class="">
</div>
<div class="">We have made another approach to OpenSIPS and are using the grp table for listing our subscribers (not the subscriber table).</div>
<div class="">We are also using dr_gateways to list our external Gateways (e.g other SIP servers or external GWs).</div>
<div class=""><br class="">
</div>
<div class="">We do not use the trusted_peers or subscriber tables which I see are queried from cdrtool.</div>
<div class=""><br class="">
</div>
<div class="">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).</div>
<div class=""><br class="">
</div>
<div class="">Do you see any limitations based on how we use OpenSIPS?&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">I really appreciate if you could assist me in the question.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Tomas Andersen</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 12pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>&lt;<a href="mailto:users-bounces@lists.opensips.org" class="">users-bounces@lists.opensips.org</a>&gt; on behalf of Tijmen de Mes<br class="">
<span style="font-weight:bold" class="">Reply-To: </span>OpenSIPS users mailling list<br class="">
<span style="font-weight:bold" class="">Date: </span>Monday 30 November 2015 at 13:01<br class="">
<span style="font-weight:bold" class="">To: </span>OpenSIPS users mailling list<br class="">
<span style="font-weight:bold" class="">Subject: </span>Re: [OpenSIPS-Users] CDR search slow in CDRTool<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Tomas,
<div class=""><br class="">
</div>
<div class="">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.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">If web normalizing is enabled and the call is not normalized, &nbsp;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.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">To disable it add to the opensips datasource in global.inc: &nbsp;&quot;skipNormalizeOnPageLoad&quot; =&gt; 1</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best regards,</div>
<div class=""><br class="">
</div>
<div class="">Tijmen de Mes</div>
<div class="">—</div>
<div class="">AG Projects</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 30 nov. 2015, at 10:26, Tomas Andersen &lt;<a href="mailto:tomas.andersen@ipco.no" class="">tomas.andersen@ipco.no</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">
<div class="">Hi again.</div>
<div class=""><br class="">
</div>
<div class="">I have set up wireshark to check why the CDR rating engine uses so much time.</div>
<div class=""><br class="">
</div>
<div class="">The following SQL queries are run from CDRTool to my OpenSIPS server:</div>
<div class="">select * from domain;</div>
<div class="">select * from trusted_peers;</div>
<div class="">Select rpid from subscriber where username = ‘&#43;47xxxxxxxx’ and domain = ‘<a href="http://example.sip.com/" class="">example.sip.com</a>’</div>
<div class=""><br class="">
</div>
<div class="">(with username and domain scrambled here)</div>
<div class=""><br class="">
</div>
<div class="">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</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">My subscriber table in open sips is empty. Why does this take so long?</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Tomas Andersen</div>
<div class=""><br class="">
</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 12pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>Tomas Andersen<br class="">
<span style="font-weight:bold" class="">Date: </span>Friday 27 November 2015 at 09:10<br class="">
<span style="font-weight:bold" class="">To: </span>&quot;<a href="mailto:users@lists.opensips.org" class="">users@lists.opensips.org</a>&quot;<br class="">
<span style="font-weight:bold" class="">Subject: </span>CDR search slow in CDRTool<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">Hi</div>
<div class=""><br class="">
</div>
<div class="">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&nbsp;</div>
<div class="">CDRTool GUI it takes 1-3 minutes before the search result window is shown.</div>
<div class=""><br class="">
</div>
<div class="">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,</div>
<div class="">Database connection pool problems or just some configuration error somewhere.</div>
<div class=""><br class="">
</div>
<div class="">In my browser I get the following in my developer console / network (note the huge duration for the HTTP POST):</div>
<div class=""><br class="">
</div>
<div class="">200 POST<span class="Apple-tab-span" style="white-space:pre"> </span>
callsearch.pthml<span class="Apple-tab-span" style="white-space:pre"></span>&lt;destip&gt;<span class="Apple-tab-span" style="white-space:pre"></span>html<span class="Apple-tab-span" style="white-space:pre"></span>105.41 kb<span class="Apple-tab-span" style="white-space:pre"></span>150212
 ms</div>
<div class="">200 GET<span class="Apple-tab-span" style="white-space:pre"> </span>
date picker.css<span class="Apple-tab-span" style="white-space:pre"></span>&lt;destip&gt;<span class="Apple-tab-span" style="white-space:pre"></span>css<span class="Apple-tab-span" style="white-space:pre"></span>9.96 kb<span class="Apple-tab-span" style="white-space:pre"></span>14
 ms</div>
<div class=""><br class="">
</div>
<div class="">Followed by several lines of&nbsp;</div>
<div class="">304 GETs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">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..</div>
<div class="">After 2m 38 seconds everything is suddenly released and some HTTP GETs make the page to update.</div>
<div class=""><br class="">
</div>
<div class="">I see nothing in syslog (from cdrtool) but some mysql connection statements.. No lock/unlock or similar statements..</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">I appreciate if anyone could enlighten me on this subject.</div>
<div class=""><br class="">
</div>
</div>
<div class=""><br class="">
</div>
<div class="">Best Regards,</div>
<div class="">Tomas Andersen</div>
<div class="">&nbsp;</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
</div>
</span></div>
_______________________________________________<br class="">
Users mailing list<br class="">
<a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class="">
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" class="">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</span></div>
</div>
</span></div>
_______________________________________________<br class="">
Users mailing list<br class="">
<a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class="">
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</span>
</body>
</html>