ASTERISK WARNING - Get calls counter failed

Hello,

I´ve the Same Issue like this Post:

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

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

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?

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

You need the script, wich I Use?

The Link is here:

And how are you calling that script? What command/options are you executing?

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.

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.