<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Call history plugin loses database connection]]></title><description><![CDATA[<p dir="auto">Plugin Call History loses connection to database from time to time. I installed call history plugin and it seems to work erratically. It works for a few hours and then it says: No records found. After I logout and login again, the data is there again. Is this a known bug? I use Version 2.30.02</p>
]]></description><link>http://localhost:4567/topic/2122/call-history-plugin-loses-database-connection</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 00:40:18 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/2122.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Dec 2015 08:18:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Call history plugin loses database connection on Fri, 13 May 2016 17:18:02 GMT]]></title><description><![CDATA[<p dir="auto">The post you mention talks about a dummy call made when you drag a call out from a queue in FOP2, those calls won't show up on call history in FOP2 in any way as the source channel is a dummy channel of type Local/xxxx and not a device (either sip or pjsip).</p>
<p dir="auto">If you run the query you see on the calldetails php file and see any particular result, the same results you should see in the results from the .php itself. Hard to tell what is going on without looking at the actual queries performed by calldetailrecords.php and results from your cdr tables.</p>
]]></description><link>http://localhost:4567/post/9356</link><guid isPermaLink="true">http://localhost:4567/post/9356</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 13 May 2016 17:18:02 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Fri, 13 May 2016 14:51:00 GMT]]></title><description><![CDATA[<p dir="auto">We followed this post, but it seems our file is already including the fix you proposed for another customer, so the dummy must be coming from somewhere else.<br />
<a href="http://forum.fop2.com/1331-pickup-call-function-cause-dummy-entry-in-database/0" rel="nofollow ugc">http://forum.fop2.com/1331-pickup-call-function-cause-dummy-entry-in-database/0</a></p>
<p dir="auto">that's where I found it.<br />
It's in /etc/asterisk/extensions_override_fop2.conf<br />
[fop2-dummy]<br />
exten =&gt; dummy,1,Answer<br />
exten =&gt; dummy,n,Wait(1)<br />
exten =&gt; dummy,n,NoCDR()<br />
exten =&gt; dummy,n,Hangup</p>
<p dir="auto">I also commented out #push @allreturn, $return; in <a href="http://FOP2Callbacks.pm" rel="nofollow ugc">FOP2Callbacks.pm</a> in the LEAVE section. Will see if that resolves it. Sorry to make so many posts! This helps me keep track of what I tried and when haha</p>
]]></description><link>http://localhost:4567/post/9355</link><guid isPermaLink="true">http://localhost:4567/post/9355</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Fri, 13 May 2016 14:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Fri, 13 May 2016 14:31:39 GMT]]></title><description><![CDATA[<p dir="auto">Additionally, we are seeing outbound calls show up as dummy when the call history is not showing recent calls.</p>
]]></description><link>http://localhost:4567/post/9354</link><guid isPermaLink="true">http://localhost:4567/post/9354</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Fri, 13 May 2016 14:31:39 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Fri, 13 May 2016 14:27:56 GMT]]></title><description><![CDATA[<p dir="auto">We needed to custom edit the call detail records for PJSIP. Since a recent upgrade, the call history has not been working right (in both the plugin button and the popup). Sometimes it correctly shows call history, other times, it seems to show only calls that happened before the upgrade happened (14 days ago in this case). I can't get to the bottom of it. I recreated the query from plugings/callhistory/callhistorybsgrid.php for this particular extension, and all of the recent calls pull up fine from the query. But currently, the plugin button is not showing the same data.</p>
<p dir="auto">SELECT calldate,concat(IF(dst='".6603."' OR dstchannel LIKE 'PJSIP/6603-<strong><strong><strong><strong>' ,src,dst),'!',clid) as number,duration,disposition,uniqueid FROM cdr WHERE (src='6603' OR channel LIKE 'PJSIP/6603-</strong></strong></strong></strong>') order by calldate desc limit 50;</p>
]]></description><link>http://localhost:4567/post/9353</link><guid isPermaLink="true">http://localhost:4567/post/9353</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Fri, 13 May 2016 14:27:56 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 30 Mar 2016 14:32:56 GMT]]></title><description><![CDATA[<p dir="auto">We seem to have resolved our issue. Since we have PJSIP extensions, I updated these two files:<br />
/var/www/html/fop2/admin/plugins/callhistory/callhistorybsgrid.php<br />
&amp;<br />
/var/www/html/fop2/calldetailrecords.php</p>
<p dir="auto">Find all instances of SIP/ and change them to PJSIP, I think there are 5 in each file. This seems to be wokring for me just fine. I believe a future FOP2 update may account for both types.<br />
Thanks Nicolas.</p>
]]></description><link>http://localhost:4567/post/9352</link><guid isPermaLink="true">http://localhost:4567/post/9352</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Wed, 30 Mar 2016 14:32:56 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Mon, 28 Mar 2016 12:31:02 GMT]]></title><description><![CDATA[<p dir="auto">Having trunks as SIP should not make a difference. Having mixed SIP/PJSIP extensions could. The condition is to match only extensions, as the cdr page is only interested in finding records that could be matched to an extension either as a src/channel or dst/dstchannel. src and dst are extension NUMBERS, channel/destchannel are extension DEVICES. The SIP/xxxx-_____ construction is done only on the device field. So, if you use PJSIP and the channel name in the CDR matches the convention of SIP, then just changing SIP to PJSIP in the conditional should be enough. The channel name convention used for the SQL query is</p>
<p dir="auto">TECH/EXTENSION-12345678</p>
<p dir="auto">Where 12345678 is the random session string. So the LIKE sql query is SIP/$extension-________ by default, and changing it to PJSIP/xxx should be enough. Check to see in the CDR entries if the session part is 8 chars long. They query will also use the $extension variable/number in the channel name, that should exclude any entry for a trunk that will generally have a name or an ip address instead.</p>
<p dir="auto">Try to catch me on the live help, if you can give me access to your server I can inspect the CDR and mysql queries and see if we can come up with the correct one.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/9351</link><guid isPermaLink="true">http://localhost:4567/post/9351</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Mon, 28 Mar 2016 12:31:02 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 23 Mar 2016 22:38:26 GMT]]></title><description><![CDATA[<p dir="auto">This is doubly confusing because we have a pjsip inbound trunk, and a sip outbound trunk! I am lost trying to construct the correct query here to get all the calls without getting some bogus stuff.<br />
Hope you can help!</p>
]]></description><link>http://localhost:4567/post/9350</link><guid isPermaLink="true">http://localhost:4567/post/9350</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Wed, 23 Mar 2016 22:38:26 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 23 Mar 2016 21:59:23 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, this pointed me in the right direction. After doing some digging, I unearthed the difference in the query results, and found that we were not getting all of the results because our voip 'channel' is actually a PJSIP channel, rather than a SIP channel.</p>
<p dir="auto">After changing it in both places in the the $mifilt IF statement within calldetailrecords.php, I'm now seeing what might be all the calls. Is there anywhere else in the file this should be updated?</p>
<p dir="auto">Maybe we could add a wildcard in front of the SIP to account for either voip setting?<br />
Kevin</p>
]]></description><link>http://localhost:4567/post/9349</link><guid isPermaLink="true">http://localhost:4567/post/9349</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Wed, 23 Mar 2016 21:59:23 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 23 Mar 2016 19:17:20 GMT]]></title><description><![CDATA[<p dir="auto">Perhaps your CDR records do not have a channel and dstchannel fields matching the ones expected in FOP2 relating your own extension. This is the where condition to search for records:</p>
<p dir="auto">(src='$extension' OR channel LIKE 'SIP/$extension-<strong><strong><strong><strong>' OR dst='$extension' OR dstchannel LIKE 'SIP/$extension-</strong></strong></strong></strong>' )</p>
<p dir="auto">where $extension is your extension number, like '100'.</p>
<p dir="auto">That would be something like</p>
<p dir="auto">SELECT * FROM cdr WHERE (src='100' OR channel LIKE 'SIP/100-<strong><strong><strong><strong>' OR dst='100' OR dstchannel LIKE 'SIP/100-</strong></strong></strong></strong>' )</p>
<p dir="auto">You can run that query directly via mysql and see if it retrieves anything. If you have CDR constructed in a different way, then you will need to customize that query/code in the calldetailrecords.php file.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/9348</link><guid isPermaLink="true">http://localhost:4567/post/9348</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Wed, 23 Mar 2016 19:17:20 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 23 Mar 2016 01:56:01 GMT]]></title><description><![CDATA[<p dir="auto">That command returns no entries in the log. I do return errors in the log when I search for some other text, so the log is working.</p>
<p dir="auto">When I check CDR Reports in freepbx, I am able to see two outbound calls that I made today, but these aren't present in the FOP2 History.</p>
]]></description><link>http://localhost:4567/post/9347</link><guid isPermaLink="true">http://localhost:4567/post/9347</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Wed, 23 Mar 2016 01:56:01 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 23 Mar 2016 00:10:27 GMT]]></title><description><![CDATA[<p dir="auto">Call history data comes straight from the Mysql CDR table that is populated and mantained by asterisk, not by FOP2. It sounds like your Mysql CDR is broken in Asterisk itself. Grep for "cdr_mysql" in the full log:</p>
<p dir="auto">grep cdr_mysql /var/log/asterisk/full</p>
<p dir="auto">To check for errors... if you have problems with cdr, it is<em>not</em> related with FOP2 at all.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/9346</link><guid isPermaLink="true">http://localhost:4567/post/9346</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Wed, 23 Mar 2016 00:10:27 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Tue, 22 Mar 2016 22:58:08 GMT]]></title><description><![CDATA[<p dir="auto">The Call History is populating, both in the Button and in the Profile Drop Down&gt;History Window, but it is populating only with old information.</p>
<p dir="auto">It shows my last Incoming call was 11 days ago, when it should be today, and it shows my last Outgoing call as 6 days ago, when it should be today. Other users on my installation are seeing similar information.</p>
<p dir="auto">Thanks for the help!</p>
]]></description><link>http://localhost:4567/post/9345</link><guid isPermaLink="true">http://localhost:4567/post/9345</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Tue, 22 Mar 2016 22:58:08 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Tue, 22 Mar 2016 22:20:05 GMT]]></title><description><![CDATA[<p dir="auto">What do you mean with "update"? A failed mysql connection will display nothing in the CDR , instead of "lost" the connection after a while.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/9344</link><guid isPermaLink="true">http://localhost:4567/post/9344</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 22 Mar 2016 22:20:05 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Tue, 22 Mar 2016 16:54:28 GMT]]></title><description><![CDATA[<p dir="auto">How long did you set gc lifetime?</p>
<p dir="auto">My history is not updating either. I've restarted my computer, which should initiate a new PHP session anyway, but it still does not update.  FOP2 2.30.04, FreePBX 13.0.70</p>
<p dir="auto">I just checked in freepbx under Reports&gt;phpinfo and see:<br />
session.gc_maxlifetime:	local value: 2592000	master value:  1440</p>
<p dir="auto">Should I set the master longer, to equal the local value?</p>
]]></description><link>http://localhost:4567/post/9343</link><guid isPermaLink="true">http://localhost:4567/post/9343</guid><dc:creator><![CDATA[kelmore]]></dc:creator><pubDate>Tue, 22 Mar 2016 16:54:28 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Mon, 21 Dec 2015 07:23:25 GMT]]></title><description><![CDATA[<p dir="auto">That it was, after setting the gc lifetime longer, the issue is gone. Thank you so much <img src="http://localhost:4567/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=9c14fadbfa0" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>http://localhost:4567/post/9342</link><guid isPermaLink="true">http://localhost:4567/post/9342</guid><dc:creator><![CDATA[rennes]]></dc:creator><pubDate>Mon, 21 Dec 2015 07:23:25 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Thu, 10 Dec 2015 15:18:02 GMT]]></title><description><![CDATA[<p dir="auto">That is a php session issue then. It seems PHP sessions  expire after some time in your setup/environment. You might want to increase session gc lifetime in php.ini or see if you have any external processes that clears session data after a while, and prevent them from doing so that often.</p>
]]></description><link>http://localhost:4567/post/9341</link><guid isPermaLink="true">http://localhost:4567/post/9341</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Thu, 10 Dec 2015 15:18:02 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Thu, 10 Dec 2015 13:53:46 GMT]]></title><description><![CDATA[<p dir="auto">I had commented out these lines, as recommended in other thread in this forum:</p>
<p dir="auto">if($allowed &lt;&gt; "yes") {<br />
echo "&lt;div class='container-fluid text-center'&gt;&lt;br/&gt;&lt;h3 class='animated tada'&gt;You do not have permissions to access this resource&lt;/h3&gt;&lt;/div&gt;";<br />
die();<br />
}</p>
<p dir="auto">Now when I commented this back in, I get "You do not have permissions to access this resource"<br />
I also noticed, that when I had seemingly working plugin (calls where there etc) when I reloaded the frame, I ended up with no data.</p>
]]></description><link>http://localhost:4567/post/9340</link><guid isPermaLink="true">http://localhost:4567/post/9340</guid><dc:creator><![CDATA[rennes]]></dc:creator><pubDate>Thu, 10 Dec 2015 13:53:46 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Thu, 10 Dec 2015 13:52:00 GMT]]></title><description><![CDATA[<p dir="auto">Ok.. .perhaps the problem is a different one? Perhaps php session variables are reset/expired by your php.ini configuration?</p>
]]></description><link>http://localhost:4567/post/9339</link><guid isPermaLink="true">http://localhost:4567/post/9339</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Thu, 10 Dec 2015 13:52:00 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Thu, 10 Dec 2015 13:41:10 GMT]]></title><description><![CDATA[<p dir="auto">I'll check the apache logs next time it happens, to see if and what it reloads</p>
]]></description><link>http://localhost:4567/post/9338</link><guid isPermaLink="true">http://localhost:4567/post/9338</guid><dc:creator><![CDATA[rennes]]></dc:creator><pubDate>Thu, 10 Dec 2015 13:41:10 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Thu, 10 Dec 2015 13:27:16 GMT]]></title><description><![CDATA[<p dir="auto">Then it does not make sense. Refreshing the iframe will reload the php file responsible for that, and the php file, when run, will open a new mysql connection every time. If its a mysql connection that stalls, then a refresh will "heal" it, everytime.</p>
]]></description><link>http://localhost:4567/post/9337</link><guid isPermaLink="true">http://localhost:4567/post/9337</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Thu, 10 Dec 2015 13:27:16 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Thu, 10 Dec 2015 09:51:24 GMT]]></title><description><![CDATA[<p dir="auto">Just tried it, no it didn't fix the problem. Data only comes back when I refresh the whole page.  At the same time also the recordings page shows "no records"</p>
]]></description><link>http://localhost:4567/post/9336</link><guid isPermaLink="true">http://localhost:4567/post/9336</guid><dc:creator><![CDATA[rennes]]></dc:creator><pubDate>Thu, 10 Dec 2015 09:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to Call history plugin loses database connection on Wed, 09 Dec 2015 15:45:29 GMT]]></title><description><![CDATA[<p dir="auto">It is not a known bug. What happens if you right click and refresh the frame source when you notice the problem? Do records show up when the frame is refreshed?</p>
]]></description><link>http://localhost:4567/post/9335</link><guid isPermaLink="true">http://localhost:4567/post/9335</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Wed, 09 Dec 2015 15:45:29 GMT</pubDate></item></channel></rss>