Permission Denied...
We are not able to use the listen function. In fact, only the dial button actually works.
Here is my manager.conf:
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 127.0.0.1
[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = all,system,call,log,verbose,command,agent,user,originate
write = all,system,call,log,verbose,command,agent,user,originate
#include manager_additional.conf
#include manager_custom.conf
I run fop2 in debug mode and get "permission denied" when I try the buttons. The only one that works is the dial button. What else needs to be added here to make this work?
127.0.0.1 -> Action: Originate
127.0.0.1 -> Channel: SIP/742
127.0.0.1 -> Application: ChanSpy
127.0.0.1 -> Data: SIP/737
127.0.0.1 -> Async: True
127.0.0.1 <- Response: Error
127.0.0.1 <- Message: Permission denied
127.0.0.1 <- Server: 0
Thank You!!
Here is my manager.conf:
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 127.0.0.1
[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = all,system,call,log,verbose,command,agent,user,originate
write = all,system,call,log,verbose,command,agent,user,originate
#include manager_additional.conf
#include manager_custom.conf
I run fop2 in debug mode and get "permission denied" when I try the buttons. The only one that works is the dial button. What else needs to be added here to make this work?
127.0.0.1 -> Action: Originate
127.0.0.1 -> Channel: SIP/742
127.0.0.1 -> Application: ChanSpy
127.0.0.1 -> Data: SIP/737
127.0.0.1 -> Async: True
127.0.0.1 <- Response: Error
127.0.0.1 <- Message: Permission denied
127.0.0.1 <- Server: 0
Thank You!!
Comments
;user=620:1234:all:queues
;user=621:1234:dial,transfer,pickup:deptA
;user=622:1234:all
;user=623:1234:meetme,pickup
;buttonfile=buttons.cfg
;
END SAMPLE
; This line is NOT commented, it executes
; the autoconfig configuration for FreePBX
#exec autoconfig-users-freepbx.sh
This is on the top:
AMI definitions
manager_host=localhost
manager_port=5038
manager_user=admin
manager_secret=amp111
Even you have another admin user defined later on with different permissions (in the _custom or _additional files perhaps?).
You might also want to try by changing the host in fop2.cfg from "localhost" to 127.0.0.1 . Normally yt should not make a difference, but that error is not "normal" from what you are posting.
And do not forget to reload asterisk if you change its configuration.
Best regards,
i'm having the same problem here, "permission denied", but i don't know where to locate the files _custom and _additional you are talking about... could anyone help on this issue please?
i also have a question, is it possible for FOP to retrieve users info from mysql database? since i'm using dynamic database with asterisk, the "sip.conf" file is empty, so FOP is listing no users. any how to change this?
thank you
If you get permission denied when trying to issue commands with fop2, you have to check the manager user in /etc/asterisk/manager.conf and be sure you have the "originate" or "all" in the read/write permissions line.
However, if your fop2 panel is empty, I am not sure how you made it through the logs to have that specific permission denied message.
FOP2 can read configuration from anything you can code in a shell script. The autoconfiguration for freepbx does that, it reads text files or queries mysql databases.
If you do not use freepbx you will have to write your custom scripts to generate the config files, you can look at the ones included for inspiration.
Anyways, where do you get a permission denied message?
in fact, i get "permission denied" messages for commands issued by the fop server when starting up, so i get these messages even before i log in to the fop client. the connection is established with asterisk, but for certain commands asterisk is denying access, the commands' IDs sent by FOP server are:
127.0.0.1 -> ActionID: parkedcalls
127.0.0.1 -> ActionID: meetme_10
127.0.0.1 -> ActionID: astdb-DND-SIP/left
127.0.0.1 -> Command: sip show peers
127.0.0.1 -> ActionID: iaxpeers
127.0.0.1 -> ActionID: sccppeers
for all the above, asterisk returns the following response:
127.0.0.1 <- Response: Error
127.0.0.1 <- ActionID: sccppeers ;of course the action ID in the response isn't the same for every command
127.0.0.1 <- Message: Permission denied
127.0.0.1 <- Server: 0
so i ignored these errors, and started the client. it shows the pannel, but i'm having trouble with the password :oops:
anyways, the read and write rights in the manager.conf are as follows:
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system, call, log, verbose, command, agent, user
write = system, call, log, verbose, command, agent, user
no idea what could be the problem :?
thanks
so i still have one problem, FOP isn't "seeing" users since they are binded to asterisk from a realtime mysql database, do you have any idea how can this be fixed?
thank you
Just write a shell script that outputs valid fop2 cfg data as described in the manual, and run those scripts via #exec directives in the config files.
Best regards,
in fact i'm not using freepbx, so i would have to write the conf files myself. i will check where to find examples and build on them
thanks for ur reply
#exec on fop2 does that, but internally.
Best regards,