Member
Last active 7 years ago
Just wanted to link posts, but really, in another post I read, I found a good tip to check if its "working" which is
root@node1:~ $ asterisk -rx "database show fop2state" | grep 847 /fop2state/USER/847 : Do not Disturb
Here is my second post Re same thing, figured I'd like them..
http://forum.fop2.com/4442-fop2-not-changing-dnd-for-real
Solution:
Install DND Presence Plugin in FOP2
Well I feel dumb, just a piece of advice I should have taken myself, never forget to troubleshoot the basic! I needed to install FOP2 DND Presence Plugin :), now all works as expected.
This is blocking our company upgrade to new phone servers :(
I am re-tackling attempting to get FOP2 to work from a remote server and everything reports correctly on the CLI, but FOP2/admin says "FOP2 Server is not responding. Be sure the service is running!"
[root@fop2 ~]# mysql -u fop2 -pfop222 -h pbx.domain.com asterisk -e "SHOW VARIABLES LIKE '%version%';" +-------------------------+---------------------+ | Variable_name | Value | +-------------------------+---------------------+ | protocol_version | 10 | | version | 5.1.73 | | version_comment | Source distribution | | version_compile_machine | x86_64 | | version_compile_os | redhat-linux-gnu | +-------------------------+---------------------+
[root@fop2 ~]# /usr/local/fop2/fop2_server --test Flash Operator Panel 2 - Valid License (/usr/local/fop2/fop2.lic) Flash Operator Panel 2 - Featureset: Basic Flash Operator Panel 2 - Allowed Tenants: 5 Flash Operator Panel 2 - Licensed Plugin: queuestats Flash Operator Panel 2 - Licensed Plugin: idletimer Connection to manager OK!
[root@fop2 ~]# telnet pbx.domain.com 5038 Trying ... Connected to. Escape character is '^]'. Asterisk Call Manager/1.1 Action: login Username: fop2 Secret: fop222 Events: off Response: Success Message: Authentication accepted ^] telnet> quit Connection closed. [root@fop2 ~]#
/var/www/html/fop2/admin/config.php
$DBHOST="IPOFPBXSYSTEM"; $DBUSER="fop2"; $DBPASS="fop222"; $DBNAME="asterisk"; $ENGINE='freepbx';
[general] ; AMI definitions manager_host=IPOFPBXSYSTEM manager_port=5038 manager_user=fop2 manager_secret=fop222
[root@fop2 ~]# service fop2 status fop2_server (pid 1979) is running... [root@fop2 ~]# pgrep fop2 1979
Any ideas what else to check?
I also ran the following:
mysql -u root -p -e "CREATE USER 'fop2'@'%' IDENTIFIED BY 'fop222';" mysql -u root -p -e "GRANT ALL PRIVILEGES ON asterisk.* TO 'fop2'@'%';"
Good Afternoon,
I posted this question a while back, but since then, I have started fresh and am facing the same issue.
http://forum.fop2.com/4272-fop2-not-changing-dnd-status since its been so long, and its a new setup, I'm posting again.
When I change DND via *79/*78 and call from another phone it respects the status change.
In FOP2 when I press *79/*78, the icon changes immedatley to DND/Available.
On the CLI when I change to DND in FOP2, I can see it set it in the FOP2DB.
root@node1:~ $ asterisk -rx "database show fop2state" | grep 847 /fop2state/USER/847 : Do not Disturb
And then it goes away after I set to available, and also shows Out To Lunch correctly. BUT, when I set myself to DND in FOP2, my phone still rings, and basically, nothing I do with the FOP2 Drop down menu works. But it all shows correctly in FOP2.
Here are some configs from the test setup.
root@node1:~ $ cat /usr/local/fop2/fop2.cfg
[general] ; AMI definitions ;PULLED FROM PREV SERVER manager_host=localhost manager_port=5038 ;manager_user=fop2 manager_user=fop2 manager_secret=fop222 ;manager_secret=fop222 ;event_mask=agent,call,command,system,user,dialplan ;[general] ; AMI definitions ;AUTO GENERATED ;manager_host=localhost ;manager_port=5038 ;manager_user=admin ;manager_secret=amp111 ;event_mask=agent,call,command,system,user,dialplan
root@node1:~ $ cat /etc/asterisk/manager.conf
[admin] secret = amp111 ;deny=0.0.0.0/0.0.0.0 ;deny=192.168.1.1/32 ;permit=127.0.0.1/255.255.255.0 permit=0.0.0.0/0.0.0.0 read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate [fop2] secret = fop222 ;deny = 0.0.0.0/0.0.0.0 ;deny=192.168.1.1/32 ;permit = 127.0.0.1/255.255.255.0 permit=0.0.0.0/0.0.0.0 read = all write = all writetimeout = 1000 eventfilter=!Event: RTCP* eventfilter=!Event: VarSet eventfilter=!Event: Cdr eventfilter=!Event: DTMF eventfilter=!Event: AGIExec eventfilter=!Event: ExtensionStatus eventfilter=!Event: ChannelUpdate eventfilter=!Event: ChallengeSent eventfilter=!Event: SuccessfulAuth
I have tried all variations of the above I can think off and also tried running the below code multiple times + rebooting the server.
/usr/local/fop2/generate_override_contexts.pl -w
Can you point me how to Debug this further? What combination of the above configs should I use? And if I pick one, do I need to update the DB Permissions/PWD accordingly?
Appreciate your help, love the program!
I believe I already did that, but I will do it again, no harm right?
Regardless, I think I fixed the issue, We use Device and User mode, and when I pulled over the Tarball with our settings, it didn't implement some of the functions. I went to Advanced Settings and changed it to Extensions mode, then back to Device and Users and hit apply, this seems to have resolved the problem, when I hit *79/*78 FOP2 changed its status. I still need to test with real outbound/inbound calling, but I can't ATM (We are open 4 business), but I think its fixed! If it is fixed, I will come back and mark as solved.
Thanks for your quick reply.
I am working on a new system that I migrated some stuff from old computer, so this is likely because of that process, but I would like to get some help/pointers on how to solve this.
On a side note, I didn't migrate any FOP2 files, FOP2 is a fresh install, but I did migrate the settings via FreePBX gui.
On the old working system, If i press *79 or *78 FOP2 shows that I have turned DND on/off. On the new phone systems, It took me a while to figure out FOP2 wasn't working when I hit available, and that I default to DND, I had to hit *79 and then I got calls inbound. (I was very happy at this moment!), but now I need to fix the issue of being able to hit DND/Available in FOP2 and have it correctly change that attribute in the phone systems so phones do or don't ring according to FOP2 status.
Any pointers to get me started?
1st thing I did was change FOP2 from running as user [admin] (I had 2 users [admin] with different permissions], FOP2 now runs under fop2 based on the following and has read/write = all permissions. Beyond that, not sure what I need to do, thanks in advance!
[root@node2 ~]# cat /usr/local/fop2/fop2.cfg
[general] ; AMI definitions manager_host=localhost manager_port=5038 manager_user=fop2 manager_secret=amp111 ;event_mask=agent,call,command,system,user,dialplan
[root@node2 ~]# cat /etc/asterisk/manager.conf
[fop2] secret = amp111 ;deny = 0.0.0.0/0.0.0.0 ;deny=192.168.1.1/32 ;permit = 127.0.0.1/255.255.255.0 permit=0.0.0.0/0.0.0.0 read = all write = all writetimeout = 1000 eventfilter=!Event: RTCP* eventfilter=!Event: VarSet eventfilter=!Event: Cdr eventfilter=!Event: DTMF eventfilter=!Event: AGIExec eventfilter=!Event: ExtensionStatus eventfilter=!Event: ChannelUpdate eventfilter=!Event: ChallengeSent eventfilter=!Event: SuccessfulAuth
Well this is Ironic as this was my last post >> http://forum.fop2.com/4256-can-t-revoke-fop2-license
I have spent about the last 6 months migrating our phone servers and this is the final step and its becoming way too difficult.
Every time I put in my code it says "successful" on the CLI but the web says "unactivated" then I can't revoke, but it *seems* I can still invoke the license, like it never contacted your servers in the first place. (I'm nervous to try again ATM). (I did the below CLI stuff 2 times and had the same results)
License Activation
------------------
Enter your serial code: #########
Serial code available!
Registration Successfull
You must restart the FOP2 service to enable the license.
Restarting fop2 (via systemctl): [ OK ]
[root@node2 html]# /usr/local/fop2/fop2_server --revoke && service fop2 restart
There is no valid license file to revoke.
[root@node2 html]# ^C
[root@node2 html]# /usr/local/fop2/fop2_server --test
Flash Operator Panel 2 - Invalid license.
Running in Demo Mode
Use of uninitialized value in split at script/fop2_server.pl line 425.
Backticks found where operator expected at (eval 89) line 2, at end of line
(Might be a runaway multi-line `` string starting on line 1)
Unrecognized character \xEE at (eval 89) line 2.
Unrecognized character \xE6 at (eval 90) line 1.
Connection to manager OK!
[root@node2 html]#
I am trying to migrate our FOP2 instance, this time I moved only the /var/www/html/fop2 folder and left the /usr/local/fop2 alone. I am not running it remotely as I had issues getting that to work properly.
(I tried not migrating the folder, but then all our queue's were empty, so now I wanted to try just moving that directory, and I am getting errors) Our other server runs FOP2 2.30, perhaps I need to use the same version?
I would still like to try to reproduce the steps so I can share them with you, but I am afraid to mess up my license, so I will tell them again, just so you can possibly test and see if it can be avoided.
Basically, you have an active licensed installation on Server A
On server B, you install FOP2, then remove the directories /usr/local/fop2 and /var/www/html/fop2 and copy those directories from Server A.
The installation on Server B now has a fop2.lic file from Server A but it won't work since everything is different, so I used a DIFFERENT license then the one on Server A to activate Server B. This worked fine, but I couldn't revoke the License on Server B.
Perhaps I did something wrong, its always possible!, but from now on, I will be installing FOP2 and just activate the license and then import the Database, possibly the files from /var/www/html/ but not the /usr/local/fop2 where the fop2.lic is stored.
Regardless, I appreciate your prompt response both in the forum and @ support.asterinic.biz where my license was manually revoked.
I get that, and it sounds like your saying what I hope you are, that all the configurations are stored in MySQL DB. But I thought with FOP2 that when users were created and buttons etc etc that files were created on inside the /fop2/ directory. Therefor would FreePBX be able to tell FOP2 to create a user by editing the MySQL db which FOP2 would then read and populate the necessary files in its own webroot? [OR is FOP2 webroot static and only the MySQL DB changes?]
This would help me understand moving my FOP2 as well, because currently I installed FOP2 on the new system, then moved over the webroot + /usr/local/fop2. But I had glitches and I would rather just install fresh + activate new license and import DB/Connect to Remote DB.
When I say glitchy, this is the resulting problem @ the moment. [url=http://forum.fop2.com/4256-can-t-revoke-fop2-license] [Can't Revoke License in FOP2] . I think this is because I activated over-top of an already existing but not working fop2.lic. I figured it would just over-write it, and it did, but I need to start fresh and I can't revoke the license. (Sorry to go off topic, but this topic will help me avoid the other again)