Schelv
August 20, 2024, 8:25am
1
Hello,
I´ve the Same Issue like this Post:
Hello,
i´ve an problem…
When I set the rights on the AMI User the Freepbx Distro ignored this?
I would like to check the Asterisk Calls Counter with Icinga.
I´v added a user like icinga with pw test.
I´ve set the rights too but everytime i received the error:
ASTERISK WARNING - Get calls counter failed: , may be need “system” write privilege for user icinga2 in file manager.conf (write=system,…)
Is there maybe a Bug?
Cheers and thx for help!
We have configuered the Freepbx17 to check or Freepbx 17.
The output from Terminal is:
asterisk -x “manager show user icingapbx”
username: icingapbx
secret: <Set>
ACL: yes
read perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
write perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate
displayconnects: no
allowmultiplelogin: yes
Variables:
ACL: (unnamed)
0: deny - 0.0.0.0/0.0.0.0
1: allow - 127.0.0.0/255.255.255.0
2: allow - 10.10.XX.0/255.255.255.0
What can I do to get this Icinga-Check working?
Cheers
lgaetz
(Lorne Gaetz)
August 20, 2024, 2:28pm
2
In Asterisk get ami settings with
FreePBX17*CLI> manager show settings
Global Settings:
----------------
Manager (AMI): Yes
Web Manager (AMI/HTTP): No
TCP Bindaddress: 127.0.0.1:5038
You’ll note that the bind address is to localhost by default, which restricts access.
https://sangomakb.atlassian.net/wiki/spaces/PG/pages/26706045/AMI+Default+Configuration+in+16
Schelv
August 20, 2024, 2:47pm
3
Hi
I´ve already the local IP changed to 0.0.0.0:5038.
The Result of youre Post is:
asterisk -x “manager show settings”
Global Settings:
Manager (AMI): Yes
Web Manager (AMI/HTTP): No
TCP Bindaddress: 0.0.0.0:5038
HTTP Timeout (seconds): 60
TLS Enable: No
TLS Bindaddress: Disabled
TLS Certfile: asterisk.pem
TLS Privatekey:
TLS Cipher:
Allow multiple login: Yes
Display connects: No
Timestamp events: No
Channel vars:
Disabled events:
Debug: No
What is the actual error you are getting?
Schelv
August 20, 2024, 5:59pm
5
The Error I get is:
“ASTERISK WARNING - Get calls counter failed: , may be need “system” write privilege for user icingapbx in file manager.conf (write=system,…) |”
But I set the rights on all the Settings in freepbx AMI.
Show the content of the AMI action you are sending
Schelv
August 21, 2024, 3:21pm
7
You need the script, wich I Use?
The Link is here:
And how are you calling that script? What command/options are you executing?
Schelv
August 21, 2024, 3:57pm
9
I use this command in icinga2:
‘/usr/lib/nagios/plugins/check_asterisk.php’ ‘-H’ ‘10.10.XX.250’ ‘-P’ ‘5038’ ‘-W’ ‘1’ ‘-p’ ‘XXXXXXX’ ‘-t’ ‘2’ ‘-u’ ‘icingapbx’
I hope, my Infos are usefull for You.
Well, if you’re using FreePBX v17 and running Asterisk v21 then that is the problem. The script you are using only supports chan_sip and there is no chan_sip in Asterisk v21. Even if you’re using a lower version of FreePBX or Asterisk that supports chan_sip, if you’re using chan_pjsip for your extensions/trunks this script isn’t going to work.
Schelv
August 21, 2024, 4:28pm
11
Okay, thanks for Info and youre Time.
I´ll to update the script to use the Check in Incinga2.
Thanks a lot!
Keep in mind that chan_sip and chan_pjsip are not the same.
Chan_sip only allowed one contact per peer. So it was a 1:1 relationship.
Chan_pjsip allows multiple contacts per endpoint (peer) so there are different commands for checking endpoints vs aors vs contacts.
1 Like
system
(system)
Closed
August 28, 2024, 5:27pm
13
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.