The AMPVERSION string is being detected correctly now.
The problem is the flash panel is still adding the agents with the wrong context.
Here's the debug output showing incorrect context used.
Response: Success
Message: Added interface to queue
Server: 0
127.0.0.1 <- Event: QueueMemberAdded
127.0.0.1 <- Privilege: agent,all
127.0.0.1 <- Queue: 8900
127.0.0.1 <- Location: Local/8090@from-internal/n
127.0.0.1 <- MemberName: Daves Sandbox
127.0.0.1 <- Membership: dynamic
127.0.0.1 <- Penalty: 0
127.0.0.1 <- CallsTaken: 0
127.0.0.1 <- LastCall: 0
127.0.0.1 <- Status: 5
127.0.0.1 <- Paused: 0
127.0.0.1 <- Server: 0
The code generated by patched autoconfig-buttons-freepbx.sh for above button
[USER/8090]
type=extension
extension=8090
label=Daves Sandbox
context=from-internal
queuecontext=from-queue
extenvoicemail=*
privacy=none
group=Support
queuechannel=Local/8090@from-internal/n|Penalty=0|MemberName=Daves Sandbox|StateInterface=SIP/8090
customastdb=CF/8090
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.
$ver = getversion();
$ver = str_replace(".","",substr($ver,0,3));
$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.
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>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>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>25) {
$qctx="from-queue";