<?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[FreePBX 2.10 bug]]></title><description><![CDATA[<p dir="auto">This seemed like the best place to report a bug.</p>
<p dir="auto">I'm using the latest fop 2.26 and there's an issue when generating the buttons</p>
<p dir="auto">The following code in <a href="http://autoconfig-buttons-freepbx.sh" rel="nofollow ugc">autoconfig-buttons-freepbx.sh</a> detects FreePBX version 2.10 incorrectly.</p>
<p dir="auto">AMPVERSION=<code>cat $AMPDIR | grep "&lt;version&gt;" | sed -e 's/&lt;[^&gt;]*&gt;//g' | cut -b 2,4</code><br />
if [ $AMPVERSION -gt 25 ]; then<br />
QUEUECONTEXT="from-queue"<br />
else<br />
QUEUECONTEXT="from-internal"<br />
fi</p>
<p dir="auto">Its looking for AMPVERSION greater than 25 for versions above 2.5. With FreePBX version 2.10 the string thats returned in AMPVERSION is 21 making it set the wrong queue context. This causes a few features to break.</p>
<p dir="auto">This is the only place I see this getting detected incorrectly. Not sure if anything in the fop2_server binary would be effected but it seems to be breaking my users ability to add/remove themselves from queues and pause/unpause.</p>
]]></description><link>http://localhost:4567/topic/1214/freepbx-2.10-bug</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 09:27:39 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/1214.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Jul 2012 20:10:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FreePBX 2.10 bug on Wed, 25 Jul 2012 20:09:23 GMT]]></title><description><![CDATA[<p dir="auto">Thanks again for finding/troubleshooting the issue! I will update fop2admin accordingly</p>
]]></description><link>http://localhost:4567/post/5477</link><guid isPermaLink="true">http://localhost:4567/post/5477</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Wed, 25 Jul 2012 20:09:23 GMT</pubDate></item><item><title><![CDATA[Reply to FreePBX 2.10 bug on Wed, 25 Jul 2012 14:25:37 GMT]]></title><description><![CDATA[<p dir="auto">The AMPVERSION string is being detected correctly now.</p>
<p dir="auto">The problem is the flash panel is still adding the agents with the wrong context.</p>
<p dir="auto">Here's the debug output showing incorrect context used.</p>
<p dir="auto">Response: Success<br />
Message: Added interface to queue<br />
Server: 0</p>
<p dir="auto">127.0.0.1       &lt;- Event: QueueMemberAdded<br />
127.0.0.1       &lt;- Privilege: agent,all<br />
127.0.0.1       &lt;- Queue: 8900<br />
127.0.0.1       &lt;- Location: Local/8090@from-internal/n<br />
127.0.0.1       &lt;- MemberName: Daves Sandbox<br />
127.0.0.1       &lt;- Membership: dynamic<br />
127.0.0.1       &lt;- Penalty: 0<br />
127.0.0.1       &lt;- CallsTaken: 0<br />
127.0.0.1       &lt;- LastCall: 0<br />
127.0.0.1       &lt;- Status: 5<br />
127.0.0.1       &lt;- Paused: 0<br />
127.0.0.1       &lt;- Server: 0</p>
<p dir="auto">The code generated by patched <a href="http://autoconfig-buttons-freepbx.sh" rel="nofollow ugc">autoconfig-buttons-freepbx.sh</a> for above button</p>
<p dir="auto">[USER/8090]<br />
type=extension<br />
extension=8090<br />
label=Daves Sandbox<br />
context=from-internal<br />
queuecontext=from-queue<br />
extenvoicemail=*<br />
privacy=none<br />
group=Support<br />
queuechannel=Local/8090@from-internal/n|Penalty=0|MemberName=Daves Sandbox|StateInterface=SIP/8090<br />
customastdb=CF/8090</p>
<p dir="auto">It looks like the queuechannel line is being set incorrectly. I dug a little deeper and found that in the fop2buttons table. Since that is generated by the FreePBX plugin I took a look at that code and sure enough, found the same bug.</p>
<p dir="auto">$ver = getversion();<br />
$ver = str_replace(".","",substr($ver,0,3));</p>
<p dir="auto">$ver is populated with the value 21 for FreePBX 2.10. The above bug is 3 places that I found in the plugin. I changed the substr function from 0,3 to 0,4 and its fixed. Having my users test functionality now.</p>
<pre><code>diff -u /root/fop2admin/functions.inc.php ./functions.inc.php
--- /root/fop2admin/functions.inc.php	2012-06-05 17:20:39.000000000 -0400
+++ ./functions.inc.php	2012-07-25 10:19:03.000000000 -0400
@@ -6,7 +6,7 @@
 
     $queuechannelString = fop2_set_queuemember_strings();
     $ver = getversion();
-    $ver = str_replace(".","",substr($ver,0,3));
+    $ver = str_replace(".","",substr($ver,0,4));
 
     if($ver&gt;25) {
         $qctx="from-queue";
@@ -1276,7 +1276,7 @@
     global $db, $astman;
 
     $ver = getversion();
-    $ver = str_replace(".","",substr($ver,0,3));
+    $ver = str_replace(".","",substr($ver,0,4));
 
     if($ver&gt;25) {
         $qctx="from-queue";
Common subdirectories: /root/fop2admin/i18n and ./i18n
diff -u /root/fop2admin/install.php ./install.php
--- /root/fop2admin/install.php	2011-10-24 13:17:28.000000000 -0400
+++ ./install.php	2012-07-25 10:18:45.000000000 -0400
@@ -114,7 +114,7 @@
 $queuechannelString = fop2_set_queuemember_strings();
 
 $ver = getversion();
-$ver = str_replace(".","",substr($ver,0,3));
+$ver = str_replace(".","",substr($ver,0,4));
 
 if($ver&gt;25) {
 	$qctx="from-queue";
</code></pre>
]]></description><link>http://localhost:4567/post/5476</link><guid isPermaLink="true">http://localhost:4567/post/5476</guid><dc:creator><![CDATA[dcundiff]]></dc:creator><pubDate>Wed, 25 Jul 2012 14:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to FreePBX 2.10 bug on Tue, 24 Jul 2012 22:14:56 GMT]]></title><description><![CDATA[<p dir="auto">The version check is exactly for the purpose of determining what context to use , either from-internal or from-queue.</p>
<p dir="auto">The license return should be now "210" and that is higher than "25", so it should use from-queue instead of from-internal.</p>
<p dir="auto">Run the <a href="http://autoconfig-buttons-freepbx.sh" rel="nofollow ugc">autoconfig-buttons-freepbx.sh</a> script and look at the output, you should see that from-queue is being used.</p>
]]></description><link>http://localhost:4567/post/5475</link><guid isPermaLink="true">http://localhost:4567/post/5475</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 24 Jul 2012 22:14:56 GMT</pubDate></item><item><title><![CDATA[Reply to FreePBX 2.10 bug on Tue, 24 Jul 2012 21:50:55 GMT]]></title><description><![CDATA[<p dir="auto">Thanks! That fixed the version string return.</p>
<p dir="auto">I think there may be some other incompatibility with 2.10 going on though.</p>
<p dir="auto">Agents that add themselves to a queue via FreePBX's various methods are being added as</p>
<p dir="auto">Name (Local/extension@from-queue/n)</p>
<p dir="auto">and cannot control their queue status via fop2.</p>
<p dir="auto">Agents that add themselves to a queue via fop2 function correctly and are added as</p>
<p dir="auto">Name (Local/extension@from-internal/n)</p>
<p dir="auto">Running the button script returns the following contexts for the phones</p>
<p dir="auto">context=from-internal<br />
queuecontext=from-queue</p>
<p dir="auto">Seems like something may be mixed up other than in the button script.</p>
]]></description><link>http://localhost:4567/post/5474</link><guid isPermaLink="true">http://localhost:4567/post/5474</guid><dc:creator><![CDATA[dcundiff]]></dc:creator><pubDate>Tue, 24 Jul 2012 21:50:55 GMT</pubDate></item><item><title><![CDATA[Reply to FreePBX 2.10 bug on Fri, 20 Jul 2012 00:23:24 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for reporting the bug. You can fix it replacing the AMPVERSION line with:</p>
<pre><code>AMPVERSION=`cat /var/www/html/admin/modules/framework/module.xml | grep "&lt;version&gt;" | sed -e 's/&lt;[^&gt;]*&gt;//g' | cut -d\. -f 1,2 | sed 's/\s//g' | sed 's/\.//g'`
</code></pre>
<p dir="auto">I will update the script for the next release.</p>
<p dir="auto">Thanks again!</p>
]]></description><link>http://localhost:4567/post/5473</link><guid isPermaLink="true">http://localhost:4567/post/5473</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 20 Jul 2012 00:23:24 GMT</pubDate></item></channel></rss>